From c6fbfe0da4a3e034e28c1395203b5607ee79149c Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 8 Mar 2011 00:15:41 +0000 Subject: todonotes (7mar11) git-svn-id: svn://tug.org/texlive/trunk@21639 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/latex/todonotes/todonotes.sty | 63 ++++++++++++++++------ 1 file changed, 46 insertions(+), 17 deletions(-) (limited to 'Master/texmf-dist/tex/latex/todonotes') 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}% -- cgit v1.2.3