summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-10-26 15:40:26 +0000
committerKarl Berry <karl@freefriends.org>2008-10-26 15:40:26 +0000
commitd8e34c095c3416f709b61aeec497806cf99813e6 (patch)
tree79ac082e69bd1ffe36aa4ca7b9a3518ef7b00971 /Master/texmf-dist/tex/latex
parent244133e201557e3a62cb74c3b87db589300c124f (diff)
todonotes update (23oct08)
git-svn-id: svn://tug.org/texlive/trunk@11060 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/todonotes/todonotes.sty59
1 files changed, 40 insertions, 19 deletions
diff --git a/Master/texmf-dist/tex/latex/todonotes/todonotes.sty b/Master/texmf-dist/tex/latex/todonotes/todonotes.sty
index daf11d2d0fd..abdc491773e 100644
--- a/Master/texmf-dist/tex/latex/todonotes/todonotes.sty
+++ b/Master/texmf-dist/tex/latex/todonotes/todonotes.sty
@@ -22,8 +22,9 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{todonotes}
- [2008/09/15 .dtx Todonotes source and documentation.]
-\ProvidesPackage{todonotes}[2008/09/15]
+ [2008/10/24 .dtx Todonotes source and documentation.]
+
+\ProvidesPackage{todonotes}[2008/10/24]
\RequirePackage{ifthen}
\RequirePackage{xkeyval}
\RequirePackage{hyperref}
@@ -61,6 +62,11 @@
\newif\if@todonotes@line%
\define@key{todonotes}{line}[]{\@todonotes@linetrue}%
\define@key{todonotes}{noline}[]{\@todonotes@linefalse}%
+\newcommand{\@todonotes@caption}{}%
+\newif\if@todonotes@captiongiven%
+\define@key{todonotes}{caption}%
+{\renewcommand{\@todonotes@caption}{#1}%
+\@todonotes@captiongiventrue}%
\presetkeys
{todonotes}
{color=\@todonotes@backgroundcolor, noinline,
@@ -79,29 +85,34 @@
text width = \@todonotes@textwidth - 1.6 ex - 1pt, inner sep = 0.8 ex]
\tikzstyle{notestyleleft} = [notestyle, left]
\tikzstyle{connectstyle} = [thick]
-\tikzstyle{inlinenotestyle} = [notestyle, text width=\textwidth - 1.6 ex - 1 pt]
+\tikzstyle{inlinenotestyle} = [notestyle, text width=\linewidth - 1.6 ex - 1 pt]
\newcommand{\todo}[2][]{%
+\renewcommand{\@todonotes@caption}{#2}%
\setkeys{todonotes}{#1}%
\if@todonotes@appendtolistoftodos%
\phantomsection%
+\if@todonotes@captiongiven%
+\else%
+\renewcommand{\@todonotes@caption}{#2}
+\fi%
\if@todonotes@colorinlistoftodos%
\addcontentsline{tdo}{todo}{\protect{%
\colorbox{\@todonotes@fillcolor}{\textcolor{\@todonotes@fillcolor}{\tiny i}} %
- #2}}%
+ \@todonotes@caption}}%
\else%
- \addcontentsline{tdo}{todo}{\protect{#2}}%
+ \addcontentsline{tdo}{todo}{\protect{\@todonotes@caption}}%
\fi%
\fi%
\if@todonotes@inlinenote%
\if@todonotes@dviStyle%
- {\par\noindent\tikz[remember picture] \draw node[inlinenotestyle, %
- fill=\@todonotes@fillcolor] {};\par}%
+ {\par\noindent\begin{tikzpicture}[remember picture] \draw node[inlinenotestyle, %
+ fill=\@todonotes@fillcolor] {};\end{tikzpicture}\par}%
{\noindent \@todonotes@sizecommand #2}%
- {\par\noindent\tikz[remember picture] \draw node[inlinenotestyle, %
- fill=\@todonotes@fillcolor] {};\par}%
+ {\par\noindent\begin{tikzpicture}[remember picture] \draw node[inlinenotestyle, %
+ fill=\@todonotes@fillcolor] {};\end{tikzpicture}\par}%
\else%
- {\par\noindent\tikz[remember picture] \draw node[inlinenotestyle, %
- fill=\@todonotes@fillcolor] {\@todonotes@sizecommand #2};\par}%
+ {\par\noindent\begin{tikzpicture}[remember picture] \draw node[inlinenotestyle, %
+ fill=\@todonotes@fillcolor] {\@todonotes@sizecommand #2};\end{tikzpicture}\par}%
\fi%
\else%
\begin{tikzpicture}[remember picture, baseline=-0.75ex]%
@@ -109,11 +120,15 @@
\end{tikzpicture}%
\marginpar[{% Draw note in left margin
\if@todonotes@dviStyle%
- \tikz[remember picture] \draw node[notestyle, fill=\@todonotes@fillcolor] {}; \\ %
+ \begin{tikzpicture}[remember picture] %
+\draw node[notestyle, fill=\@todonotes@fillcolor] {}; %
+\end{tikzpicture}\\ %
\begin{minipage}{\@todonotes@textwidth}%
\@todonotes@sizecommand #2%
\end{minipage} \\%
- \tikz[remember picture] \draw node[notestyle, fill=\@todonotes@fillcolor] (inNote) {};%
+ \begin{tikzpicture}[remember picture] %
+\draw node[notestyle, fill=\@todonotes@fillcolor] (inNote) {};%
+\end{tikzpicture}%
\if@todonotes@line%
\begin{tikzpicture}[remember picture, overlay]%
\draw[connectstyle, draw=\@todonotes@fillcolor]%
@@ -123,8 +138,10 @@
\end{tikzpicture}%
\fi%
\else%
- \tikz[remember picture] \draw node[notestyle, fill=\@todonotes@fillcolor]
-(inNote) {\@todonotes@sizecommand #2};%
+ \begin{tikzpicture}[remember picture] %
+\draw node[notestyle, fill=\@todonotes@fillcolor] (inNote) %
+{\@todonotes@sizecommand #2}; %
+\end{tikzpicture}%
\if@todonotes@line%
\begin{tikzpicture}[remember picture, overlay]%
\draw[connectstyle, draw=\@todonotes@fillcolor]%
@@ -136,11 +153,15 @@
\fi%
}]{% Draw note in right margin
\if@todonotes@dviStyle%
- \tikz[remember picture] \draw node[notestyle, fill=\@todonotes@fillcolor] {}; \\ %
+ \begin{tikzpicture}[remember picture] %
+\draw node[notestyle, fill=\@todonotes@fillcolor] {}; %
+\end{tikzpicture} \\ %
\begin{minipage}{\@todonotes@textwidth}%
\@todonotes@sizecommand #2%
\end{minipage} \\%
- \tikz[remember picture] \draw node[notestyle, fill=\@todonotes@fillcolor] (inNote) {};%
+ \begin{tikzpicture}[remember picture] %
+\draw node[notestyle, fill=\@todonotes@fillcolor] (inNote) {};%
+\end{tikzpicture} %
\if@todonotes@line%
\begin{tikzpicture}[remember picture, overlay]%
\draw[connectstyle, draw=\@todonotes@fillcolor]%
@@ -150,8 +171,8 @@
\end{tikzpicture}%
\fi%
\else%
- \tikz[remember picture] \draw node[notestyle, fill=\@todonotes@fillcolor]
-(inNote) {\@todonotes@sizecommand #2};%
+ \begin{tikzpicture}[remember picture] \draw node[notestyle, fill=\@todonotes@fillcolor]
+(inNote) {\@todonotes@sizecommand #2}; \end{tikzpicture}%
\if@todonotes@line%
\begin{tikzpicture}[remember picture, overlay]%
\draw[connectstyle, draw=\@todonotes@fillcolor]%