summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-01-15 00:30:42 +0000
committerKarl Berry <karl@freefriends.org>2014-01-15 00:30:42 +0000
commita4268e90f9d9013767d4aee201908389ccc22120 (patch)
treefc8a3a3778acea955d07f0c25617cf920c876c0f
parent6c1d55d86cd79dc40f66222e8dcb23a12ae00200 (diff)
easy-todo (14jan14)
git-svn-id: svn://tug.org/texlive/trunk@32677 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/easy-todo/README4
-rw-r--r--Master/texmf-dist/doc/latex/easy-todo/easy-todo.pdfbin130400 -> 135147 bytes
-rw-r--r--Master/texmf-dist/doc/latex/easy-todo/easy-todo.tex53
-rw-r--r--Master/texmf-dist/tex/latex/easy-todo/easy-todo.sty30
4 files changed, 48 insertions, 39 deletions
diff --git a/Master/texmf-dist/doc/latex/easy-todo/README b/Master/texmf-dist/doc/latex/easy-todo/README
index f0bb918d4b7..178c5fdff43 100644
--- a/Master/texmf-dist/doc/latex/easy-todo/README
+++ b/Master/texmf-dist/doc/latex/easy-todo/README
@@ -1,5 +1,3 @@
-
README
- The easy-todo package allows to create TODO notes in documents and show the list of TODOs as an index with references.
-
+The easy-todo package allows you to create, track, show and hide notes in a document.
diff --git a/Master/texmf-dist/doc/latex/easy-todo/easy-todo.pdf b/Master/texmf-dist/doc/latex/easy-todo/easy-todo.pdf
index 8e7a098944b..5913aee6d94 100644
--- a/Master/texmf-dist/doc/latex/easy-todo/easy-todo.pdf
+++ b/Master/texmf-dist/doc/latex/easy-todo/easy-todo.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/easy-todo/easy-todo.tex b/Master/texmf-dist/doc/latex/easy-todo/easy-todo.tex
index dfeddbacffb..fbffc1020d5 100644
--- a/Master/texmf-dist/doc/latex/easy-todo/easy-todo.tex
+++ b/Master/texmf-dist/doc/latex/easy-todo/easy-todo.tex
@@ -1,52 +1,57 @@
\documentclass[a4paper]{article}
-\usepackage{listings}
-\usepackage[enabled,section]{easy-todo}
+\usepackage[obeyFinal]{easy-todo}
\begin{document}
\title{The \texttt{easy-todo} package}
- \author{Juan Rada-Vilela}
- \date{November, 2013}
+ \author{by Juan Rada-Vilela (\texttt{jcrada@fuzzylite.com})}
+ \date{January, 2014}
\maketitle
\begin{abstract}
- The \texttt{easy-todo} package allows to create TODO notes in a document and show the list of TODOs as an index with references.
+ The \texttt{easy-todo} package allows you to create, track, show and hide notes in a document. In addition, the package allows you to create a summary of notes with their respective points of reference.
\end{abstract}
\section{Options}
- When including the package, the following options are available:
+ The following options are available:
\begin{description}
- \item [enabled] Shows the TODO notes as well as the index.
- \item [enable] Same as before.
- \item [disabled] Hides the TODO notes as well as the index. Useful for printing drafts without the TODO notes, but keeping them in the document.
- \item [disable] Same as before.
- \item [final] Same as disabled.
+ \item [enable] Show the notes and the index.
+ \item [disable] Hide the notes and the index.
+ \item [obeyFinal] Hide the notes except when the documentclass is \textbf{final}. This option overrides the options \textbf{enable} and \textbf{disable}.
\item [chapter] Prints the list of TODOs as a chapter.
\item [section] Prints the list of TODOs as a section.
\end{description}
- For example:
-\lstset{language=TeX}
-\begin{lstlisting}
-\usepackage[enabled,section]{easy-todo}
-\end{lstlisting}
\section{Commands}
\begin{description}
- \item [\textbackslash todo\{note\}] Creates a note with text ``\texttt{note}''.
- \item [\textbackslash todoi\{note-i\}] Creates an empty note with information ``\texttt{note-i}'' appearing only at the index.
- \item [\textbackslash todoii\{note-ii\}\{information\}] Creates a note with ``\texttt{note-ii}'' inplace and ``\texttt{information}'' at the index.
- \item [\textbackslash listoftodos] Creates the list of TODOs.
+ \item [\textbackslash todo\{note\}] Creates a note that shows the text ``\texttt{note}''.
+ \item [\textbackslash todoi\{note\}] Creates a note that only shows an automatically generated number. The text ``\texttt{note}'' appears in the index.
+ \item [\textbackslash todoii\{note\}\{information\}] Creates a note that shows the text ``\texttt{note}''. The text ``\texttt{information}'' appears at the index.
+ \item [\textbackslash listoftodos] Creates the list of notes.
\end{description}
+ \section{Example}
+ \texttt{\textbackslash usepackage[obeyFinal]\{easy-todo\}}
+
+ This is a todo \todo{note} that appears in full everywhere. This is a todoi \todoi{note i} that appears as a number and the note at the index. This is a todoii \todoii{hint}{information} note that shows a hint in place and the information at the index. All these notes disappear when using \texttt{\textbackslash documentclass[final]...}, or when using instead \texttt{\textbackslash usepackage[disable]\{easy-todo\}}.
+
\section{Changelog}
+
+ \subsection{Version 3.0}
+ \begin{itemize}
+ \item Added option \textbf{obeyFinal}
+ \item Removed spaces caused by notes when hidden.
+ \item Option \textbf{section} is default.
+ \item Removed options \textbf{enabled}, \textbf{disabled} and \textbf{final}.
+ \end{itemize}
+
+ \subsection{Version 2.0}
\begin{itemize}
\item Added options \textbf{enable} and \textbf{disable}
\item Added commands \textbf{todoi}, \textbf{todoii}
\end{itemize}
-
- This is a todo \todo{note} that appears in full everywhere. This is a todoi \todoi{note i} that appears as a number and the note at the index. This is a todoii \todoii{hint}{information} note that shows a hint at the place and the information at the index.
-
- \listoftodos
+
+ \listoftodos
\end{document}
diff --git a/Master/texmf-dist/tex/latex/easy-todo/easy-todo.sty b/Master/texmf-dist/tex/latex/easy-todo/easy-todo.sty
index a4bbeec7d4f..359475fe23c 100644
--- a/Master/texmf-dist/tex/latex/easy-todo/easy-todo.sty
+++ b/Master/texmf-dist/tex/latex/easy-todo/easy-todo.sty
@@ -1,25 +1,27 @@
% Created by Juan Rada-Vilela
+% jcrada@fuzzylite.com
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{easy-todo}[2013/11/15]
+\ProvidesPackage{easy-todo}[2014/01/01]
-\def\@todoindexas{chapter}
+\def\@todoindexas{section}
\newcommand{\todoindexas}[1]{\def\@todoindexas{#1}}
\def\@todoenable{true}
\newcommand{\todoenable}[1]{\def\@todoenable{#1}}
+\def\@todoobeyfinal{false}
+\newcommand{\todoobeyfinal}[1]{\def\@todoobeyfinal{#1}}
\DeclareOption{chapter}{\todoindexas{chapter}}
\DeclareOption{section}{\todoindexas{section}}
-\DeclareOption{final}{\todoenable{false}}
-\DeclareOption{enabled}{\todoenable{true}}
+\DeclareOption{obeyFinal}{\todoobeyfinal{true}}
\DeclareOption{enable}{\todoenable{true}}
-\DeclareOption{disabled}{\todoenable{false}}
\DeclareOption{disable}{\todoenable{false}}
+
\DeclareOption*{%
- \PackageError{easy-todo}{What is \CurrentOption ?}{Options available: final, enable(d), disable(d), chapter, section}%
+ \PackageError{easy-todo}{What is \CurrentOption ?}{Options available: enable, disable, obeyFinal, chapter, section}%
\todoindexas{chapter}
}
@@ -27,7 +29,8 @@
\RequirePackage{color} %to add colour
\RequirePackage{tocloft} %to create index
-\RequirePackage{ifthen}
+\RequirePackage{ifthen} %to ifthenelse conditions
+\RequirePackage{ifdraft} %to detect draft/final options
\newcommand{\todoindextitle}{ToDo}
\newcommand{\todoindexpagetitle}{P.}
@@ -62,25 +65,28 @@
%Description: Creates a todo note with the number and information
%Parameter: TODO note
\newcommand{\todo}[1]{%
-\todoii{#1}{#1}%
+\todoii{#1}{#1}\unskip%
}
%Command: todoi
%Description: Creates a todo note with just a number
%Parameters: [1] the information to show at the list
-\newcommand{\todoi}[1]{
-\todoii{}{#1}
+\newcommand{\todoi}[1]{%
+\todoii{}{#1}\unskip%
}
%Command: todoii
%Description: Creates a todo note
%Parameters: [1] the note to show, [2] the information to show at the list
-\newcommand{\todoii}[2]{
+\newcommand{\todoii}[2]{%
+\ifthenelse{\equal{\@todoobeyfinal}{true}}{%
+ \ifoptionfinal{\todoenable{false}}{\todoenable{true}}%
+}{}%
\ifthenelse{\equal{\@todoenable}{true}}{%
\refstepcounter{todos}%
\noindent{\todocolor\normalfont\scriptsize{\bfseries{\thetodos.#1}}}%
\addcontentsline{lod}{todos}{\protect{\thetodos. }#2}%
-}{}
+}{}%
}