diff options
author | Karl Berry <karl@freefriends.org> | 2008-09-16 18:27:05 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-09-16 18:27:05 +0000 |
commit | ed76d6be902b9c6ce0bf4a373ce44f48137d7529 (patch) | |
tree | d05f5cf6869b37ef1ffa46cd10ec20873697ce29 /Master/texmf-dist/tex/latex/todonotes | |
parent | 42d691218d8edd24d57cf2ba6406037635be7946 (diff) |
todonotes (15sep08)
git-svn-id: svn://tug.org/texlive/trunk@10614 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/todonotes')
-rw-r--r-- | Master/texmf-dist/tex/latex/todonotes/todonotes.sty | 128 |
1 files changed, 64 insertions, 64 deletions
diff --git a/Master/texmf-dist/tex/latex/todonotes/todonotes.sty b/Master/texmf-dist/tex/latex/todonotes/todonotes.sty index 087c6947da5..daf11d2d0fd 100644 --- a/Master/texmf-dist/tex/latex/todonotes/todonotes.sty +++ b/Master/texmf-dist/tex/latex/todonotes/todonotes.sty @@ -22,112 +22,112 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{todonotes} - [2008/08/11 .dtx Todonotes source and documentation.] -\ProvidesPackage{todonotes}[2008/08/11] + [2008/09/15 .dtx Todonotes source and documentation.] +\ProvidesPackage{todonotes}[2008/09/15] \RequirePackage{ifthen} \RequirePackage{xkeyval} \RequirePackage{hyperref} \RequirePackage{xcolor} \RequirePackage{tikz} \RequirePackage{calc} -\newcommand{\@backgroundcolor}{orange} -\newcommand{\@bordercolor}{black} -\newcommand{\@textwidth}{\marginparwidth} +\newcommand{\@todonotes@backgroundcolor}{orange} +\newcommand{\@todonotes@bordercolor}{black} +\newcommand{\@todonotes@textwidth}{\marginparwidth} -\newif{\ifdisabled} -\DeclareOptionX{disable}{\disabledtrue} -\newif{\ifcolorinlistoftodos} -\DeclareOptionX{colorinlistoftodos}{\colorinlistoftodostrue} -\newif{\ifdviStyle} -\DeclareOptionX{dvistyle}{\dviStyletrue} +\newif{\if@todonotes@disabled} +\DeclareOptionX{disable}{\@todonotes@disabledtrue} +\newif{\if@todonotes@colorinlistoftodos} +\DeclareOptionX{colorinlistoftodos}{\@todonotes@colorinlistoftodostrue} +\newif{\if@todonotes@dviStyle} +\DeclareOptionX{dvistyle}{\@todonotes@dviStyletrue} \define@key{todonotes.sty}% - {color}{\renewcommand{\@backgroundcolor}{#1}} + {color}{\renewcommand{\@todonotes@backgroundcolor}{#1}} \define@key{todonotes.sty}% - {bordercolor}{\renewcommand{\@bordercolor}{#1}} + {bordercolor}{\renewcommand{\@todonotes@bordercolor}{#1}} \define@key{todonotes.sty}% - {textwidth}{\renewcommand{\@textwidth}{#1}} + {textwidth}{\renewcommand{\@todonotes@textwidth}{#1}} \ProcessOptionsX -\newcommand{\fillcolor}{}% -\define@key{todonotes}{color}{\renewcommand{\fillcolor}{#1}}% -\newcommand{\sizecommand}{}% -\define@key{todonotes}{size}{\renewcommand{\sizecommand}{#1}}% -\newif\ifappendtolistoftodos% -\define@key{todonotes}{list}[]{\appendtolistoftodostrue}% -\define@key{todonotes}{nolist}[]{\appendtolistoftodosfalse}% -\newif\ifinlinenote% -\define@key{todonotes}{inline}[]{\inlinenotetrue}% -\define@key{todonotes}{noinline}[]{\inlinenotefalse}% -\newif\ifline% -\define@key{todonotes}{line}[]{\linetrue}% -\define@key{todonotes}{noline}[]{\linefalse}% +\newcommand{\@todonotes@fillcolor}{}% +\define@key{todonotes}{color}{\renewcommand{\@todonotes@fillcolor}{#1}}% +\newcommand{\@todonotes@sizecommand}{}% +\define@key{todonotes}{size}{\renewcommand{\@todonotes@sizecommand}{#1}}% +\newif\if@todonotes@appendtolistoftodos% +\define@key{todonotes}{list}[]{\@todonotes@appendtolistoftodostrue}% +\define@key{todonotes}{nolist}[]{\@todonotes@appendtolistoftodosfalse}% +\newif\if@todonotes@inlinenote% +\define@key{todonotes}{inline}[]{\@todonotes@inlinenotetrue}% +\define@key{todonotes}{noinline}[]{\@todonotes@inlinenotefalse}% +\newif\if@todonotes@line% +\define@key{todonotes}{line}[]{\@todonotes@linetrue}% +\define@key{todonotes}{noline}[]{\@todonotes@linefalse}% \presetkeys {todonotes} - {color=\@backgroundcolor, noinline, + {color=\@todonotes@backgroundcolor, noinline, line, list, size=\normalsize}{}% -\ifdisabled +\if@todonotes@disabled \newcommand{\listoftodos}{} \newcommand{\todo}[2][]{} \newcommand{\missingfigure}[1]{} -\else % \ifdisabled +\else % \if@todonotes@disabled \newcommand{\listoftodos} {\section*{Todo list} \@starttoc{tdo}} \newcommand{\l@todo} {\@dottedtocline{1}{0em}{2.3em}} -\tikzstyle{notestyle} = [draw=\@bordercolor, line width=0.5pt, - text width = \@textwidth - 1.6 ex - 1pt, inner sep = 0.8 ex] +\tikzstyle{notestyle} = [draw=\@todonotes@bordercolor, line width=0.5pt, + 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] \newcommand{\todo}[2][]{% \setkeys{todonotes}{#1}% -\ifappendtolistoftodos% +\if@todonotes@appendtolistoftodos% \phantomsection% - \ifcolorinlistoftodos% + \if@todonotes@colorinlistoftodos% \addcontentsline{tdo}{todo}{\protect{% - \colorbox{\fillcolor}{\textcolor{\fillcolor}{\tiny i}} % + \colorbox{\@todonotes@fillcolor}{\textcolor{\@todonotes@fillcolor}{\tiny i}} % #2}}% \else% \addcontentsline{tdo}{todo}{\protect{#2}}% \fi% \fi% -\ifinlinenote% - \ifdviStyle% +\if@todonotes@inlinenote% + \if@todonotes@dviStyle% {\par\noindent\tikz[remember picture] \draw node[inlinenotestyle, % - fill=\fillcolor] {};\par}% - {\noindent \sizecommand #2}% + fill=\@todonotes@fillcolor] {};\par}% + {\noindent \@todonotes@sizecommand #2}% {\par\noindent\tikz[remember picture] \draw node[inlinenotestyle, % - fill=\fillcolor] {};\par}% + fill=\@todonotes@fillcolor] {};\par}% \else% {\par\noindent\tikz[remember picture] \draw node[inlinenotestyle, % - fill=\fillcolor] {\sizecommand #2};\par}% + fill=\@todonotes@fillcolor] {\@todonotes@sizecommand #2};\par}% \fi% \else% \begin{tikzpicture}[remember picture, baseline=-0.75ex]% \node [coordinate] (inText) {};% \end{tikzpicture}% \marginpar[{% Draw note in left margin -\ifdviStyle% - \tikz[remember picture] \draw node[notestyle, fill=\fillcolor] {}; \\ % - \begin{minipage}{\@textwidth}% - \sizecommand #2% +\if@todonotes@dviStyle% + \tikz[remember picture] \draw node[notestyle, fill=\@todonotes@fillcolor] {}; \\ % + \begin{minipage}{\@todonotes@textwidth}% + \@todonotes@sizecommand #2% \end{minipage} \\% - \tikz[remember picture] \draw node[notestyle, fill=\fillcolor] (inNote) {};% - \ifline% + \tikz[remember picture] \draw node[notestyle, fill=\@todonotes@fillcolor] (inNote) {};% + \if@todonotes@line% \begin{tikzpicture}[remember picture, overlay]% - \draw[connectstyle, draw=\fillcolor]% + \draw[connectstyle, draw=\@todonotes@fillcolor]% ([yshift=-0.2cm] inText)% -| ([xshift=0.2cm] inNote.east)% -| (inNote.east);% \end{tikzpicture}% \fi% \else% - \tikz[remember picture] \draw node[notestyle, fill=\fillcolor] -(inNote) {\sizecommand #2};% - \ifline% + \tikz[remember picture] \draw node[notestyle, fill=\@todonotes@fillcolor] +(inNote) {\@todonotes@sizecommand #2};% + \if@todonotes@line% \begin{tikzpicture}[remember picture, overlay]% - \draw[connectstyle, draw=\fillcolor]% + \draw[connectstyle, draw=\@todonotes@fillcolor]% ([yshift=-0.2cm] inText)% -| ([xshift=0.2cm] inNote.east)% -| (inNote.east);% @@ -135,26 +135,26 @@ \fi% \fi% }]{% Draw note in right margin -\ifdviStyle% - \tikz[remember picture] \draw node[notestyle, fill=\fillcolor] {}; \\ % - \begin{minipage}{\@textwidth}% - \sizecommand #2% +\if@todonotes@dviStyle% + \tikz[remember picture] \draw node[notestyle, fill=\@todonotes@fillcolor] {}; \\ % + \begin{minipage}{\@todonotes@textwidth}% + \@todonotes@sizecommand #2% \end{minipage} \\% - \tikz[remember picture] \draw node[notestyle, fill=\fillcolor] (inNote) {};% - \ifline% + \tikz[remember picture] \draw node[notestyle, fill=\@todonotes@fillcolor] (inNote) {};% + \if@todonotes@line% \begin{tikzpicture}[remember picture, overlay]% - \draw[connectstyle, draw=\fillcolor]% + \draw[connectstyle, draw=\@todonotes@fillcolor]% ([yshift=-0.2cm] inText)% -| ([xshift=-0.2cm] inNote.west)% -| (inNote.west);% \end{tikzpicture}% \fi% \else% - \tikz[remember picture] \draw node[notestyle, fill=\fillcolor] -(inNote) {\sizecommand #2};% - \ifline% + \tikz[remember picture] \draw node[notestyle, fill=\@todonotes@fillcolor] +(inNote) {\@todonotes@sizecommand #2};% + \if@todonotes@line% \begin{tikzpicture}[remember picture, overlay]% - \draw[connectstyle, draw=\fillcolor]% + \draw[connectstyle, draw=\@todonotes@fillcolor]% ([yshift=-0.2cm] inText)% -| ([xshift=-0.2cm] inNote.west)% -| (inNote.west);% @@ -178,7 +178,7 @@ \draw (0, -0.3) node {figure}; \end{tikzpicture} }% Ending \missingfigure command -\fi % Ending \ifdisabled +\fi % Ending \@todonotes@ifdisabled \endinput %% %% End of file `todonotes.sty'. |