summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/lualatex/luatodonotes/luatodonotes.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/lualatex/luatodonotes/luatodonotes.sty')
-rw-r--r--Master/texmf-dist/tex/lualatex/luatodonotes/luatodonotes.sty45
1 files changed, 35 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/lualatex/luatodonotes/luatodonotes.sty b/Master/texmf-dist/tex/lualatex/luatodonotes/luatodonotes.sty
index 80d63967175..287a82183f2 100644
--- a/Master/texmf-dist/tex/lualatex/luatodonotes/luatodonotes.sty
+++ b/Master/texmf-dist/tex/lualatex/luatodonotes/luatodonotes.sty
@@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
-%% Copyright (C) 2014-2015 by Fabian Lipp <fabian.lipp@gmx.de>
+%% Copyright (C) 2014-2020 by Fabian Lipp <fabian.lipp@gmx.de>
%% based on the todonotes package by
%% Henrik Skov Midtiby <henrikmidtiby@gmail.com>
%%
@@ -24,7 +24,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{luatodonotes}
- [2017/09/30 v0.4 luatodonotes source and documentation.]
+ [2020/02/16 v0.5 luatodonotes source and documentation.]
\@ifpackageloaded{todonotes}{
\PackageError{luatodonotes}{%
@@ -280,13 +280,20 @@
\if@todonotes@additionalMarginEnabled
\newlength{\@todonotes@modpaperwidth}
\AfterEndPreamble{%
- \setlength{\@todonotes@modpaperwidth}{\paperwidth}%
- \addtolength{\@todonotes@modpaperwidth}{\@todonotes@additionalMargin}%
- \addtolength{\@todonotes@modpaperwidth}{\@todonotes@additionalMargin}%
- \pdfpagewidth=\@todonotes@modpaperwidth%
- \addtolength{\hoffset}{\@todonotes@additionalMargin}%
+ \@todonotes@setAdditionalMargin%
+ \ifdefined\Gm@changelayout
+ \g@addto@macro{\Gm@changelayout}{\@todonotes@setAdditionalMargin}
+ \fi
}%
\fi%
+\newcommand{\@todonotes@setAdditionalMargin}{
+ \setlength{\@todonotes@modpaperwidth}{\paperwidth}%
+ \addtolength{\@todonotes@modpaperwidth}{\@todonotes@additionalMargin}%
+ \addtolength{\@todonotes@modpaperwidth}{\@todonotes@additionalMargin}%
+ \ifdefined\pdfpagewidth\else\let\pdfpagewidth\pagewidth\fi
+ \pdfpagewidth=\@todonotes@modpaperwidth%
+ \addtolength{\hoffset}{\@todonotes@additionalMargin}%
+}
\newdimen\@todonotes@extractx
\newdimen\@todonotes@extracty
\newsavebox\@todonotes@heightcalcbox
@@ -315,6 +322,7 @@
\directlua{luatodonotes.setPositioningAlgo("\luatexluaescapestring{\@todonotes@positioning}")}
\directlua{luatodonotes.setSplittingAlgo("\luatexluaescapestring{\@todonotes@splitting}")}
\directlua{luatodonotes.setLeaderType("\luatexluaescapestring{\@todonotes@leadertype}")}
+\ifdefined\pdflastypos\else\let\pdflastypos\lastypos\fi
\def\@todonotes@pdflastypos{\the\pdflastypos}
\newcommand{\@todonotes@lineposition}[3]{%
\directlua{luatodonotes.linePositionsAddLine(#1,#2,#3)}%
@@ -336,6 +344,9 @@
\newcommand{\@todonotes@AtBeginShipoutUpperLeft}
{\AtBeginShipoutUpperLeft}
\fi
+\newcommand{\@todonotes@before@tikzpict}{\begingroup%
+ \ifdefined\tikzexternaldisable\tikzexternaldisable\fi}
+\newcommand{\@todonotes@after@tikzpict}{\endgroup}
\directlua{luatodonotes.initTodonotes()}
\soulregister{\ }{0}
\newlength{\todonotes@textmark@width}
@@ -366,6 +377,7 @@
{@todonotes@\arabic{@todonotes@numberoftodonotes}%
@\arabic{@todonotes@numberofLinesInArea} }%
\hspace*{\todonotes@textmark@shift}{\smash{%
+ \@todonotes@before@tikzpict%
\begin{tikzpicture}[overlay,remember picture,
deco/.style={}]%
\setlength\todonotes@textmark@linebelow%
@@ -394,7 +406,8 @@
-- (\@todonotes@nodeNamePrefix areaSE)
}
-- cycle;
- \end{tikzpicture}%
+ \end{tikzpicture}%
+ \@todonotes@after@tikzpict%
}}%
}%
\newcommand{\@todonotes@currentlinecolor}{}%
@@ -548,17 +561,21 @@
\@todonotes@areaselectedtrue%
\@todocommon{#1}{#2}%
\todonotes@textmark@highlight{#3}%
+ \@todonotes@before@tikzpict%
\begin{tikzpicture}[remember picture, overlay]%
\node [coordinate] (@todonotes@\arabic{@todonotes@numberoftodonotes} %
inTextEnd) {};%
\end{tikzpicture}%
+ \@todonotes@after@tikzpict%
\zref@label{@todonotes@\arabic{@todonotes@numberoftodonotes}@end}%
}%
\newcommand{\@todonotes@drawMarginNoteWithLine}{%
+ \@todonotes@before@tikzpict%
\begin{tikzpicture}[remember picture, overlay]%
\node [coordinate] (@todonotes@\arabic{@todonotes@numberoftodonotes} %
inText) {};%
\end{tikzpicture}%
+ \@todonotes@after@tikzpict%
\@todonotes@baselineskip=\baselineskip%
\@todonotes@normalbaselineskip=\normalbaselineskip%
\@todonotes@fontsize=\f@size pt%
@@ -607,7 +624,9 @@
\addcontentsline{tdo}{todo}{\@todonotes@caption}%
\fi}%
\newcommand{\@todonotes@drawInlineNote}{%
- {\par\noindent\begin{tikzpicture}[remember picture]%
+ {\par\noindent%
+ \@todonotes@before@tikzpict%
+ \begin{tikzpicture}[remember picture]%
\draw node[@todonotes@inlinenote,font=\@todonotes@sizecommand]{%
\if@todonotes@authorgiven%
{\noindent \@todonotes@sizecommand %
@@ -615,13 +634,16 @@
\else%
{\noindent \@todonotes@sizecommand \@todonotes@text}%
\fi};%
- \end{tikzpicture}\par}%
+ \end{tikzpicture}%
+ \@todonotes@after@tikzpict%
+ \par}%
}%
\newcommand{\missingfigure}[2][]{%
\setkeys{todonotes}{#1}%
\addcontentsline{tdo}{todo}{\@todonotes@MissingFigureText: #2}%
\par
\noindent
+\@todonotes@before@tikzpict%
\begin{tikzpicture}
\draw[fill=\@todonotes@currentfigcolor, draw = black!40, line width=2pt]
(-2, -2.5) rectangle +(\@todonotes@currentfigwidth, \@todonotes@currentfigheight);
@@ -632,6 +654,7 @@
\draw (0, 0.3) node {\@todonotes@MissingFigureUp};
\draw (0, -0.3) node {\@todonotes@MissingFigureDown};
\end{tikzpicture}\hfill
+\@todonotes@after@tikzpict%
}% Ending \missingfigure command
\fi% Ending \@todonotes@ifdisabled
\newcommand{\todototoc}
@@ -659,10 +682,12 @@
\directlua{luatodonotes.calcHeightsForNotes()}% has to be outside of tikzpicture
\raisebox{\voffset}{%
\hspace{-\hoffset}%
+ \@todonotes@before@tikzpict%
\begin{tikzpicture}[remember picture,overlay]
\directlua{luatodonotes.getInputCoordinatesForNotes()}
\directlua{luatodonotes.printNotes()}
\end{tikzpicture}%
+ \@todonotes@after@tikzpict%
}%
\directlua{luatodonotes.clearNotes()}%
\EndCatcodeRegime