summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/todonotes
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-03-08 00:15:41 +0000
committerKarl Berry <karl@freefriends.org>2011-03-08 00:15:41 +0000
commitc6fbfe0da4a3e034e28c1395203b5607ee79149c (patch)
tree2c8607ad24ca7ed0dfa45a418d2ad7313e2c61eb /Master/texmf-dist/tex/latex/todonotes
parent3cd9c8be1dc12c3a8bf7c16323676c629ddc46a6 (diff)
todonotes (7mar11)
git-svn-id: svn://tug.org/texlive/trunk@21639 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/todonotes')
-rw-r--r--Master/texmf-dist/tex/latex/todonotes/todonotes.sty63
1 files changed, 46 insertions, 17 deletions
diff --git a/Master/texmf-dist/tex/latex/todonotes/todonotes.sty b/Master/texmf-dist/tex/latex/todonotes/todonotes.sty
index 0425ea9aeb5..2144bbf207e 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/26 .dtx Todonotes source and documentation.]
+ [2011/03/07 .dtx Todonotes source and documentation.]
-\ProvidesPackage{todonotes}[2010/09/26]
+\ProvidesPackage{todonotes}[2011/03/07]
\RequirePackage{ifthen}
\RequirePackage{xkeyval}
\RequirePackage{xcolor}
@@ -191,6 +191,9 @@
\newif\if@todonotes@line%
\define@key{todonotes}{line}[]{\@todonotes@linetrue}%
\define@key{todonotes}{noline}[]{\@todonotes@linefalse}%
+\newif\if@todonotes@fancyline\@todonotes@fancylinefalse%
+\define@key{todonotes}{fancyline}[]{\@todonotes@fancylinetrue}%
+\define@key{todonotes}{nofancyline}[]{\@todonotes@fancylinefalse}%
\newcommand{\@todonotes@caption}{}%
\newif\if@todonotes@captiongiven%
\define@key{todonotes}{caption}%
@@ -205,6 +208,7 @@
{linecolor=\@todonotes@linecolor,%
backgroundcolor=\@todonotes@backgroundcolor,%
bordercolor=\@todonotes@bordercolor,%
+ nofancyline,%
nodisable,%
noinline,%
nocaption,%
@@ -305,7 +309,7 @@
\draw node[inlinenotestyle] {};\end{tikzpicture}\par}%
\else%
{\par\noindent\begin{tikzpicture}[remember picture]%
- \draw node[inlinenotestyle] {\@todonotes@sizecommand \@todonotes@text};%
+ \draw node[inlinenotestyle,font=\@todonotes@sizecommand] {\@todonotes@text};%
\end{tikzpicture}\par}%
\fi}%
\newcommand{\@todonotes@drawMarginNote}{%
@@ -320,28 +324,53 @@
\draw node[notestyle] (inNote) {};%
\end{tikzpicture}%
\else%
- \begin{tikzpicture}[remember picture]%
- \draw node[notestyle] (inNote)%
- {\@todonotes@sizecommand \@todonotes@text};%
+ \begin{tikzpicture}[remember picture,baseline=(X.base)]%
+ \node(X){\vphantom{X}};%
+ \draw node[notestyle,font=\@todonotes@sizecommand,anchor=north] (inNote) at (X.north)%
+ {\@todonotes@text};%
\end{tikzpicture}%
\fi}%
\newcommand{\@todonotes@drawLineToRightMargin}{%
\if@todonotes@line%
+\if@todonotes@fancyline%
+\tikz[remember picture,overlay]{%
+\tikzstyle{both}=[line width=3pt, draw, opacity=0.15]%
+\tikzstyle{line}=[shorten >=5pt, line cap=round]%
+\tikzstyle{head}=[shorten >=-1pt, dash pattern=on 0pt off 1pt, ->]%
+\foreach \s in {line,head}{%
+\draw[both,\s]%
+(inNote.north west).. controls +(0:0) and +(90:1.5)..([yshift=1ex] inText);%
+};%
+}%
+\else%
\begin{tikzpicture}[remember picture, overlay]%
- \draw[connectstyle]%
- ([yshift=-0.2cm] inText)%
- -| ([xshift=-0.2cm] inNote.west)%
- -| (inNote.west);%
- \end{tikzpicture}%
+\draw[connectstyle]%
+([yshift=-0.2cm] inText)%
+-| ([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.east)%
- -| (inNote.east);%
- \end{tikzpicture}%
+\if@todonotes@fancyline%
+\tikz[remember picture,overlay]{%
+\tikzstyle{both}=[line width=3pt, draw, opacity=0.15]%
+\tikzstyle{line}=[shorten >=5pt, line cap=round]%
+\tikzstyle{head}=[shorten >=-1pt, dash pattern=on 0pt off 1pt,->]%
+\foreach \s in {line,head}{%
+\draw[both,\s]%
+(inNote.north east).. controls +(0:0) and +(90:1.5)..([yshift=1ex] inText);%
+};%
+}%
+\else%
+\begin{tikzpicture}[remember picture, overlay]%
+\draw[connectstyle]%
+([yshift=-0.2cm] inText)%
+-| ([xshift=0.2cm] inNote.east)%
+-| (inNote.east);%
+\end{tikzpicture}%
+\fi%
\fi}
\newcommand{\missingfigure}[2][]{
\setkeys{todonotes}{#1}%