summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tikzmark
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/tikzmark')
-rw-r--r--Master/texmf-dist/tex/latex/tikzmark/tikzlibrarytikzmark.code.tex90
-rw-r--r--Master/texmf-dist/tex/latex/tikzmark/tikzmarklibrarylistings.code.tex5
2 files changed, 72 insertions, 23 deletions
diff --git a/Master/texmf-dist/tex/latex/tikzmark/tikzlibrarytikzmark.code.tex b/Master/texmf-dist/tex/latex/tikzmark/tikzlibrarytikzmark.code.tex
index 725b58f571b..8db5f2e37b3 100644
--- a/Master/texmf-dist/tex/latex/tikzmark/tikzlibrarytikzmark.code.tex
+++ b/Master/texmf-dist/tex/latex/tikzmark/tikzlibrarytikzmark.code.tex
@@ -12,6 +12,10 @@
%% See http://www.latex-project.org/lppl.txt
%% ----------------------------------------------------------------
%%
+\ProvidesFile{tikzlibrarytikzmark.code.tex}[%
+ 2021/02/16
+ v1.10
+ TikZ library for marking positions in a document]
\RequirePackage{expl3, l3keys2e, xparse}
\tikzset{%
remember picture with id/.style={%
@@ -32,6 +36,28 @@
\fi%
},
},
+ check picture id/.code={
+ \ifpgfrememberpicturepositiononpage
+ \@ifundefined{pgf@sys@pdf@mark@pos@\pgfpictureid}{%
+ \tikzset{%
+ name prefix/.get=\tzmk@name@prefix,
+ name prefix/.prefix=discard-,
+ execute at end picture={%
+ \tikzset{name prefix/.expand once=\tzmk@name@prefix}%
+ },
+ }%
+ }{}%
+ \fi
+ },
+ maybe define node/.style={%
+ execute at end picture={%
+ \ifpgfrememberpicturepositiononpage
+ \@ifundefined{pgf@sh@pi@\tikz@pp@name{#1}}{%
+ \pgfnodealias{\tikz@pp@name{#1}}{discard-\tikz@pp@name{#1}}%
+ }{}%
+ \fi
+ }%
+ },
save picture id/.code={%
\protected@write\pgfutil@auxout{}{%
\string\savepointas%
@@ -65,10 +91,14 @@
\@ifundefined{save@pt@\tikzmark@pp@name{#1}}{%
\pgfkeysalso{#3}%
}{%
- \@ifundefined{save@pg@\csname save@pt@\tikzmark@pp@name{#1}\endcsname}{%
+ \@ifundefined{%
+ save@pg@\csname save@pt@\tikzmark@pp@name{#1}\endcsname
+ }{%
\pgfkeysalso{#3}%
}{%
- \ifnum\csname save@pg@\csname save@pt@\tikzmark@pp@name{#1}\endcsname\endcsname=\the\value{page}\relax%
+ \ifnum\csname save@pg@%
+ \csname save@pt@\tikzmark@pp@name{#1}\endcsname%
+ \endcsname=\the\value{page}\relax%
\pgfkeysalso{#2}%
\else
\pgfkeysalso{#3}%
@@ -80,10 +110,14 @@
\@ifundefined{save@pt@\tikzmark@pp@name{#1}}{%
\pgfkeysalso{#4}%
}{%
- \@ifundefined{save@pg@\csname save@pt@\tikzmark@pp@name{#1}@label\endcsname}{%
+ \@ifundefined{%
+ save@pg@\csname save@pt@\tikzmark@pp@name{#1}@label\endcsname%
+ }{%
\pgfkeysalso{#4}%
}{%
- \ifnum\csname save@pg@\csname save@pt@\tikzmark@pp@name{#1}\endcsname\endcsname=#2\relax%
+ \ifnum\csname save@pg@%
+ \csname save@pt@\tikzmark@pp@name{#1}\endcsname%
+ \endcsname=#2\relax%
\pgfkeysalso{#3}%
\else
\pgfkeysalso{#4}%
@@ -143,7 +177,12 @@
\@ifundefined{save@pg@\csname save@pt@\tmk@label\endcsname}{}{%
\@ifundefined{save@pg@\pgfpictureid}{}{%
\pgfkeysvalueof{/tikz/next page vector}%
- \edef\tmk@pg{\the\numexpr \csname save@pg@\csname save@pt@\tmk@label\endcsname\endcsname - \csname save@pg@\pgfpictureid\endcsname\relax}%
+ \edef\tmk@pg{%
+ \the\numexpr \csname save@pg@%
+ \csname save@pt@\tmk@label\endcsname\endcsname%
+ -
+ \csname save@pg@\pgfpictureid\endcsname\relax%
+ }%
\ifnum \tmk@pg > 0 \relax
\advance \pgf@xa by \pgf@x\relax
\advance \pgf@ya by \pgf@y\relax
@@ -161,13 +200,15 @@
}%
}
\newcommand\tikzmark@outside[2][]{%
+\tikzset{external/export next/.try=false}%
\tikz[remember picture with id=#2]{#1}%
}
\def\tikzmark@inside#1#2{%
\tikzset{remember picture}%
\tikz@scan@one@point\pgfutil@firstofone#2\relax
\protected@write\pgfutil@auxout{}{%
- \string\savepointas{\tikzmark@pp@name{#1}}{\pgfpictureid}{\the\pgf@x}{\the\pgf@y}}%
+ \string\savepointas%
+ {\tikzmark@pp@name{#1}}{\pgfpictureid}{\the\pgf@x}{\the\pgf@y}}%
}
\def\tikzmark{%
\ifx\pgfpictureid\@undefined
@@ -234,7 +275,9 @@
\@ifundefined{save@pg@\csname save@pt@\tikzmark@pp@name{#1}\endcsname}{%
\tikzmark@false
}{%
- \ifnum\csname save@pg@\csname save@pt@\tikzmark@pp@name{#1}\endcsname\endcsname=#2\relax%
+ \ifnum\csname save@pg@%
+ \csname save@pt@\tikzmark@pp@name{#1}\endcsname%
+ \endcsname=#2\relax%
\tikzmark@true
\else
\tikzmark@false
@@ -250,7 +293,9 @@
\@ifundefined{save@pg@\csname save@pt@\tikzmark@pp@name{#1}\endcsname}{%
\tikzmark@false
}{%
- \ifnum\csname save@pg@\csname save@pt@\tikzmark@pp@name{#1}\endcsname\endcsname=\the\value{page}\relax%
+ \ifnum\csname save@pg@%
+ \csname save@pt@\tikzmark@pp@name{#1}\endcsname%
+ \endcsname=\the\value{page}\relax%
\tikzmark@true
\else
\tikzmark@false
@@ -356,10 +401,13 @@
}
\def\tikzmarknode@#1#2#3{%
+\tikzset{external/export next/.try=false}%
\tikz[%
remember picture,
- baseline=(#2.base),
save picture id={#2},
+ check picture id,
+ maybe define node={#2},
+ baseline=(#2.base),
every tikzmarknode picture/.try
] {
\node[
@@ -394,25 +442,25 @@
\expandafter\ifx\csname\tzmk@pic\endcsname\relax
\edef\tzmk@pic{\tzmk@prfx\the\numexpr\the\pgf@picture@serial@count-3\relax}%
\expandafter\ifx\csname\tzmk@pic\endcsname\relax
- \pgfutil@ifundefined{pgf@sh@ns@#2}{%
- \pgfnodealias{#2}{#2-t}%
- \tikzmarkalias{#2}{#2-t}%
+ \pgfutil@ifundefined{pgf@sh@ns@\tikz@pp@name{#2}}{%
+ \pgfnodealias{\tikz@pp@name{#2}}{\tikz@pp@name{#2-t}}%
+ \tikzmarkalias{\tikzmark@pp@name{#2}}{\tikzmark@pp@name{#2-t}}%
}{}%
\else
- \pgfnodealias{#2}{#2-d}%
- \tikzmarkalias{#2}{#2-d}%
+ \pgfnodealias{\tikz@pp@name{#2}}{\tikz@pp@name{#2-d}}%
+ \tikzmarkalias{\tikzmark@pp@name{#2}}{\tikzmark@pp@name{#2-d}}%
\fi
\else
- \pgfnodealias{#2}{#2-t}%
- \tikzmarkalias{#2}{#2-t}%
+ \pgfnodealias{\tikz@pp@name{#2}}{\tikz@pp@name{#2-t}}%
+ \tikzmarkalias{\tikzmark@pp@name{#2}}{\tikzmark@pp@name{#2-t}}%
\fi
\else
- \pgfnodealias{#2}{#2-s}%
- \tikzmarkalias{#2}{#2-s}%
+ \pgfnodealias{\tikz@pp@name{#2}}{\tikz@pp@name{#2-s}}%
+ \tikzmarkalias{\tikzmark@pp@name{#2}}{\tikzmark@pp@name{#2-s}}%
\fi
\else
- \pgfnodealias{#2}{#2-ss}%
- \tikzmarkalias{#2}{#2-ss}%
+ \pgfnodealias{\tikz@pp@name{#2}}{\tikz@pp@name{#2-ss}}%
+ \tikzmarkalias{\tikzmark@pp@name{#2}}{\tikzmark@pp@name{#2-ss}}%
\fi
\else
\tikzmarknode@{#1}{#2}{#3}%
@@ -772,7 +820,7 @@
}
\ExplSyntaxOff
%%
-%% Copyright (C) 2011-2018 by Andrew Stacey <loopspace@mathforge.org>
+%% Copyright (C) 2011-2021 by Andrew Stacey <loopspace@mathforge.org>
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License (LPPL), either
diff --git a/Master/texmf-dist/tex/latex/tikzmark/tikzmarklibrarylistings.code.tex b/Master/texmf-dist/tex/latex/tikzmark/tikzmarklibrarylistings.code.tex
index 085323e146d..2692b3fa8f6 100644
--- a/Master/texmf-dist/tex/latex/tikzmark/tikzmarklibrarylistings.code.tex
+++ b/Master/texmf-dist/tex/latex/tikzmark/tikzmarklibrarylistings.code.tex
@@ -13,7 +13,8 @@
%% ----------------------------------------------------------------
%%
\@ifpackageloaded{listings}{%
- \newif\iflst@linemark
+ \newif\iflst@linemark
+ \lst@linemarktrue
\lst@AddToHook{EveryLine}{%
\begingroup
\advance\c@lstnumber by 1\relax
@@ -47,7 +48,7 @@
\PackageError{tikzmark listings}{The listings package has not been loaded.}{}
}
%%
-%% Copyright (C) 2011-2018 by Andrew Stacey <loopspace@mathforge.org>
+%% Copyright (C) 2011-2021 by Andrew Stacey <loopspace@mathforge.org>
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License (LPPL), either