summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/todonotes
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-09-27 00:39:06 +0000
committerKarl Berry <karl@freefriends.org>2010-09-27 00:39:06 +0000
commit3a7ed51293855b6db86b4ce41e7f2403cc02c774 (patch)
treeae29ed561be3d582e3f4c3d06dca866816e9efc7 /Master/texmf-dist/tex/latex/todonotes
parent6f75f25fe8d374ef4209118bd8849d742410ccd1 (diff)
todonotes 0.9.5 (26sep10)
git-svn-id: svn://tug.org/texlive/trunk@19905 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/todonotes')
-rw-r--r--Master/texmf-dist/tex/latex/todonotes/todonotes.sty95
1 files changed, 50 insertions, 45 deletions
diff --git a/Master/texmf-dist/tex/latex/todonotes/todonotes.sty b/Master/texmf-dist/tex/latex/todonotes/todonotes.sty
index fef33bf07db..0425ea9aeb5 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}
- [2010/09/13 .dtx Todonotes source and documentation.]
+ [2010/09/26 .dtx Todonotes source and documentation.]
-\ProvidesPackage{todonotes}[2010/09/13]
+\ProvidesPackage{todonotes}[2010/09/26]
\RequirePackage{ifthen}
\RequirePackage{xkeyval}
\RequirePackage{xcolor}
@@ -176,6 +176,9 @@
\renewcommand{\@todonotes@currentbordercolor}{#1}}%
\newcommand{\@todonotes@sizecommand}{}%
\define@key{todonotes}{size}{\renewcommand{\@todonotes@sizecommand}{#1}}%
+\newif\if@todonotes@localdisable%
+\define@key{todonotes}{disable}[]{\@todonotes@localdisabletrue}%
+\define@key{todonotes}{nodisable}[]{\@todonotes@localdisablefalse}%
\newif\if@todonotes@appendtolistoftodos%
\define@key{todonotes}{list}[]{\@todonotes@appendtolistoftodostrue}%
\define@key{todonotes}{nolist}[]{\@todonotes@appendtolistoftodosfalse}%
@@ -202,6 +205,7 @@
{linecolor=\@todonotes@linecolor,%
backgroundcolor=\@todonotes@backgroundcolor,%
bordercolor=\@todonotes@bordercolor,%
+ nodisable,%
noinline,%
nocaption,%
figwidth=\@todonotes@figwidth,%
@@ -247,6 +251,8 @@
\renewcommand{\@todonotes@text}{#2}%
\renewcommand{\@todonotes@caption}{#2}%
\setkeys{todonotes}{#1}%
+\if@todonotes@localdisable%
+\else%
\addtocounter{@todonotes@numberoftodonotes}{1}%
\if@todonotes@appendtolistoftodos%
\phantomsection%
@@ -254,14 +260,7 @@
\else%
\renewcommand{\@todonotes@caption}{#2}%
\fi%
- \if@todonotes@colorinlistoftodos%
- \addcontentsline{tdo}{todo}{\protect{%
- \colorbox{\@todonotes@currentbackgroundcolor}%
- {\textcolor{\@todonotes@currentbackgroundcolor}{o}}%
- \ \@todonotes@caption}}%
- \else%
- \addcontentsline{tdo}{todo}{\protect{\@todonotes@caption}}%
- \fi%
+ \@todonotes@addElementToListOfTodos
\fi%
\if@todonotes@captiongiven%
\if@todonotes@prependcaption%
@@ -269,6 +268,35 @@
\fi%
\fi%
\if@todonotes@inlinenote%
+ \@todonotes@drawInlineNote
+\else%
+ \@todonotes@drawMarginNoteWithLine
+\fi %\if@todonotes@inlinenote
+\fi %\if@todonotes@localdisable
+\ignorespaces%
+}%
+\newcommand{\@todonotes@drawMarginNoteWithLine}{%
+\begin{tikzpicture}[remember picture, baseline=-0.75ex]%
+ \node [coordinate] (inText) {};%
+\end{tikzpicture}%
+\marginpar[{% Draw note in left margin
+ \@todonotes@drawMarginNote%
+ \@todonotes@drawLineToLeftMargin%
+}]{% Draw note in right margin
+ \@todonotes@drawMarginNote%
+ \@todonotes@drawLineToRightMargin%
+}%
+}%
+\newcommand{\@todonotes@addElementToListOfTodos}{%
+ \if@todonotes@colorinlistoftodos%
+ \addcontentsline{tdo}{todo}{\protect{%
+ \colorbox{\@todonotes@currentbackgroundcolor}%
+ {\textcolor{\@todonotes@currentbackgroundcolor}{o}}%
+ \ \@todonotes@caption}}%
+ \else%
+ \addcontentsline{tdo}{todo}{\protect{\@todonotes@caption}}%
+ \fi}%
+\newcommand{\@todonotes@drawInlineNote}{%
\if@todonotes@dviStyle%
{\par\noindent\begin{tikzpicture}[remember picture]%
\draw node[inlinenotestyle] {};\end{tikzpicture}\par}%
@@ -279,12 +307,8 @@
{\par\noindent\begin{tikzpicture}[remember picture]%
\draw node[inlinenotestyle] {\@todonotes@sizecommand \@todonotes@text};%
\end{tikzpicture}\par}%
- \fi%
-\else%
-\begin{tikzpicture}[remember picture, baseline=-0.75ex]%
- \node [coordinate] (inText) {};%
-\end{tikzpicture}%
-\marginpar[{% Draw note in left margin
+ \fi}%
+\newcommand{\@todonotes@drawMarginNote}{%
\if@todonotes@dviStyle%
\begin{tikzpicture}[remember picture]%
\draw node[notestyle] {};%
@@ -300,44 +324,25 @@
\draw node[notestyle] (inNote)%
{\@todonotes@sizecommand \@todonotes@text};%
\end{tikzpicture}%
-\fi%
+\fi}%
+\newcommand{\@todonotes@drawLineToRightMargin}{%
\if@todonotes@line%
- \begin{tikzpicture}[remember picture, overlay]%
+\begin{tikzpicture}[remember picture, overlay]%
\draw[connectstyle]%
([yshift=-0.2cm] inText)%
- -| ([xshift=0.2cm] inNote.east)%
- -| (inNote.east);%
- \end{tikzpicture}%
-\fi%
-}]{% Draw note in right margin
-\if@todonotes@dviStyle%
- \begin{tikzpicture}[remember picture]%
- \draw node[notestyle] {};%
- \end{tikzpicture}\\%
- \begin{minipage}{\@todonotes@textwidth}%
- \@todonotes@sizecommand \@todonotes@text%
- \end{minipage}\\%
- \begin{tikzpicture}[remember picture]%
- \draw node[notestyle] (inNote) {};%
- \end{tikzpicture}%
-\else%
- \begin{tikzpicture}[remember picture]%
- \draw node[notestyle](inNote)%
- {\@todonotes@sizecommand \@todonotes@text};%
+ -| ([xshift=-0.2cm] inNote.west)%
+ -| (inNote.west);%
\end{tikzpicture}%
-\fi%
+\fi}%
+\newcommand{\@todonotes@drawLineToLeftMargin}{
\if@todonotes@line%
\begin{tikzpicture}[remember picture, overlay]%
\draw[connectstyle]%
([yshift=-0.2cm] inText)%
- -| ([xshift=-0.2cm] inNote.west)%
- -| (inNote.west);%
+ -| ([xshift=0.2cm] inNote.east)%
+ -| (inNote.east);%
\end{tikzpicture}%
-\fi%
-}%
-\fi%
-\ignorespaces%
-}%
+\fi}
\newcommand{\missingfigure}[2][]{
\setkeys{todonotes}{#1}%
\addcontentsline{tdo}{todo}{\@todonotes@MissingFigureText: \protect{#2}}%