summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/todonotes/todonotes.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/todonotes/todonotes.sty')
-rw-r--r--Master/texmf-dist/tex/latex/todonotes/todonotes.sty63
1 files changed, 47 insertions, 16 deletions
diff --git a/Master/texmf-dist/tex/latex/todonotes/todonotes.sty b/Master/texmf-dist/tex/latex/todonotes/todonotes.sty
index 6e6e391ec02..cd2ea8935d1 100644
--- a/Master/texmf-dist/tex/latex/todonotes/todonotes.sty
+++ b/Master/texmf-dist/tex/latex/todonotes/todonotes.sty
@@ -22,13 +22,14 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{todonotes}
- [2011/04/21 .dtx Todonotes source and documentation.]
+ [2011/10/22 .dtx Todonotes source and documentation.]
-\ProvidesPackage{todonotes}[2011/04/21]
+\ProvidesPackage{todonotes}[2011/10/22]
\RequirePackage{ifthen}
\RequirePackage{xkeyval}
\RequirePackage{xcolor}
\RequirePackage{tikz}
+\usetikzlibrary{positioning}
\RequirePackage{calc}
\newcommand{\@todonotes@text}{}%
\newcommand{\@todonotes@backgroundcolor}{orange}
@@ -115,7 +116,7 @@
\@todonotes@SetTodoListName{Lista de tareas pendientes}%
\@todonotes@SetMissingFigureText{Figura}%
\@todonotes@SetMissingFigureUp{Figura}%
- \@todonotes@SetMissingFigureDown{pendient}%
+ \@todonotes@SetMissingFigureDown{pendiente}%
}
\newcounter{@todonotes@numberoftodonotes}
\newif{\if@todonotes@obeyDraft}
@@ -194,6 +195,12 @@
\newif\if@todonotes@fancyline\@todonotes@fancylinefalse%
\define@key{todonotes}{fancyline}[]{\@todonotes@fancylinetrue}%
\define@key{todonotes}{nofancyline}[]{\@todonotes@fancylinefalse}%
+\newcommand{\@todonotes@author}{}%
+\newif\if@todonotes@authorgiven%
+\define@key{todonotes}{author}{%
+ \renewcommand{\@todonotes@author}{#1}%
+ \@todonotes@authorgiventrue}%
+\define@key{todonotes}{noauthor}[]{\@todonotes@authorgivenfalse}%
\newcommand{\@todonotes@caption}{}%
\newif\if@todonotes@captiongiven%
\define@key{todonotes}{caption}%
@@ -212,6 +219,7 @@
nodisable,%
noinline,%
nocaption,%
+ noauthor,%
figwidth=\@todonotes@figwidth,%
line, list, size=\@todonotes@textsize}{}%
\if@todonotes@disabled%
@@ -293,23 +301,32 @@
}%
\newcommand{\@todonotes@addElementToListOfTodos}{%
\if@todonotes@colorinlistoftodos%
- \addcontentsline{tdo}{todo}{\protect{%
+ \addcontentsline{tdo}{todo}{%
\colorbox{\@todonotes@currentbackgroundcolor}%
{\textcolor{\@todonotes@currentbackgroundcolor}{o}}%
- \ \@todonotes@caption}}%
+ \ \@todonotes@caption}%
\else%
- \addcontentsline{tdo}{todo}{\protect{\@todonotes@caption}}%
+ \addcontentsline{tdo}{todo}{\@todonotes@caption}%
\fi}%
\newcommand{\@todonotes@drawInlineNote}{%
\if@todonotes@dviStyle%
{\par\noindent\begin{tikzpicture}[remember picture]%
\draw node[inlinenotestyle] {};\end{tikzpicture}\par}%
- {\noindent \@todonotes@sizecommand \@todonotes@text}%
+ \if@todonotes@authorgiven%
+ {\noindent \@todonotes@sizecommand \@todonotes@author:\,\@todonotes@text}%
+ \else%
+ {\noindent \@todonotes@sizecommand \@todonotes@text}%
+ \fi
{\par\noindent\begin{tikzpicture}[remember picture]%
\draw node[inlinenotestyle] {};\end{tikzpicture}\par}%
\else%
{\par\noindent\begin{tikzpicture}[remember picture]%
- \draw node[inlinenotestyle,font=\@todonotes@sizecommand] {\@todonotes@text};%
+ \draw node[inlinenotestyle,font=\@todonotes@sizecommand] {%
+ \if@todonotes@authorgiven%
+ {\noindent \@todonotes@sizecommand \@todonotes@author:\,\@todonotes@text}%
+ \else%
+ {\noindent \@todonotes@sizecommand \@todonotes@text}%
+ \fi};%
\end{tikzpicture}\par}%
\fi}%
\newcommand{\@todonotes@drawMarginNote}{%
@@ -318,20 +335,34 @@
\draw node[notestyle] {};%
\end{tikzpicture}\\ %
\begin{minipage}{\@todonotes@textwidth}%
- \@todonotes@sizecommand \@todonotes@text%
+ \if@todonotes@authorgiven%
+ \@todonotes@sizecommand \@todonotes@author \@todonotes@text%
+ \else%
+ \@todonotes@sizecommand \@todonotes@text%
+ \fi%
\end{minipage}\\%
\begin{tikzpicture}[remember picture]%
\draw node[notestyle] (inNote) {};%
\end{tikzpicture}%
\else%
-\let\originalHbadness\hbadness
-\hbadness 100000
+ \let\originalHbadness\hbadness
+ \hbadness 100000
\begin{tikzpicture}[remember picture,baseline=(X.base)]%
- \node(X){\vphantom{X}};%
+ \node(X){\vphantom{X}};%
\draw node[notestyle,font=\@todonotes@sizecommand,anchor=north] (inNote) at (X.north)%
{\@todonotes@text};%
+ \if@todonotes@authorgiven%
+ \draw node[notestyle,font=\@todonotes@sizecommand,anchor=north] (inNote) at (X.north)%
+ {\@todonotes@sizecommand\@todonotes@author};%
+ \node(Y)[below=of X]{};%
+ \draw node[notestyle,font=\@todonotes@sizecommand,anchor=north] (inNote) at (X.south)%
+ {\@todonotes@text};%
+ \else%
+ \draw node[notestyle,font=\@todonotes@sizecommand,anchor=north] (inNote) at (X.north)%
+ {\@todonotes@text};%
+ \fi%
\end{tikzpicture}%
-\hbadness \originalHbadness
+ \hbadness \originalHbadness
\fi}%
\newcommand{\@todonotes@drawLineToRightMargin}{%
\if@todonotes@line%
@@ -375,9 +406,9 @@
\end{tikzpicture}%
\fi%
\fi}
-\newcommand{\missingfigure}[2][]{
+\newcommand{\missingfigure}[2][]{%
\setkeys{todonotes}{#1}%
-\addcontentsline{tdo}{todo}{\@todonotes@MissingFigureText: \protect{#2}}%
+\addcontentsline{tdo}{todo}{\@todonotes@MissingFigureText: #2}%
\par
\noindent
\begin{tikzpicture}
@@ -399,7 +430,7 @@
\addcontentsline{toc}{\@ifundefined{chapter}{section}{chapter}}{\@todonotes@todolistname}
\fi
}
-\newcommand{\todo}[2][]{\@todo[#1]{#2}}
+\newcommand{\todo}[2][]{\@todo[#1]{#2}}%
\endinput
%%
%% End of file `todonotes.sty'.