summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-01-14 00:15:21 +0000
committerKarl Berry <karl@freefriends.org>2009-01-14 00:15:21 +0000
commit46e27c02c3e31502a5f55cf2cbe3c69edc033742 (patch)
tree40b878e1eb9db4328b3ab356c3b09aa54ba89afe
parent1cf000674b16b9f15f3c5112f70c07a08e8bb5de (diff)
todonotes (10jan09)
git-svn-id: svn://tug.org/texlive/trunk@11861 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/todonotes/todonotes.pdfbin181086 -> 191097 bytes
-rw-r--r--Master/texmf-dist/doc/latex/todonotes/todonotesexample.pdfbin33117 -> 28159 bytes
-rw-r--r--Master/texmf-dist/doc/latex/todonotes/todonotesexample.tex21
-rw-r--r--Master/texmf-dist/source/latex/todonotes/todonotes.dtx141
-rw-r--r--Master/texmf-dist/tex/latex/todonotes/todonotes.sty112
5 files changed, 210 insertions, 64 deletions
diff --git a/Master/texmf-dist/doc/latex/todonotes/todonotes.pdf b/Master/texmf-dist/doc/latex/todonotes/todonotes.pdf
index e3bad3eaab4..907c543664b 100644
--- a/Master/texmf-dist/doc/latex/todonotes/todonotes.pdf
+++ b/Master/texmf-dist/doc/latex/todonotes/todonotes.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/todonotes/todonotesexample.pdf b/Master/texmf-dist/doc/latex/todonotes/todonotesexample.pdf
index cfe09f7ce72..8b5fe8c7d02 100644
--- a/Master/texmf-dist/doc/latex/todonotes/todonotesexample.pdf
+++ b/Master/texmf-dist/doc/latex/todonotes/todonotesexample.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/todonotes/todonotesexample.tex b/Master/texmf-dist/doc/latex/todonotes/todonotesexample.tex
index 5e869794191..1409fe837fb 100644
--- a/Master/texmf-dist/doc/latex/todonotes/todonotesexample.tex
+++ b/Master/texmf-dist/doc/latex/todonotes/todonotesexample.tex
@@ -1,22 +1,13 @@
\documentclass{article}
\usepackage[colorlinks]{hyperref}
-\usepackage[colorinlistoftodos, textwidth=4cm]{todonotes}
+\usepackage[colorinlistoftodos, textwidth=4cm, shadow]{todonotes}
\usepackage{amsmath}
\usepackage[displaymath, tightpage]{preview}
\begin{document}
-%\begin{preview}
-\begin{align}
-\sin(x)^2 + \cos(x)^2 = 1
-\end{align}
-%\end{preview}
\listoftodos
-\begin{align}
-\sin(x)^2 + \cos(x)^2 = 1
-\end{align}
-
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nulla
\todo{Plain todonotes.}%
urna. Maecenas interdum nunc in augue. Mauris quis massa in ante
@@ -38,8 +29,7 @@ Praesent congue mi eu ipsum cursus fringilla. Etiam leo erat,
tristique et, pharetra eget, mollis vitae, velit. In hac habitasse
\todo[size=\small, color=green!40]{A note with a small fontsize.}%
platea dictumst. In quam nibh, facilisis et, laoreet non, facilisis
-tempus, justo. Class aptent taciti sociosqu ad litora torquent per
-conubia nostra, per inceptos himenaeos.
+tempus, justo.
\todo[inline]{A very long todonote that certainly will fill more
than a single line in the list of todos. Just to make sure let's add
@@ -56,10 +46,7 @@ commodo id, pellentesque id, eleifend non, mi. Duis venenatis
\todo[caption={A short entry in the list of todos}]{A very long
todonote that certainly will fill more than a single line in the
list of todos \ldots}
-sagittis metus. Donec tempus metus id lacus. Praesent vel diam.
-Morbi nec ante. Vestibulum varius felis ac lacus. Nulla vitae neque
-\todo[noline, color=green!40]{A note with no line back to the text.}%
-in nibh bibendum volutpat. Quisque accumsan diam. Aenean ultricies
-nisl ac lacus. Aliquam posuere. Aenean venenatis tortor in felis.
+sagittis metus.
+\missingfigure{A figure I have to make \ldots}
\end{document}
diff --git a/Master/texmf-dist/source/latex/todonotes/todonotes.dtx b/Master/texmf-dist/source/latex/todonotes/todonotes.dtx
index 204dcf04a7b..c0137594767 100644
--- a/Master/texmf-dist/source/latex/todonotes/todonotes.dtx
+++ b/Master/texmf-dist/source/latex/todonotes/todonotes.dtx
@@ -22,14 +22,14 @@
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{todonotes}
%<*package>
- [2009/01/04 .dtx Todonotes source and documentation.]
+ [2009/01/09 .dtx Todonotes source and documentation.]
%</package>
%
%<*driver>
\documentclass{ltxdoc}
\usepackage{wrapfig}
\usepackage[colorlinks, linkcolor=black]{hyperref}
-\usepackage[colorinlistoftodos]{todonotes}[2009/01/04]
+\usepackage[colorinlistoftodos, shadow]{todonotes}[2009/01/09]
\usepackage{setspace}
\EnableCrossrefs
\CodelineIndex
@@ -44,7 +44,7 @@
%</driver>
% \fi
%
-% \CheckSum{333}
+% \CheckSum{386}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -115,6 +115,14 @@
% \changes{0.7.6}{2009/01/04}{Added a textsize option for the
% package and the prepend / noprepend option for the
% todo command.}
+% \changes{0.8}{2009/01/09}{Added three new translations french,
+% spanish and catalan thanks to Richard Dominique and
+% Joan Queralt. Improved the visual appearence of the
+% inserted notes (rounded corners and optional shadows)
+% with code from Joan Queralt. Found an untranslated
+% textstring ''Figure'' in the source. Added a figwidth
+% option to the missingfigure command, patch by Paul
+% Ivanov.}
%
% \GetFileInfo{todonotes.dtx}
%
@@ -205,8 +213,8 @@
% |\missingfigure|) are defined as macros with no effect, and thus
% all inserted notes are removed.
%
-% \DescribeMacro{danish}
-% \DescribeMacro{german}
+% \DescribeMacro{danish, german, french}
+% \DescribeMacro{spanish, catalan}
% Use the danish or german translations of the text strings
% ''List of todos'' and ''Missing figure''.
% The default is to use none of these options, which results in
@@ -252,6 +260,12 @@
% |caption=val| option for the todo command, where the given value
% |val| is inserted in the inserted todonote.
%
+% \DescribeMacro{shadow}
+% If the |shadow| option is given, the inserted todonotes will be
+% displayed with a gray shadow.
+% I expect that the option will trigger problems with tikz versions
+% prior to 2.0.
+%
% \DescribeMacro{dvistyle}
% When a document with todonotes is compiled with plain latex (to a
% dvi-file), there is an issue with the visual
@@ -379,14 +393,43 @@
% and tedious note that cannot be on one line in the list of
% todos.}
% \begin{verbatim}
-% \todo[prepend, caption={Short note with prepend}]{A very long and tedious note that
-% cannot be on one line in the list of todos.}.
-% \todo[noprepend, caption={Short note with noprepend}]{A very long and tedious note that
-% cannot be on one line in the list of todos.}.
+% \todo[prepend, caption={Short note with prepend}]{A very long and tedious
+% note that cannot be on one line in the list of todos.}.
+% \todo[noprepend, caption={Short note with noprepend}]{A very long and
+% tedious note that cannot be on one line in the list of todos.}.
% \end{verbatim}
+% \DescribeMacro{figwidth}
+% The |figwidth=length| option sets the default width of the figure
+% inserted by the |\missingfigure| command.
+% The default value is |\textwidth|.
%
% \subsection{Options for the missingfigure command}
-% Currently the missingfigure command takes no optional arguments.
+%
+% \DescribeMacro{figwidth}
+% The |figwidth=length| option sets the width of the figure inserted by the
+% |\missingfigure| command.
+% Length values below $6cm$ might trigger some problems with the
+% visual appearance.
+% Try to compare the default of the missing figure command, when the
+% option is given or not.
+% \begin{verbatim}
+% \missingfigure[figwidth=6cm]{Testing a long text string}
+% \end{verbatim}
+% \missingfigure[figwidth=6cm]{Testing a long text string}
+% \begin{verbatim}
+% \missingfigure{Testing a long text string}
+% \end{verbatim}
+% \missingfigure{Testing a long text string}
+% \begin{wrapfigure}{r}[2cm]{6cm}
+% \missingfigure[figwidth=6cm]{Add a test image \ldots}
+% \end{wrapfigure}
+% Another usage of the option is when |\missingfigure| is used in
+% the wrapfigure environment.
+% \begin{verbatim}
+% \begin{wrapfigure}{r}[2cm]{6cm}
+% \missingfigure[figwidth=6cm]{Add a test image \ldots}
+% \end{wrapfigure}
+% \end{verbatim}
%
% \subsection{Options for the listoftodos command}
% Currently the listoftodos command takes no optional arguments.
@@ -589,7 +632,7 @@
%
% Identifies the package and loads the packages dependences.
% \begin{macrocode}
-\ProvidesPackage{todonotes}[2009/01/04]
+\ProvidesPackage{todonotes}[2009/01/09]
\RequirePackage{ifthen}
\RequirePackage{xkeyval}
\RequirePackage{hyperref}
@@ -605,6 +648,7 @@
\newcommand{\@todonotes@bordercolor}{black}
\newcommand{\@todonotes@textwidth}{\marginparwidth}
\newcommand{\@todonotes@textsize}{\normalsize}
+\newcommand{\@todonotes@figwidth}{\textwidth}
% \end{macrocode}
%
% \subsection{Declaration of options for the package}
@@ -615,23 +659,45 @@
% the danish and german languages.
% \begin{macrocode}
\newcommand{\@todonotes@todolistname}{Todo list}
+\newcommand{\@todonotes@MissingFigureText}{Figure}
\newcommand{\@todonotes@MissingFigureUp}{Missing}
\newcommand{\@todonotes@MissingFigureDown}{figure}
\newcommand{\@todonotes@SetTodoListName}[1]{\renewcommand{\@todonotes@todolistname}{#1}}
+\newcommand{\@todonotes@SetMissingFigureText}[1]{\renewcommand{\@todonotes@MissingFigureText}{#1}}
\newcommand{\@todonotes@SetMissingFigureUp}[1]{\renewcommand{\@todonotes@MissingFigureUp}{#1}}
\newcommand{\@todonotes@SetMissingFigureDown}[1]{\renewcommand{\@todonotes@MissingFigureDown}{#1}}
+\newif{\if@todonotes@reverseMissingFigureTriangle}
\DeclareOptionX{danish}{%
- \typeout{Danish}
\@todonotes@SetTodoListName{G\o{}rem\aa{}lsliste}%
+ \@todonotes@SetMissingFigureText{Figur}%
\@todonotes@SetMissingFigureUp{Manglende}%
\@todonotes@SetMissingFigureDown{figur}%
}
\DeclareOptionX{german}{%
- \typeout{German}
\@todonotes@SetTodoListName{Liste der noch zu erledigenden Punkte}%
+ \@todonotes@SetMissingFigureText{Abbildung}%
\@todonotes@SetMissingFigureUp{Fehlende}%
\@todonotes@SetMissingFigureDown{Abbildung}%
}
+\DeclareOptionX{french}{%
+ \@todonotes@SetTodoListName{Liste des points \`a traiter}%
+ \@todonotes@SetMissingFigureText{Figure}%
+ \@todonotes@SetMissingFigureUp{Figure}%
+ \@todonotes@SetMissingFigureDown{manquante}%
+ \@todonotes@reverseMissingFigureTrianglefalse
+}
+\DeclareOptionX{catalan}{
+ \@todonotes@SetTodoListName{Llista de feines pendents}%
+ \@todonotes@SetMissingFigureText{Figura}%
+ \@todonotes@SetMissingFigureUp{Figura}%
+ \@todonotes@SetMissingFigureDown{pendent}%
+}
+\DeclareOptionX{spanish}{
+ \@todonotes@SetTodoListName{Lista de tareas pendientes}%
+ \@todonotes@SetMissingFigureText{Figura}%
+ \@todonotes@SetMissingFigureUp{Figura}%
+ \@todonotes@SetMissingFigureDown{pendient}%
+}
% \end{macrocode}
% Create a counter, for storing the number of inserted todos.
% \begin{macrocode}
@@ -705,6 +771,21 @@
\define@key{todonotes.sty}%
{textsize}{\renewcommand{\@todonotes@textsize}{\csname #1\endcsname}}
% \end{macrocode}
+% Add option for shadows behind the inserted notes
+% \begin{macrocode}
+\newif{\if@todonotes@shadowenabled}
+\@todonotes@shadowenabledfalse
+\DeclareOptionX{shadow}{\@todonotes@shadowenabledtrue
+\usetikzlibrary{shadows}}
+% \end{macrocode}
+% Add option for the default width of the figure inserted with
+% |\missingfigure|.
+% \begin{macrocode}
+\define@key{todonotes.sty}%
+ {figwidth}{\renewcommand{\@todonotes@figwidth}{#1}}
+% \end{macrocode}
+% Make the text width as an option.
+% \begin{macrocode}
% Finally process the given options.
% \begin{macrocode}
\ProcessOptionsX
@@ -769,6 +850,12 @@
\@todonotes@captiongiventrue}%
\define@key{todonotes}{nocaption}[]{\@todonotes@captiongivenfalse}%
% \end{macrocode}
+% Change the current figure width.
+% \begin{macrocode}
+\newcommand{\@todonotes@currentfigwidth}{\@todonotes@figwidth}
+\define@key{todonotes}%
+ {figwidth}{\renewcommand{\@todonotes@currentfigwidth}{#1}}
+% \end{macrocode}
% Preset values of the options
% \begin{macrocode}
\presetkeys%
@@ -778,6 +865,7 @@
bordercolor=\@todonotes@bordercolor,%
noinline,%
nocaption,%
+ figwidth=\@todonotes@figwidth,%
line, list, size=\@todonotes@textsize}{}%
% \end{macrocode}
% \subsection{The main code part}
@@ -788,7 +876,7 @@
\if@todonotes@disabled%
\newcommand{\listoftodos}{}
\newcommand{\todo}[2][]{\ignorespaces}
- \newcommand{\missingfigure}[1]{}
+ \newcommand{\missingfigure}[2]{}
\else % \if@todonotes@disabled
% \end{macrocode}
% Define the |\listoftodos| command and define the
@@ -801,12 +889,23 @@
% \end{macrocode}
% Define styles used by the todo command
% \begin{macrocode}
-\tikzstyle{notestyle} = [
+\tikzstyle{notestyleraw} = [
draw=\@todonotes@currentbordercolor,
fill=\@todonotes@currentbackgroundcolor,
line width=0.5pt,
text width = \@todonotes@textwidth - 1.6 ex - 1pt,
- inner sep = 0.8 ex]
+ inner sep = 0.8 ex,
+ rounded corners=4pt]
+% \end{macrocode}
+% Add shadows and rounded corners to the inserted todonotes.
+% \begin{macrocode}
+\if@todonotes@shadowenabled
+\tikzstyle{notestyle} = [notestyleraw,
+ general shadow={shadow xshift=.5ex, shadow yshift=-.5ex,
+ opacity=1,fill=black!50}]
+\else
+\tikzstyle{notestyle} = [notestyleraw]
+\fi
\tikzstyle{notestyleleft} = [
notestyle,
left]
@@ -958,14 +1057,16 @@
% \begin{macro}{\missingfigure}
% Defines the |\missingfigure| macro.
% \begin{macrocode}
-\newcommand{\missingfigure}[1]{
-\addcontentsline{tdo}{todo}{Figure: \protect{#1}}%
+\newcommand{\missingfigure}[2][]{
+\setkeys{todonotes}{#1}%
+\addcontentsline{tdo}{todo}{\@todonotes@MissingFigureText: \protect{#2}}%
\par
\noindent
\begin{tikzpicture}
\draw[fill=black!40, draw = white, line width=0pt]
- (-3, -2.5) rectangle +(\textwidth, 4cm);
-\draw (3, 0) node[right, text width=4cm] {#1};
+ (-2, -2.5) rectangle +(\@todonotes@currentfigwidth, 4cm);
+\draw (2, -0.3) node[right, text
+ width=\@todonotes@currentfigwidth-4.5cm] {#2};
\draw[red, fill=white, rounded corners = 5pt, line width=10pt]
(30:2cm) -- (150:2cm) -- (270:2cm) -- cycle;
\draw (0, 0.3) node {\@todonotes@MissingFigureUp};
diff --git a/Master/texmf-dist/tex/latex/todonotes/todonotes.sty b/Master/texmf-dist/tex/latex/todonotes/todonotes.sty
index ae35d16af8b..ae601f22380 100644
--- a/Master/texmf-dist/tex/latex/todonotes/todonotes.sty
+++ b/Master/texmf-dist/tex/latex/todonotes/todonotes.sty
@@ -22,9 +22,9 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{todonotes}
- [2008/12/27 .dtx Todonotes source and documentation.]
+ [2009/01/09 .dtx Todonotes source and documentation.]
-\ProvidesPackage{todonotes}[2008/12/27]
+\ProvidesPackage{todonotes}[2009/01/09]
\RequirePackage{ifthen}
\RequirePackage{xkeyval}
\RequirePackage{hyperref}
@@ -36,23 +36,50 @@
\newcommand{\@todonotes@linecolor}{orange}
\newcommand{\@todonotes@bordercolor}{black}
\newcommand{\@todonotes@textwidth}{\marginparwidth}
+\newcommand{\@todonotes@textsize}{\normalsize}
+\newcommand{\@todonotes@figwidth}{\textwidth}
\newcommand{\@todonotes@todolistname}{Todo list}
+\newcommand{\@todonotes@MissingFigureText}{Figure}
\newcommand{\@todonotes@MissingFigureUp}{Missing}
\newcommand{\@todonotes@MissingFigureDown}{figure}
-\newcommand{\@todonotes@SetTodoListName}[1]{\renewcommand{\todolistname}{#1}}
-\newcommand{\@todonotes@SetMissingFigureUp}[1]{\renewcommand{\MissingFigureUp}{#1}}
-\providecommand{\SetMissingFigureDown}[1]{\renewcommand{\MissingFigureDown}{#1}}
+\newcommand{\@todonotes@SetTodoListName}[1]{\renewcommand{\@todonotes@todolistname}{#1}}
+\newcommand{\@todonotes@SetMissingFigureText}[1]{\renewcommand{\@todonotes@MissingFigureText}{#1}}
+\newcommand{\@todonotes@SetMissingFigureUp}[1]{\renewcommand{\@todonotes@MissingFigureUp}{#1}}
+\newcommand{\@todonotes@SetMissingFigureDown}[1]{\renewcommand{\@todonotes@MissingFigureDown}{#1}}
+\newif{\if@todonotes@reverseMissingFigureTriangle}
\DeclareOptionX{danish}{%
\@todonotes@SetTodoListName{G\o{}rem\aa{}lsliste}%
+ \@todonotes@SetMissingFigureText{Figur}%
\@todonotes@SetMissingFigureUp{Manglende}%
\@todonotes@SetMissingFigureDown{figur}%
}
\DeclareOptionX{german}{%
\@todonotes@SetTodoListName{Liste der noch zu erledigenden Punkte}%
+ \@todonotes@SetMissingFigureText{Abbildung}%
\@todonotes@SetMissingFigureUp{Fehlende}%
\@todonotes@SetMissingFigureDown{Abbildung}%
}
+\DeclareOptionX{french}{%
+ \@todonotes@SetTodoListName{Liste des points \`a traiter}%
+ \@todonotes@SetMissingFigureText{Figure}%
+ \@todonotes@SetMissingFigureUp{Figure}%
+ \@todonotes@SetMissingFigureDown{manquante}%
+ \@todonotes@reverseMissingFigureTrianglefalse
+}
+\DeclareOptionX{catalan}{
+ \@todonotes@SetTodoListName{Llista de feines pendents}%
+ \@todonotes@SetMissingFigureText{Figura}%
+ \@todonotes@SetMissingFigureUp{Figura}%
+ \@todonotes@SetMissingFigureDown{pendent}%
+}
+\DeclareOptionX{spanish}{
+ \@todonotes@SetTodoListName{Lista de tareas pendientes}%
+ \@todonotes@SetMissingFigureText{Figura}%
+ \@todonotes@SetMissingFigureUp{Figura}%
+ \@todonotes@SetMissingFigureDown{pendient}%
+}
+\newcounter{@todonotes@numberoftodonotes}
\newif{\if@todonotes@disabled}
\DeclareOptionX{disable}{\@todonotes@disabledtrue}
\newif{\if@todonotes@colorinlistoftodos}
@@ -62,18 +89,26 @@
\define@key{todonotes.sty}%
{color}{
\renewcommand{\@todonotes@backgroundcolor}{#1}
- \renewcommand{\@todonotes@linegroundcolor}{#1}}
+ \renewcommand{\@todonotes@linecolor}{#1}}
\define@key{todonotes.sty}%
{backgroundcolor}{\renewcommand{\@todonotes@backgroundcolor}{#1}}
\define@key{todonotes.sty}%
{linecolor}{\renewcommand{\@todonotes@linecolor}{#1}}
\define@key{todonotes.sty}%
{bordercolor}{\renewcommand{\@todonotes@bordercolor}{#1}}
-\newif{\if@todonotes@prependcaption}
-\@todonotes@prependcaptionfalse
-\DeclareOptionX{prependcaption}{\@todonotes@prependcaptiontrue}
+\newif{\if@todonotes@prependcaptionglobal}
+\@todonotes@prependcaptionglobalfalse
+\DeclareOptionX{prependcaption}{\@todonotes@prependcaptionglobaltrue}
\define@key{todonotes.sty}%
{textwidth}{\renewcommand{\@todonotes@textwidth}{#1}}
+\define@key{todonotes.sty}%
+ {textsize}{\renewcommand{\@todonotes@textsize}{\csname #1\endcsname}}
+\newif{\if@todonotes@shadowenabled}
+\@todonotes@shadowenabledfalse
+\DeclareOptionX{shadow}{\@todonotes@shadowenabledtrue
+\usetikzlibrary{shadows}}
+\define@key{todonotes.sty}%
+ {figwidth}{\renewcommand{\@todonotes@figwidth}{#1}}
\ProcessOptionsX
\newcommand{\@todonotes@currentlinecolor}{}%
@@ -96,6 +131,9 @@
\newif\if@todonotes@inlinenote%
\define@key{todonotes}{inline}[]{\@todonotes@inlinenotetrue}%
\define@key{todonotes}{noinline}[]{\@todonotes@inlinenotefalse}%
+\newif\if@todonotes@prependcaption%
+\define@key{todonotes}{prepend}[]{\@todonotes@prependcaptiontrue}%
+\define@key{todonotes}{noprepend}[]{\@todonotes@prependcaptionfalse}%
\newif\if@todonotes@line%
\define@key{todonotes}{line}[]{\@todonotes@linetrue}%
\define@key{todonotes}{noline}[]{\@todonotes@linefalse}%
@@ -104,29 +142,42 @@
\define@key{todonotes}{caption}%
{\renewcommand{\@todonotes@caption}{#1}%
\@todonotes@captiongiventrue}%
+\define@key{todonotes}{nocaption}[]{\@todonotes@captiongivenfalse}%
+\newcommand{\@todonotes@currentfigwidth}{\@todonotes@figwidth}
+\define@key{todonotes}%
+ {figwidth}{\renewcommand{\@todonotes@currentfigwidth}{#1}}
\presetkeys%
{todonotes}%
{linecolor=\@todonotes@linecolor,%
backgroundcolor=\@todonotes@backgroundcolor,%
bordercolor=\@todonotes@bordercolor,%
noinline,%
- line, list, size=\normalsize}{}%
-
+ nocaption,%
+ figwidth=\@todonotes@figwidth,%
+ line, list, size=\@todonotes@textsize}{}%
\if@todonotes@disabled%
\newcommand{\listoftodos}{}
- \newcommand{\todo}[2][]{\ignotespaces}
- \newcommand{\missingfigure}[1]{}
+ \newcommand{\todo}[2][]{\ignorespaces}
+ \newcommand{\missingfigure}[2]{}
\else % \if@todonotes@disabled
\newcommand{\listoftodos}
{\section*{\@todonotes@todolistname} \@starttoc{tdo}}
\newcommand{\l@todo}
{\@dottedtocline{1}{0em}{2.3em}}
-\tikzstyle{notestyle} = [
+\tikzstyle{notestyleraw} = [
draw=\@todonotes@currentbordercolor,
fill=\@todonotes@currentbackgroundcolor,
line width=0.5pt,
text width = \@todonotes@textwidth - 1.6 ex - 1pt,
- inner sep = 0.8 ex]
+ inner sep = 0.8 ex,
+ rounded corners=4pt]
+\if@todonotes@shadowenabled
+\tikzstyle{notestyle} = [notestyleraw,
+ general shadow={shadow xshift=.5ex, shadow yshift=-.5ex,
+ opacity=1,fill=black!50}]
+\else
+\tikzstyle{notestyle} = [notestyleraw]
+\fi
\tikzstyle{notestyleleft} = [
notestyle,
left]
@@ -137,9 +188,15 @@
notestyle,
text width=\linewidth - 1.6 ex - 1 pt]
\newcommand{\todo}[2][]{%
+\if@todonotes@prependcaptionglobal%
+\@todonotes@prependcaptiontrue%
+\else%
+\@todonotes@prependcaptionfalse%
+\fi%
\renewcommand{\@todonotes@text}{#2}%
\renewcommand{\@todonotes@caption}{#2}%
\setkeys{todonotes}{#1}%
+\addtocounter{@todonotes@numberoftodonotes}{1}%
\if@todonotes@appendtolistoftodos%
\phantomsection%
\if@todonotes@captiongiven%
@@ -149,17 +206,17 @@
\if@todonotes@colorinlistoftodos%
\addcontentsline{tdo}{todo}{\protect{%
\colorbox{\@todonotes@currentbackgroundcolor}%
- {\textcolor{\@todonotes@currentbackgroundcolor}{o}} %
+ {\textcolor{\@todonotes@currentbackgroundcolor}{o}}%
\@todonotes@caption}}%
\else%
\addcontentsline{tdo}{todo}{\protect{\@todonotes@caption}}%
\fi%
\fi%
-\if@todonotes@captiongiven
- \if@todonotes@prependcaption
- \renewcommand{\@todonotes@text}{\@todonotes@caption: #2}
- \fi
-\fi
+\if@todonotes@captiongiven%
+ \if@todonotes@prependcaption%
+ \renewcommand{\@todonotes@text}{\@todonotes@caption: #2}%
+ \fi%
+\fi%
\if@todonotes@inlinenote%
\if@todonotes@dviStyle%
{\par\noindent\begin{tikzpicture}[remember picture]%
@@ -169,8 +226,7 @@
\draw node[inlinenotestyle] {};\end{tikzpicture}\par}%
\else%
{\par\noindent\begin{tikzpicture}[remember picture]%
- \draw node[inlinenotestyle] {\@todonotes@sizecommand
-\@todonotes@text};%
+ \draw node[inlinenotestyle] {\@todonotes@sizecommand \@todonotes@text};%
\end{tikzpicture}\par}%
\fi%
\else%
@@ -231,14 +287,16 @@
\fi%
\ignorespaces%
}%
-\newcommand{\missingfigure}[1]{
-\addcontentsline{tdo}{todo}{Figure: \protect{#1}}%
+\newcommand{\missingfigure}[2][]{
+\setkeys{todonotes}{#1}%
+\addcontentsline{tdo}{todo}{\@todonotes@MissingFigureText: \protect{#2}}%
\par
\noindent
\begin{tikzpicture}
\draw[fill=black!40, draw = white, line width=0pt]
- (-3, -2.5) rectangle +(\textwidth, 4cm);
-\draw (3, 0) node[right, text width=4cm] {#1};
+ (-2, -2.5) rectangle +(\@todonotes@currentfigwidth, 4cm);
+\draw (2, -0.3) node[right, text
+ width=\@todonotes@currentfigwidth-4.5cm] {#2};
\draw[red, fill=white, rounded corners = 5pt, line width=10pt]
(30:2cm) -- (150:2cm) -- (270:2cm) -- cycle;
\draw (0, 0.3) node {\@todonotes@MissingFigureUp};