summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-11-25 23:24:03 +0000
committerKarl Berry <karl@freefriends.org>2012-11-25 23:24:03 +0000
commit56c00847bbaa3a4973a9409f0cd23390c888a2c7 (patch)
treed2863be785b6af22295ee293002af91ef557fc97 /Master
parenteaed2ec0b95d86d210e6e2a8cc408b791146acda (diff)
todonotes (25nov12)
git-svn-id: svn://tug.org/texlive/trunk@28362 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/todonotes/todonotes.pdfbin353869 -> 356652 bytes
-rw-r--r--Master/texmf-dist/doc/latex/todonotes/todonotesexample.pdfbin49077 -> 49077 bytes
-rw-r--r--Master/texmf-dist/source/latex/todonotes/todonotes.dtx98
-rw-r--r--Master/texmf-dist/tex/latex/todonotes/todonotes.sty44
4 files changed, 98 insertions, 44 deletions
diff --git a/Master/texmf-dist/doc/latex/todonotes/todonotes.pdf b/Master/texmf-dist/doc/latex/todonotes/todonotes.pdf
index b98419fac11..9fc990a55c6 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 5616077f1e8..714b921028c 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/source/latex/todonotes/todonotes.dtx b/Master/texmf-dist/source/latex/todonotes/todonotes.dtx
index 3dba6d63659..182369d8727 100644
--- a/Master/texmf-dist/source/latex/todonotes/todonotes.dtx
+++ b/Master/texmf-dist/source/latex/todonotes/todonotes.dtx
@@ -46,7 +46,7 @@
%</driver>
% \fi
%
-% \CheckSum{559}
+% \CheckSum{570}
%
% \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
@@ -169,6 +169,9 @@
% Added todoin command as suggested by Stefan Pinnow.
% Described how to use tikz externalize with todonotes.
% Added obeyDraft and obeyFinal options.}
+% \changes{1.0.1}{2012/11/24}{Fix spacing issues reported by Jonathan Zachhuber and
+% Brent Longborough.
+% Added figheight option to the missingfigure command as suggested by Kim Albertsson.}
% \GetFileInfo{todonotes.dtx}
%
% \DoNotIndex{\newcommand,\newenvironment}
@@ -532,6 +535,15 @@
% \end{wrapfigure}
% \end{verbatim}
%
+% \DescribeMacro{figheight}
+% The |figheight=length| option changes the height of the inserted
+% missing figure.
+% The default height is 4cm and using values lower than this might
+% cause the warning sign to pop out of the gray area.
+% \begin{verbatim}
+% \missingfigure[figheight=6cm]{Testing a long text string}
+% \end{verbatim}
+% \missingfigure[figheight=6cm]{Testing}
%
%
% \subsection{Options for the listoftodos command}
@@ -564,7 +576,14 @@
% packages, you have to load them \emph{before} the todonotes
% package, otherwise you will get an ''Option clash'' error when
% latex works on the document.
-%
+%
+% If both the menukeys and the xcolor (with the option \verb!table!)
+% package should be loaded, the following order must be used.
+% \begin{verbatim}
+%\usepackage[table]{xcolor}
+%\usepackage{todonotes}
+%\usepackage{menukeys}
+% \end{verbatim}
%
% \subsubsection{Wrapping of long lines in list of todos}
% When a document is compiled with latex (and not pdflatex) long
@@ -584,7 +603,21 @@
% \makeatother
% \listoftodos\relax
% \end{verbatim}
-%
+%
+% NOT TESTED
+% NOT TESTED
+% NOT TESTED
+%
+% Dominique suggests the following workaround.
+% \begin{verbatim}
+% \makeatletter
+% \providecommand\@dotsep{5}
+% \def\listtodoname{List of Todos}
+% \def\listoftodos{\@starttoc{tdo}\listtodoname}
+% \makeatother
+% \end{verbatim}
+%
+%
%
% \subsubsection{Unknown option ''remember picture''}
% If latex throws the error
@@ -613,6 +646,15 @@
% When this command is issued the following marginpars (which todonotes
% relies on) is inserted in the other margin.
%
+% \subsubsection{Reduce number of warnings}
+% If the width of the inserted todonotes is forced to be larger than the
+% available space in the margin, a lot of warnings are issued.
+% This can be reduced with the following code.
+% \begin{verbatim}
+% \usepackage[textwidth=3.7cm]{todonotes}
+% \setlength{\marginparwidth}{3.7cm}
+% \end{verbatim}
+%
%
% \subsubsection{Todonotes in footnotes}
% Placing todonotes in footnotes throws a lot of errors.
@@ -880,10 +922,10 @@
%
% To streamline use the following command was suggested by Stefan Pinnow.
% \newcommand\todoin[2][]{\todo[inline, caption={2do}, #1]{
-% \begin{minipage}{\textwidth-4pt}
#2
\end{minipage}}}
+% \begin{minipage}{\textwidth-4pt}#2\end{minipage}}}
% \begin{verbatim}
% \newcommand\todoin[2][]{\todo[inline, caption={2do}, #1]{
-% \begin{minipage}{\textwidth-4pt}
#2
\end{minipage}}}
+% \begin{minipage}{\textwidth-4pt}#2\end{minipage}}}
% \end{verbatim}
% This example renders like
% \begin{verbatim}
@@ -1054,6 +1096,7 @@
\newcommand{\@todonotes@textwidth}{\marginparwidth}
\newcommand{\@todonotes@textsize}{\normalsize}
\newcommand{\@todonotes@figwidth}{\columnwidth}
+\newcommand{\@todonotes@figheight}{4cm}
% \end{macrocode}
% \begin{macrocode}
\AtBeginDocument{
@@ -1242,6 +1285,8 @@
% \begin{macrocode}
\define@key{todonotes.sty}%
{figwidth}{\renewcommand{\@todonotes@figwidth}{#1}}
+\define@key{todonotes.sty}%
+ {figheight}{\renewcommand{\@todonotes@figheight}{#1}}
% \end{macrocode}
% Make the text width as an option.
% \begin{macrocode}
@@ -1354,11 +1399,14 @@
\@todonotes@captiongiventrue}%
\define@key{todonotes}{nocaption}[]{\@todonotes@captiongivenfalse}%
% \end{macrocode}
-% Change the current figure width.
+% Change the current figure width and height.
% \begin{macrocode}
\newcommand{\@todonotes@currentfigwidth}{\@todonotes@figwidth}
\define@key{todonotes}%
{figwidth}{\renewcommand{\@todonotes@currentfigwidth}{#1}}
+\newcommand{\@todonotes@currentfigheight}{\@todonotes@figheight}
+\define@key{todonotes}%
+ {figheight}{\renewcommand{\@todonotes@currentfigheight}{#1}}
% \end{macrocode}
% Preset values of the options
% \begin{macrocode}
@@ -1373,6 +1421,7 @@
nocaption,%
noauthor,%
figwidth=\@todonotes@figwidth,%
+ figheight=\@todonotes@figheight,%
line, list, size=\@todonotes@textsize}{}%
% \end{macrocode}
% \subsection{The main code part}
@@ -1382,7 +1431,7 @@
% \begin{macrocode}
\if@todonotes@disabled%
\newcommand{\listoftodos}[1][]{}
- \newcommand{\@todo}[2][]{\ignorespaces}
+ \newcommand{\@todo}[2][]{}
\newcommand{\missingfigure}[2][]{}
\else % \if@todonotes@disabled
% \end{macrocode}
@@ -1390,7 +1439,7 @@
% appearance of the list of todos.
% \begin{macrocode}
\newcommand{\listoftodos}[1][\@todonotes@todolistname]
- {\ifdefined\chapter\chapter*{#1}\else\section*{#1}\fi \@starttoc{tdo}}
+ {\@ifundefined{chapter}{\section*{#1}}{\chapter*{#1}} \@starttoc{tdo}}
\newcommand{\l@todo}
{\@dottedtocline{1}{0em}{2.3em}}
% \end{macrocode}
@@ -1459,7 +1508,7 @@
\else%
\renewcommand{\@todonotes@caption}{#2}%
\fi%
- \@todonotes@addElementToListOfTodos
+ \@todonotes@addElementToListOfTodos%
\fi%
% \end{macrocode}
% Prepend the short caption given if it is requested
@@ -1474,12 +1523,11 @@
% marginpar), below is the code for the inline placement.
% \begin{macrocode}
\if@todonotes@inlinenote%
- \@todonotes@drawInlineNote
+ \@todonotes@drawInlineNote%
\else%
- \@todonotes@drawMarginNoteWithLine
-\fi %\if@todonotes@inlinenote
-\fi %\if@todonotes@localdisable
-\ignorespaces%
+ \@todonotes@drawMarginNoteWithLine%
+\fi%\if@todonotes@inlinenote
+\fi%\if@todonotes@localdisable
}%
% \end{macrocode}
% \end{macro}
@@ -1493,7 +1541,7 @@
% First is the current location in the document stored, this enables
% us later to connect this point with the inserted todonote.
% \begin{macrocode}
-\begin{tikzpicture}[remember picture, baseline=-0.75ex]%
+\begin{tikzpicture}[remember picture, overlay, baseline=-0.75ex]%
\node [coordinate] (inText) {};%
\end{tikzpicture}%
\marginpar[{% Draw note in left margin
@@ -1544,7 +1592,7 @@
\draw node[inlinenotestyle] {};\end{tikzpicture}\par}%
\else%
{\par\noindent\begin{tikzpicture}[remember picture]%
- \draw node[inlinenotestyle,font=\@todonotes@sizecommand] {%
+ \draw node[inlinenotestyle,font=\@todonotes@sizecommand]{%
\if@todonotes@authorgiven%
{\noindent \@todonotes@sizecommand \@todonotes@author:\,\@todonotes@text}%
\else%
@@ -1561,7 +1609,7 @@
\if@todonotes@dviStyle%
\begin{tikzpicture}[remember picture]%
\draw node[notestyle] {};%
- \end{tikzpicture}\\ %
+ \end{tikzpicture}\\%
\begin{minipage}{\@todonotes@textwidth}%
\if@todonotes@authorgiven%
\@todonotes@sizecommand \@todonotes@author \@todonotes@text%
@@ -1573,8 +1621,8 @@
\draw node[notestyle] (inNote) {};%
\end{tikzpicture}%
\else%
- \let\originalHbadness\hbadness
- \hbadness 100000
+ \let\originalHbadness\hbadness%
+ \hbadness 100000%
\begin{tikzpicture}[remember picture,baseline=(X.base)]%
\node(X){\vphantom{X}};%
\draw node[notestyle,font=\@todonotes@sizecommand,anchor=north] (inNote) at (X.north)%
@@ -1590,7 +1638,7 @@
{\@todonotes@text};%
\fi%
\end{tikzpicture}%
- \hbadness \originalHbadness
+ \hbadness \originalHbadness%
\fi}%
% \end{macrocode}
% \end{macro}
@@ -1616,14 +1664,14 @@
-| ([xshift=-0.2cm] inNote.west)%
-| (inNote.west);%
\end{tikzpicture}%
- \fi
+ \fi%
\fi}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{drawLineToLeftMargin}
% Define helper function |drawLineToLeftMargin|.
% \begin{macrocode}
-\newcommand{\@todonotes@drawLineToLeftMargin}{
+\newcommand{\@todonotes@drawLineToLeftMargin}{%
\if@todonotes@line%
\if@todonotes@fancyline%
\tikz[remember picture,overlay]{%
@@ -1643,7 +1691,7 @@
-| (inNote.east);%
\end{tikzpicture}%
\fi%
-\fi}
+\fi}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\missingfigure}
@@ -1656,7 +1704,7 @@
\noindent
\begin{tikzpicture}
\draw[fill=black!40, draw = white, line width=0pt]
- (-2, -2.5) rectangle +(\@todonotes@currentfigwidth, 4cm);
+ (-2, -2.5) rectangle +(\@todonotes@currentfigwidth, \@todonotes@currentfigheight);
\draw (2, -0.3) node[right, text
width=\@todonotes@currentfigwidth-4.5cm] {#2};
\draw[red, fill=white, rounded corners = 5pt, line width=10pt]
@@ -1686,7 +1734,7 @@
% \begin{macro}{\todo}
% Define the |\todo| command as a redirection to |\@todo|.
% \begin{macrocode}
-\newcommand{\todo}[2][]{\@todo[#1]{#2}}%
+\newcommand{\todo}[2][]{\@bsphack\@todo[#1]{#2}\@esphack\ignorespaces}%
% \end{macrocode}
% \end{macro}
% \appendix
diff --git a/Master/texmf-dist/tex/latex/todonotes/todonotes.sty b/Master/texmf-dist/tex/latex/todonotes/todonotes.sty
index dc45536e97a..b6276a32dd6 100644
--- a/Master/texmf-dist/tex/latex/todonotes/todonotes.sty
+++ b/Master/texmf-dist/tex/latex/todonotes/todonotes.sty
@@ -38,6 +38,7 @@
\newcommand{\@todonotes@textwidth}{\marginparwidth}
\newcommand{\@todonotes@textsize}{\normalsize}
\newcommand{\@todonotes@figwidth}{\columnwidth}
+\newcommand{\@todonotes@figheight}{4cm}
\AtBeginDocument{
\ifx\undefined\phantomsection
\newcommand{\phantomsection}{}
@@ -158,6 +159,8 @@
\usetikzlibrary{shadows}}
\define@key{todonotes.sty}%
{figwidth}{\renewcommand{\@todonotes@figwidth}{#1}}
+\define@key{todonotes.sty}%
+ {figheight}{\renewcommand{\@todonotes@figheight}{#1}}
\ProcessOptionsX*
\if@todonotes@disabled
\else
@@ -222,6 +225,9 @@
\newcommand{\@todonotes@currentfigwidth}{\@todonotes@figwidth}
\define@key{todonotes}%
{figwidth}{\renewcommand{\@todonotes@currentfigwidth}{#1}}
+\newcommand{\@todonotes@currentfigheight}{\@todonotes@figheight}
+\define@key{todonotes}%
+ {figheight}{\renewcommand{\@todonotes@currentfigheight}{#1}}
\presetkeys%
{todonotes}%
{linecolor=\@todonotes@linecolor,%
@@ -233,14 +239,15 @@
nocaption,%
noauthor,%
figwidth=\@todonotes@figwidth,%
+ figheight=\@todonotes@figheight,%
line, list, size=\@todonotes@textsize}{}%
\if@todonotes@disabled%
\newcommand{\listoftodos}[1][]{}
- \newcommand{\@todo}[2][]{\ignorespaces}
+ \newcommand{\@todo}[2][]{}
\newcommand{\missingfigure}[2][]{}
\else % \if@todonotes@disabled
\newcommand{\listoftodos}[1][\@todonotes@todolistname]
- {\ifdefined\chapter\chapter*{#1}\else\section*{#1}\fi \@starttoc{tdo}}
+ {\@ifundefined{chapter}{\section*{#1}}{\chapter*{#1}} \@starttoc{tdo}}
\newcommand{\l@todo}
{\@dottedtocline{1}{0em}{2.3em}}
\tikzstyle{notestyleraw} = [
@@ -284,7 +291,7 @@
\else%
\renewcommand{\@todonotes@caption}{#2}%
\fi%
- \@todonotes@addElementToListOfTodos
+ \@todonotes@addElementToListOfTodos%
\fi%
\if@todonotes@captiongiven%
\if@todonotes@prependcaption%
@@ -292,15 +299,14 @@
\fi%
\fi%
\if@todonotes@inlinenote%
- \@todonotes@drawInlineNote
+ \@todonotes@drawInlineNote%
\else%
- \@todonotes@drawMarginNoteWithLine
-\fi %\if@todonotes@inlinenote
-\fi %\if@todonotes@localdisable
-\ignorespaces%
+ \@todonotes@drawMarginNoteWithLine%
+\fi%\if@todonotes@inlinenote
+\fi%\if@todonotes@localdisable
}%
\newcommand{\@todonotes@drawMarginNoteWithLine}{%
-\begin{tikzpicture}[remember picture, baseline=-0.75ex]%
+\begin{tikzpicture}[remember picture, overlay, baseline=-0.75ex]%
\node [coordinate] (inText) {};%
\end{tikzpicture}%
\marginpar[{% Draw note in left margin
@@ -333,7 +339,7 @@
\draw node[inlinenotestyle] {};\end{tikzpicture}\par}%
\else%
{\par\noindent\begin{tikzpicture}[remember picture]%
- \draw node[inlinenotestyle,font=\@todonotes@sizecommand] {%
+ \draw node[inlinenotestyle,font=\@todonotes@sizecommand]{%
\if@todonotes@authorgiven%
{\noindent \@todonotes@sizecommand \@todonotes@author:\,\@todonotes@text}%
\else%
@@ -345,7 +351,7 @@
\if@todonotes@dviStyle%
\begin{tikzpicture}[remember picture]%
\draw node[notestyle] {};%
- \end{tikzpicture}\\ %
+ \end{tikzpicture}\\%
\begin{minipage}{\@todonotes@textwidth}%
\if@todonotes@authorgiven%
\@todonotes@sizecommand \@todonotes@author \@todonotes@text%
@@ -357,8 +363,8 @@
\draw node[notestyle] (inNote) {};%
\end{tikzpicture}%
\else%
- \let\originalHbadness\hbadness
- \hbadness 100000
+ \let\originalHbadness\hbadness%
+ \hbadness 100000%
\begin{tikzpicture}[remember picture,baseline=(X.base)]%
\node(X){\vphantom{X}};%
\draw node[notestyle,font=\@todonotes@sizecommand,anchor=north] (inNote) at (X.north)%
@@ -374,7 +380,7 @@
{\@todonotes@text};%
\fi%
\end{tikzpicture}%
- \hbadness \originalHbadness
+ \hbadness \originalHbadness%
\fi}%
\newcommand{\@todonotes@drawLineToRightMargin}{%
\if@todonotes@line%
@@ -395,9 +401,9 @@
-| ([xshift=-0.2cm] inNote.west)%
-| (inNote.west);%
\end{tikzpicture}%
-\fi
+\fi%
\fi}%
-\newcommand{\@todonotes@drawLineToLeftMargin}{
+\newcommand{\@todonotes@drawLineToLeftMargin}{%
\if@todonotes@line%
\if@todonotes@fancyline%
\tikz[remember picture,overlay]{%
@@ -417,7 +423,7 @@
-| (inNote.east);%
\end{tikzpicture}%
\fi%
-\fi}
+\fi}%
\newcommand{\missingfigure}[2][]{%
\setkeys{todonotes}{#1}%
\addcontentsline{tdo}{todo}{\@todonotes@MissingFigureText: #2}%
@@ -425,7 +431,7 @@
\noindent
\begin{tikzpicture}
\draw[fill=black!40, draw = white, line width=0pt]
- (-2, -2.5) rectangle +(\@todonotes@currentfigwidth, 4cm);
+ (-2, -2.5) rectangle +(\@todonotes@currentfigwidth, \@todonotes@currentfigheight);
\draw (2, -0.3) node[right, text
width=\@todonotes@currentfigwidth-4.5cm] {#2};
\draw[red, fill=white, rounded corners = 5pt, line width=10pt]
@@ -442,7 +448,7 @@
\addcontentsline{toc}{\@ifundefined{chapter}{section}{chapter}}{\@todonotes@todolistname}
\fi
}
-\newcommand{\todo}[2][]{\@todo[#1]{#2}}%
+\newcommand{\todo}[2][]{\@bsphack\@todo[#1]{#2}\@esphack\ignorespaces}%
\endinput
%%
%% End of file `todonotes.sty'.