summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/tikzmark/tikzlibrarytikzmark.code.tex21
1 files changed, 16 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/latex/tikzmark/tikzlibrarytikzmark.code.tex b/Master/texmf-dist/tex/latex/tikzmark/tikzlibrarytikzmark.code.tex
index c39d9a82746..725b58f571b 100644
--- a/Master/texmf-dist/tex/latex/tikzmark/tikzlibrarytikzmark.code.tex
+++ b/Master/texmf-dist/tex/latex/tikzmark/tikzlibrarytikzmark.code.tex
@@ -144,10 +144,14 @@
\@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}%
- \advance \pgf@xa by %
- \tmk@pg\pgf@x\relax
- \advance \pgf@ya by %
- \tmk@pg\pgf@y\relax
+ \ifnum \tmk@pg > 0 \relax
+ \advance \pgf@xa by \pgf@x\relax
+ \advance \pgf@ya by \pgf@y\relax
+ \fi
+ \ifnum \tmk@pg < 0 \relax
+ \advance \pgf@xa by -\pgf@x\relax
+ \advance \pgf@ya by -\pgf@y\relax
+ \fi
}%
}%
\pgf@x=\pgf@xa
@@ -326,6 +330,10 @@
\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}%
+ }{}%
\else
\pgfnodealias{#2}{#2-d}%
\tikzmarkalias{#2}{#2-d}%
@@ -386,7 +394,10 @@
\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
- % No fallback due to potential nested mathchoices
+ \pgfutil@ifundefined{pgf@sh@ns@#2}{%
+ \pgfnodealias{#2}{#2-t}%
+ \tikzmarkalias{#2}{#2-t}%
+ }{}%
\else
\pgfnodealias{#2}{#2-d}%
\tikzmarkalias{#2}{#2-d}%