summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/easy-todo/easy-todo.sty30
1 files changed, 18 insertions, 12 deletions
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}%
-}{}
+}{}%
}