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.sty634
1 files changed, 634 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/lualatex/luatodonotes/luatodonotes.sty b/Master/texmf-dist/tex/lualatex/luatodonotes/luatodonotes.sty
new file mode 100644
index 00000000000..6f7a193ccce
--- /dev/null
+++ b/Master/texmf-dist/tex/lualatex/luatodonotes/luatodonotes.sty
@@ -0,0 +1,634 @@
+%%
+%% This is file `luatodonotes.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% luatodonotes.dtx (with options: `package')
+%%
+%% This is a generated file.
+%%
+%% Copyright (C) 2014 by Fabian Lipp <fabian.lipp@gmx.de>
+%% based on the todonotes package by
+%% Henrik Skov Midtiby <henrikmidtiby@gmail.com>
+%%
+%% This file may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.2 of this license
+%% or (at your option) any later version. The latest version of this
+%% license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.2 or later is part of all distributions of LaTeX version
+%% 1999/12/01 or later.
+%%
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesPackage{luatodonotes}
+ [2014/08/07 v0.1 luatodonotes source and documentation.]
+
+\ProvidesPackage{luatodonotes}[2014/06/08]
+\RequirePackage{ifthen}
+\RequirePackage{xkeyval}
+\RequirePackage{xcolor}
+\RequirePackage{tikz}
+\usetikzlibrary{positioning}
+\usetikzlibrary{intersections}
+\usetikzlibrary{decorations.pathmorphing}
+\RequirePackage{luacode}
+\RequirePackage{luatex}
+\RequirePackage{atbegshi}
+\RequirePackage{xstring}
+\RequirePackage{zref-abspage}
+\RequirePackage{ifoddpage}
+\RequirePackage{soul}
+\RequirePackage{soulpos}
+\newcommand{\@todonotes@text}{}%
+\newcommand{\@todonotes@backgroundcolor}{orange}
+\newcommand{\@todonotes@linecolor}{black!30}
+\newcommand{\@todonotes@bordercolor}{black}
+\newcommand{\@todonotes@leaderwidth}{1.6pt}
+\newcommand{\@todonotes@textsize}{\normalsize}
+\newcommand{\@todonotes@figwidth}{\columnwidth}
+\newcommand{\@todonotes@figheight}{4cm}
+\newcommand{\@todonotes@positioning}{inputOrderStacks}
+\newcommand{\@todonotes@splitting}{none}
+\newcommand{\@todonotes@leadertype}{opo}
+\newcommand{\@todonotes@interNoteSpace}{5pt}
+\newcommand{\@todonotes@noteInnerSep}{5pt}
+\newcommand{\@todonotes@routingAreaWidth}{0.4cm}
+\newcommand{\@todonotes@minNoteWidth}{2.0cm}
+\newcommand{\@todonotes@distanceNotesPageBorder}{0.5cm}
+\newcommand{\@todonotes@distanceNotesText}{0.2cm}
+\newcommand{\@todonotes@rasterHeight}{1cm}
+\AtBeginDocument{
+\ifx\undefined\phantomsection
+\newcommand{\phantomsection}{}
+\fi
+}
+\newcommand{\@todonotes@todolistname}{Todo list}
+\newcommand{\@todonotes@MissingFigureText}{Figure}
+\newcommand{\@todonotes@MissingFigureUp}{Missing}
+\newcommand{\@todonotes@MissingFigureDown}{figure}
+\newcommand{\@todonotes@SetTodoListName}[1]
+ {\renewcommand{\@todonotes@todolistname}{#1}}
+\newcommand{\@todonotes@SetMissingFigureText}[1]
+ {\renewcommand{\@todonotes@MissingFigureText}{#1}}
+\newcommand{\@todonotes@SetMissingFigureUp}[1]
+ {\renewcommand{\@todonotes@MissingFigureUp}{#1}}
+\newcommand{\@todonotes@SetMissingFigureDown}[1]
+ {\renewcommand{\@todonotes@MissingFigureDown}{#1}}
+\newif{\if@todonotes@reverseMissingFigureTriangle}
+\DeclareOptionX{catalan}{
+ \@todonotes@SetTodoListName{Llista de feines pendents}%
+ \@todonotes@SetMissingFigureText{Figura}%
+ \@todonotes@SetMissingFigureUp{Figura}%
+ \@todonotes@SetMissingFigureDown{pendent}%
+}
+\DeclareOptionX{danish}{%
+ \@todonotes@SetTodoListName{G\o{}rem\aa{}lsliste}%
+ \@todonotes@SetMissingFigureText{Figur}%
+ \@todonotes@SetMissingFigureUp{Manglende}%
+ \@todonotes@SetMissingFigureDown{figur}%
+}
+\DeclareOptionX{dutch}{%
+ \@todonotes@SetTodoListName{Lijst van onafgewerkte taken}%
+ \@todonotes@SetMissingFigureText{Figuur}%
+ \@todonotes@SetMissingFigureUp{Ontbrekende}%
+ \@todonotes@SetMissingFigureDown{figuur}%
+}
+\DeclareOptionX{english}{%
+ \@todonotes@SetTodoListName{Todo list}%
+ \@todonotes@SetMissingFigureText{Figure}%
+ \@todonotes@SetMissingFigureUp{Missing}%
+ \@todonotes@SetMissingFigureDown{figure}%
+}
+\DeclareOptionX{french}{%
+ \@todonotes@SetTodoListName{Liste des points \`a traiter}%
+ \@todonotes@SetMissingFigureText{Figure}%
+ \@todonotes@SetMissingFigureUp{Figure}%
+ \@todonotes@SetMissingFigureDown{manquante}%
+ \@todonotes@reverseMissingFigureTrianglefalse
+}
+\DeclareOptionX{german}{%
+ \@todonotes@SetTodoListName{Liste der noch zu erledigenden Punkte}%
+ \@todonotes@SetMissingFigureText{Abbildung}%
+ \@todonotes@SetMissingFigureUp{Fehlende}%
+ \@todonotes@SetMissingFigureDown{Abbildung}%
+}
+\DeclareOptionX{italian}{
+ \@todonotes@SetTodoListName{Elenco delle cose da fare}%
+ \@todonotes@SetMissingFigureText{Figura}%
+ \@todonotes@SetMissingFigureUp{Figura}%
+ \@todonotes@SetMissingFigureDown{mancante}%
+}
+\DeclareOptionX{ngerman}{%
+ \@todonotes@SetTodoListName{Liste der noch zu erledigenden Punkte}%
+ \@todonotes@SetMissingFigureText{Abbildung}%
+ \@todonotes@SetMissingFigureUp{Fehlende}%
+ \@todonotes@SetMissingFigureDown{Abbildung}%
+}
+\DeclareOptionX{portuguese}{
+ \@todonotes@SetTodoListName{Lista de tarefas pendentes}%
+ \@todonotes@SetMissingFigureText{Figura}%
+ \@todonotes@SetMissingFigureUp{Figura}%
+ \@todonotes@SetMissingFigureDown{pendente}%
+}
+\DeclareOptionX{spanish}{
+ \@todonotes@SetTodoListName{Lista de tareas pendientes}%
+ \@todonotes@SetMissingFigureText{Figura}%
+ \@todonotes@SetMissingFigureUp{Figura}%
+ \@todonotes@SetMissingFigureDown{pendiente}%
+}
+\DeclareOptionX{swedish}{%
+ \@todonotes@SetTodoListName{Att g\"{o}ra-lista}%
+ \@todonotes@SetMissingFigureText{Figur}%
+ \@todonotes@SetMissingFigureUp{Figur}%
+ \@todonotes@SetMissingFigureDown{saknas}%
+}
+\newcounter{@todonotes@numberoftodonotes}
+\newcounter{@todonotes@numberofLinesInArea}
+\newif{\if@todonotes@obeyDraft}
+\DeclareOptionX{obeyDraft}{\@todonotes@obeyDrafttrue}
+\newif{\if@todonotes@isDraft}
+\DeclareOptionX{draft}{\@todonotes@isDrafttrue}
+\DeclareOptionX{draftcls}{\@todonotes@isDrafttrue}
+\DeclareOptionX{draftclsnofoot}{\@todonotes@isDrafttrue}
+\newif{\if@todonotes@obeyFinal}
+\DeclareOptionX{obeyFinal}{\@todonotes@obeyFinaltrue}
+\newif{\if@todonotes@isFinal}
+\DeclareOptionX{final}{\@todonotes@isFinaltrue}
+\newif{\if@todonotes@disabled}
+\DeclareOptionX{disable}{\@todonotes@disabledtrue}
+\newif{\if@todonotes@colorinlistoftodos}
+\DeclareOptionX{colorinlistoftodos}{\@todonotes@colorinlistoftodostrue}
+\DeclareOptionX{dvistyle}{\PackageWarningNoLine{luatodonotes}
+ {Parameter dvistyle is not supported by luatodonotes.
+ Ignoring this option}}
+\define@key{luatodonotes.sty}%
+ {color}{
+ \renewcommand{\@todonotes@backgroundcolor}{#1}
+ \renewcommand{\@todonotes@linecolor}{#1}}
+\define@key{luatodonotes.sty}%
+ {backgroundcolor}{\renewcommand{\@todonotes@backgroundcolor}{#1}}
+\define@key{luatodonotes.sty}%
+ {linecolor}{\renewcommand{\@todonotes@linecolor}{#1}}
+\define@key{luatodonotes.sty}%
+ {bordercolor}{\renewcommand{\@todonotes@bordercolor}{#1}}
+\define@key{luatodonotes.sty}%
+ {leaderwidth}{\renewcommand{\@todonotes@leaderwidth}{#1}}
+\newif{\if@todonotes@prependcaptionglobal}
+\@todonotes@prependcaptionglobalfalse
+\DeclareOptionX{prependcaption}{\@todonotes@prependcaptionglobaltrue}
+\define@key{luatodonotes.sty}%
+ {textwidth}{\PackageWarningNoLine{luatodonotes}
+ {Parameter textwidth is not supported by luatodonotes}}
+\define@key{luatodonotes.sty}%
+ {textsize}{\renewcommand{\@todonotes@textsize}{\csname #1\endcsname}}
+\newif{\if@todonotes@shadowenabled}
+\@todonotes@shadowenabledfalse
+\DeclareOptionX{shadow}{\@todonotes@shadowenabledtrue
+\usetikzlibrary{shadows}}
+\define@key{luatodonotes.sty}%
+ {figwidth}{\renewcommand{\@todonotes@figwidth}{#1}}
+\define@key{luatodonotes.sty}%
+ {figheight}{\renewcommand{\@todonotes@figheight}{#1}}
+\define@key{luatodonotes.sty}%
+ {positioning}{\renewcommand{\@todonotes@positioning}{#1}}
+\define@key{luatodonotes.sty}%
+ {splitting}{\renewcommand{\@todonotes@splitting}{#1}}
+\define@key{luatodonotes.sty}%
+ {leadertype}{\renewcommand{\@todonotes@leadertype}{#1}}
+\define@key{luatodonotes.sty}%
+ {interNoteSpace}{\renewcommand{\@todonotes@interNoteSpace}{#1}}
+\define@key{luatodonotes.sty}%
+ {noteInnerSep}{\renewcommand{\@todonotes@noteInnerSep}{#1}}
+\define@key{luatodonotes.sty}%
+ {routingAreaWidth}{\renewcommand{\@todonotes@routingAreaWidth}{#1}}
+\define@key{luatodonotes.sty}%
+ {minNoteWidth}{\renewcommand{\@todonotes@minNoteWidth}{#1}}
+\define@key{luatodonotes.sty}%
+ {distanceNotesPageBorder}%
+ {\renewcommand{\@todonotes@distanceNotesPageBorder}{#1}}
+\define@key{luatodonotes.sty}%
+ {distanceNotesText}{\renewcommand{\@todonotes@distanceNotesText}{#1}}
+\define@key{luatodonotes.sty}%
+ {rasterHeight}{\renewcommand{\@todonotes@rasterHeight}{#1}}
+\newif{\if@todonotes@debugenabled}
+\@todonotes@debugenabledfalse
+\DeclareOptionX{debug}{\@todonotes@debugenabledtrue}
+\ProcessOptionsX*
+\if@todonotes@disabled
+\else
+ \if@todonotes@obeyDraft
+ \@todonotes@disabledtrue
+ \if@todonotes@isDraft
+ \@todonotes@disabledfalse
+ \fi
+ \fi
+ \if@todonotes@obeyFinal
+ \@todonotes@disabledfalse
+ \if@todonotes@isFinal
+ \@todonotes@disabledtrue
+ \fi
+ \fi
+\fi
+\newdimen\@todonotes@extractx
+\newdimen\@todonotes@extracty
+\newsavebox\@todonotes@heightcalcbox
+\newdimen\@todonotes@heightcalcboxdepth
+\newdimen\@todonotes@heightcalcboxheight
+\newsavebox\@todonotes@notetextbox
+\newdimen\@todonotes@baselineskip
+\newdimen\@todonotes@fontsize
+\newdimen\@todonotes@currentsidemargin
+\directlua{require("luatodonotes")}
+\directlua{noteInnerSep =
+ string.todimen("\luatexluaescapestring{\@todonotes@noteInnerSep}")}
+\directlua{noteInterSpace =
+ string.todimen("\luatexluaescapestring{\@todonotes@interNoteSpace}")}
+\directlua{routingAreaWidth =
+ string.todimen("\luatexluaescapestring{\@todonotes@routingAreaWidth}")}
+\directlua{minNoteWidth =
+ string.todimen("\luatexluaescapestring{\@todonotes@minNoteWidth}")}
+\directlua{distanceNotesPageBorder =
+ string.todimen("\luatexluaescapestring{\@todonotes@distanceNotesPageBorder}")}
+\directlua{distanceNotesText =
+ string.todimen("\luatexluaescapestring{\@todonotes@distanceNotesText}")}
+\directlua{rasterHeight =
+ string.todimen("\luatexluaescapestring{\@todonotes@rasterHeight}")}
+\IfStrEqCase{\@todonotes@positioning}{%
+ {inText}{\directlua{positioning = positioningAlgos["inText"]}}%
+ {inputOrder}{\directlua{positioning = positioningAlgos["inputOrder"]}}%
+ {inputOrderStacks}{\directlua{positioning =
+ positioningAlgos["inputOrderStacks"]}}%
+ {sLeaderNorthEast}{\directlua{positioning =
+ positioningAlgos["sLeaderNorthEast"]}}%
+ {sLeaderNorthEastBelow}{\directlua{positioning =
+ positioningAlgos["sLeaderNorthEastBelow"]}}%
+ {sLeaderEast}{\directlua{positioning =
+ positioningAlgos["sLeaderEast"]}}%
+ {poLeaders}{\directlua{positioning = positioningAlgos["poLeaders"]}}%
+ {poLeadersAvoidLines}{\directlua{positioning =
+ positioningAlgos["poLeadersAvoidLines"]}}%
+ {sLeaderNorthEastBelowStacks}{\directlua{positioning =
+ positioningAlgos["sLeaderNorthEastBelowStacks"]}}}%
+ [\directlua{positioning = positioningAlgos["inputOrderStacks"]}
+ \PackageWarningNoLine{luatodonotes}
+ {Invalid value for parameter positioning: \@todonotes@positioning}]
+\IfStrEqCase{\@todonotes@splitting}{%
+ {none}{\directlua{splitting = splittingAlgos["none"]}}%
+ {middle}{\directlua{splitting = splittingAlgos["middle"]}}%
+ {median}{\directlua{splitting = splittingAlgos["median"]}}%
+ {weightedMedian}{\directlua{splitting = splittingAlgos["weightedMedian"]}}}%
+ [\directlua{splitting = splittingAlgos["none"]}
+ \PackageWarningNoLine{luatodonotes}
+ {Invalid value for parameter split: \@todonotes@splitting}]
+\IfStrEqCase{\@todonotes@leadertype}{%
+ {s}{\directlua{leaderType = leaderTypes["s"]}}%
+ {opo}{\directlua{leaderType = leaderTypes["opo"]}}%
+ {po}{\directlua{leaderType = leaderTypes["po"]}}%
+ {sBezier}{\directlua{leaderType = leaderTypes["sBezier"]}}%
+ {os}{\directlua{leaderType = leaderTypes["os"]}}}%
+ [\directlua{leaderType = leaderTypes["opo"]}
+ \PackageWarningNoLine{luatodonotes}
+ {Invalid value for parameter leadertype: \@todonotes@leadertype}]
+\def\@todonotes@pdflastypos{\the\pdflastypos}
+\newcommand{\@todonotes@lineposition}[3]{%
+ \directlua{linePositionsAddLine(#1,#2,#3)}%
+}
+\newcommand{\@todonotes@nextpage}{%
+ \directlua{linePositionsNextPage()}%
+}%
+\newcommand{\@todonotes@writeNextpageToLpo}{%
+ \ifdefined\tf@lpo%
+ \immediate\write\tf@lpo{\@backslashchar @todonotes@nextpage}%
+ \fi
+}
+\if@todonotes@debugenabled
+ \directlua{todonotesDebug = true}
+ \newcommand{\@todonotes@AtBeginShipoutUpperLeft}
+ {\AtBeginShipoutUpperLeftForeground}
+\else
+ \directlua{todonotesDebug = false}
+ \newcommand{\@todonotes@AtBeginShipoutUpperLeft}
+ {\AtBeginShipoutUpperLeft}
+\fi
+\directlua{initTodonotes()}
+\soulregister{\ }{0}
+\newlength{\todonotes@textmark@width}
+\newlength{\todonotes@textmark@fontsize}
+\newlength{\todonotes@textmark@linebelow}
+\newlength{\todonotes@textmark@lineabove}
+\ulposdef{\todonotes@textmark@highlight}{%
+ \setlength\todonotes@textmark@width\ulwidth%
+ \setlength\todonotes@textmark@fontsize{\f@size pt}%
+ \stepcounter{@todonotes@numberofLinesInArea}%
+ \ifulstarttype{0}%
+ {% begin of area
+ \def\todonotes@textmark@decoLeft{}%
+ \def\todonotes@textmark@shift{-2pt}%
+ \addtolength\todonotes@textmark@width{2pt}%
+ \setcounter{@todonotes@numberofLinesInArea}{1}}%
+ {\def\todonotes@textmark@decoLeft{@todonotes@todoarea}%
+ \def\todonotes@textmark@shift{-4pt}%
+ \addtolength\todonotes@textmark@width{4pt}}%
+ \ifulendtype{0}%
+ {% last line of area
+ \def\todonotes@textmark@decoRight{}%
+ \addtolength\todonotes@textmark@width{2pt}%
+ \directlua{processLastLineInTodoArea()}}%
+ {\def\todonotes@textmark@decoRight{@todonotes@todoarea}%
+ \addtolength\todonotes@textmark@width{4pt}}%
+ \newcommand{\@todonotes@nodeNamePrefix}%
+ {@todonotes@\arabic{@todonotes@numberoftodonotes}%
+ @\arabic{@todonotes@numberofLinesInArea} }%
+ \hspace*{\todonotes@textmark@shift}{\smash{%
+ \begin{tikzpicture}[overlay,remember picture,
+ deco/.style={}]%
+ \setlength\todonotes@textmark@linebelow%
+ {-0.95\dimexpr\baselineskip-\f@size pt\relax}%
+ \setlength\todonotes@textmark@lineabove%
+ {\dimexpr\f@size pt+\todonotes@textmark@linebelow\relax}%
+ \coordinate
+ (\@todonotes@nodeNamePrefix areaSW)
+ at (0,\todonotes@textmark@linebelow);
+ \coordinate
+ (\@todonotes@nodeNamePrefix areaSE)
+ at (\todonotes@textmark@width, \todonotes@textmark@linebelow);
+ \coordinate
+ (\@todonotes@nodeNamePrefix areaNE)
+ at (\todonotes@textmark@width,\todonotes@textmark@lineabove);
+ \coordinate
+ (\@todonotes@nodeNamePrefix areaNW)
+ at (0,\todonotes@textmark@lineabove);
+ \draw[draw=green!70,fill=green,fill opacity=.2]
+ (\@todonotes@nodeNamePrefix areaSW)
+ decorate[\todonotes@textmark@decoLeft] {
+ -- (\@todonotes@nodeNamePrefix areaNW)
+ }
+ -- (\@todonotes@nodeNamePrefix areaNE)
+ decorate[\todonotes@textmark@decoRight] {
+ -- (\@todonotes@nodeNamePrefix areaSE)
+ }
+ -- cycle;
+ \end{tikzpicture}%
+ }}%
+}%
+\newcommand{\@todonotes@currentlinecolor}{}%
+\newcommand{\@todonotes@currentbackgroundcolor}{}%
+\newcommand{\@todonotes@currentbordercolor}{}%
+\define@key{todonotes}{color}{%
+ \renewcommand{\@todonotes@currentlinecolor}{#1}%
+ \renewcommand{\@todonotes@currentbackgroundcolor}{#1}}%
+\define@key{todonotes}{linecolor}{%
+ \renewcommand{\@todonotes@currentlinecolor}{#1}}%
+\define@key{todonotes}{backgroundcolor}{%
+ \renewcommand{\@todonotes@currentbackgroundcolor}{#1}}%
+\define@key{todonotes}{bordercolor}{%
+ \renewcommand{\@todonotes@currentbordercolor}{#1}}%
+\newcommand{\@todonotes@currentleaderwidth}{}%
+\define@key{todonotes}{leaderwidth}{%
+ \renewcommand{\@todonotes@currentleaderwidth}{#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}%
+\newif\if@todonotes@inlinenote%
+\define@key{todonotes}{inline}[]{\@todonotes@inlinenotetrue}%
+\define@key{todonotes}{noinline}[]{\@todonotes@inlinenotefalse}%
+\newif\if@todonotes@prependcaption%
+\define@key{todonotes}{prepend}[]{\@todonotes@prependcaptiontrue}%
+\define@key{todonotes}{noprepend}[]{\@todonotes@prependcaptionfalse}%
+\newif\if@todonotes@line%
+\define@key{todonotes}{line}[]{\@todonotes@linetrue}%
+\define@key{todonotes}{noline}[]{\@todonotes@linefalse}%
+\define@key{todonotes}{fancyline}[]{\PackageWarningNoLine{luatodonotes}
+ {Parameter fancyline is not supported by luatodonotes}}%
+\define@key{todonotes}{nofancyline}[]{}%
+\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}%
+ {\renewcommand{\@todonotes@caption}{#1}%
+ \@todonotes@captiongiventrue}%
+\define@key{todonotes}{nocaption}[]{\@todonotes@captiongivenfalse}%
+\newcommand{\@todonotes@currentfigwidth}{\@todonotes@figwidth}
+\define@key{todonotes}%
+ {figwidth}{\renewcommand{\@todonotes@currentfigwidth}{#1}}
+\newcommand{\@todonotes@currentfigheight}{\@todonotes@figheight}
+\define@key{todonotes}%
+ {figheight}{\renewcommand{\@todonotes@currentfigheight}{#1}}
+\presetkeys%
+ {todonotes}%
+ {linecolor=\@todonotes@linecolor,%
+ backgroundcolor=\@todonotes@backgroundcolor,%
+ bordercolor=\@todonotes@bordercolor,%
+ leaderwidth=\@todonotes@leaderwidth,%
+ nodisable,%
+ noinline,%
+ nocaption,%
+ noauthor,%
+ figwidth=\@todonotes@figwidth,%
+ figheight=\@todonotes@figheight,%
+ line, list, size=\@todonotes@textsize}{}%
+\newif\if@todonotes@areaselected%
+\newtoks\@todonotes@toks@currentlinecolor%
+\newtoks\@todonotes@toks@currentbackgroundcolor%
+\newtoks\@todonotes@toks@currentbordercolor%
+\newtoks\@todonotes@toks@currentleaderwidth%
+\newtoks\@todonotes@toks@sizecommand%
+\if@todonotes@disabled%
+ \newcommand{\listoftodos}[1][]{}
+ \newcommand{\@todo}[2][]{}
+ \newcommand{\@todoarea}[3][]{}
+ \newcommand{\missingfigure}[2][]{}
+\else % \if@todonotes@disabled
+\newcommand{\listoftodos}[1][\@todonotes@todolistname]
+ {\@ifundefined{chapter}{\section*{#1}}{\chapter*{#1}} \@starttoc{tdo}}
+\newcommand{\l@todo}
+ {\@dottedtocline{1}{0em}{2.3em}}
+\tikzset{@todonotes@todoarea/.style={
+ decoration={snake,amplitude=3.5pt,segment length=5pt}}}
+\tikzset{@todonotes@notestyleraw/.style={
+ line width=0.5pt,
+ inner sep = \@todonotes@noteInnerSep,
+ rounded corners=4pt}}
+\if@todonotes@shadowenabled
+ \tikzset{@todonotes@notestyle/.style={@todonotes@notestyleraw,
+ general shadow={shadow xshift=.5ex, shadow yshift=-.5ex,
+ opacity=1,fill=black!50}}}
+\else
+ \tikzset{@todonotes@notestyle/.style={@todonotes@notestyleraw}}
+\fi
+\tikzset{@todonotes@leader/.style={}}
+\tikzset{@todonotes@textmark/.style={rounded corners}}
+\tikzset{@todonotes@inlinenote/.style={
+ @todonotes@notestyle,
+ draw=\@todonotes@currentbordercolor,
+ fill=\@todonotes@currentbackgroundcolor,
+ text width=\linewidth - 1.6 ex - 1 pt}}
+\newcommand{\@todocommon}[2]{%
+\if@todonotes@prependcaptionglobal%
+\@todonotes@prependcaptiontrue%
+\else%
+\@todonotes@prependcaptionfalse%
+\fi%
+\renewcommand{\@todonotes@text}{#2}%
+\renewcommand{\@todonotes@caption}{#2}%
+\setkeys{todonotes}{#1}%
+\if@todonotes@localdisable%
+\else%
+\addtocounter{@todonotes@numberoftodonotes}{1}%
+\if@todonotes@appendtolistoftodos%
+ \phantomsection%
+ \if@todonotes@captiongiven%
+ \else%
+ \renewcommand{\@todonotes@caption}{#2}%
+ \fi%
+ \@todonotes@addElementToListOfTodos%
+\fi%
+\if@todonotes@captiongiven%
+ \if@todonotes@prependcaption%
+ \renewcommand{\@todonotes@text}{\@todonotes@caption: #2}%
+ \fi%
+\fi%
+\if@todonotes@inlinenote%
+ \@todonotes@drawInlineNote%
+\else%
+ \@todonotes@drawMarginNoteWithLine%
+\fi%\if@todonotes@inlinenote
+\fi%\if@todonotes@localdisable
+}%
+\newcommand{\@todo}[2][]{%
+ \@todonotes@areaselectedfalse%
+ \@todocommon{#1}{#2}%
+}%
+\newcommand{\@todoarea}[3][]{%
+ \@todonotes@areaselectedtrue%
+ \@todocommon{#1}{#2}%
+ \todonotes@textmark@highlight{#3}%
+ \begin{tikzpicture}[remember picture, overlay]%
+ \node [coordinate] (@todonotes@\arabic{@todonotes@numberoftodonotes} %
+ inTextEnd) {};%
+ \end{tikzpicture}%
+ \zref@label{@todonotes@\arabic{@todonotes@numberoftodonotes}@end}%
+}%
+\newcommand{\@todonotes@drawMarginNoteWithLine}{%
+ \begin{tikzpicture}[remember picture, overlay]%
+ \node [coordinate] (@todonotes@\arabic{@todonotes@numberoftodonotes} %
+ inText) {};%
+ \end{tikzpicture}%
+ \@todonotes@baselineskip=\baselineskip%
+ \@todonotes@fontsize=\f@size pt%
+ \zref@label{@todonotes@\arabic{@todonotes@numberoftodonotes}}%
+ \if@todonotes@authorgiven%
+ \let\@todonotes@text@old=\@todonotes@text
+ \renewcommand{\@todonotes@text}{\@todonotes@author: \@todonotes@text@old}%
+ \fi%
+ \edef\@todonotes@tmp{\@todonotes@currentlinecolor}%
+ \@todonotes@toks@currentlinecolor=\expandafter{\@todonotes@tmp}%
+ \edef\@todonotes@tmp{\@todonotes@currentbackgroundcolor}%
+ \@todonotes@toks@currentbackgroundcolor=\expandafter{\@todonotes@tmp}%
+ \edef\@todonotes@tmp{\@todonotes@currentbordercolor}%
+ \@todonotes@toks@currentbordercolor=\expandafter{\@todonotes@tmp}%
+ \edef\@todonotes@tmp{\@todonotes@currentleaderwidth}%
+ \@todonotes@toks@currentleaderwidth=\expandafter{\@todonotes@tmp}%
+ \@todonotes@toks@sizecommand=\expandafter{\@todonotes@sizecommand}%
+ \savebox\@todonotes@notetextbox{\@todonotes@sizecommand\@todonotes@text}%
+ \if@todonotes@line%
+ \def\@todonotes@param@drawLeader{true}%
+ \else%
+ \def\@todonotes@param@drawLeader{false}%
+ \fi%
+ \if@todonotes@areaselected%
+ \def\@todonotes@param@noteType{area}%
+ \else%
+ \def\@todonotes@param@noteType{}%
+ \fi%
+ \directlua{addNoteToList(\arabic{@todonotes@numberoftodonotes},%
+ \@todonotes@param@drawLeader,\luastringO{\@todonotes@param@noteType})}%
+}%
+\newcommand{\@todonotes@addElementToListOfTodos}{%
+ \if@todonotes@colorinlistoftodos%
+ \addcontentsline{tdo}{todo}{%
+ \fcolorbox{\@todonotes@currentbordercolor}%
+ {\@todonotes@currentbackgroundcolor}%
+ {\textcolor{\@todonotes@currentbackgroundcolor}{o}}%
+ \ \@todonotes@caption}%
+ \else%
+ \addcontentsline{tdo}{todo}{\@todonotes@caption}%
+ \fi}%
+\newcommand{\@todonotes@drawInlineNote}{%
+ {\par\noindent\begin{tikzpicture}[remember picture]%
+ \draw node[@todonotes@inlinenote,font=\@todonotes@sizecommand]{%
+ \if@todonotes@authorgiven%
+ {\noindent \@todonotes@sizecommand %
+ \@todonotes@author:\,\@todonotes@text}%
+ \else%
+ {\noindent \@todonotes@sizecommand \@todonotes@text}%
+ \fi};%
+ \end{tikzpicture}\par}%
+ }%
+\newcommand{\missingfigure}[2][]{%
+\setkeys{todonotes}{#1}%
+\addcontentsline{tdo}{todo}{\@todonotes@MissingFigureText: #2}%
+\par
+\noindent
+\begin{tikzpicture}
+\draw[fill=black!40, draw = white, line width=0pt]
+ (-2, -2.5) rectangle +(\@todonotes@currentfigwidth, \@todonotes@currentfigheight);
+\draw (2, -0.3) node[right, text
+ width=\@todonotes@currentfigwidth-4.5cm] {#2};
+\draw[red, fill=white, rounded corners = 5pt, line width=10pt]
+ (30:2cm) -- (150:2cm) -- (270:2cm) -- cycle;
+\draw (0, 0.3) node {\@todonotes@MissingFigureUp};
+\draw (0, -0.3) node {\@todonotes@MissingFigureDown};
+\end{tikzpicture}
+}% Ending \missingfigure command
+\fi % Ending \@todonotes@ifdisabled
+\newcommand{\todototoc}
+{
+ \if@todonotes@disabled
+ \else
+ \addcontentsline{toc}{\@ifundefined{chapter}{section}{chapter}}{\@todonotes@todolistname}
+ \fi
+}
+\newcommand{\todo}[2][]{\@bsphack\@todo[#1]{#2}\@esphack\ignorespaces}%
+\newcommand{\todoarea}[3][]{\@bsphack\@todoarea[#1]{#2}{#3}\@esphack}%
+\if@todonotes@disabled
+\else
+\AtBeginShipout{%
+ \@todonotes@AtBeginShipoutUpperLeft{
+ \@todonotes@writeNextpageToLpo
+ \checkoddpage%
+ \ifoddpageoroneside%
+ \@todonotes@currentsidemargin=\the\oddsidemargin%
+ \directlua{currentPageOdd = true}%
+ \else%
+ \@todonotes@currentsidemargin=\the\evensidemargin%
+ \directlua{currentPageOdd = false}%
+ \fi\relax%
+ \BeginCatcodeRegime\CatcodeTableLaTeX
+ \directlua{calcLabelAreaDimensions()}%
+ \directlua{calcHeightsForNotes()}% has to be outside of tikzpicture
+ \begin{tikzpicture}[remember picture,overlay]
+ \directlua{getInputCoordinatesForNotes()}
+ \directlua{printNotes()}
+ \end{tikzpicture}%
+ \directlua{clearNotes()}%
+ \EndCatcodeRegime
+ }%
+}
+\fi % Ending \@todonotes@ifdisabled
+\endinput
+%%
+%% End of file `luatodonotes.sty'.