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.tex68
-rw-r--r--Master/texmf-dist/tex/latex/tikzmark/tikzmarklibrarylistings.code.tex5
2 files changed, 59 insertions, 14 deletions
diff --git a/Master/texmf-dist/tex/latex/tikzmark/tikzlibrarytikzmark.code.tex b/Master/texmf-dist/tex/latex/tikzmark/tikzlibrarytikzmark.code.tex
index 0a0a829ec0a..961c3bc731f 100644
--- a/Master/texmf-dist/tex/latex/tikzmark/tikzlibrarytikzmark.code.tex
+++ b/Master/texmf-dist/tex/latex/tikzmark/tikzlibrarytikzmark.code.tex
@@ -7,7 +7,7 @@
%% tikzmark.dtx (with options: `tikzlibrary')
%% ----------------------------------------------------------------
%% tikzmark --- remembering absolute positioning with TikZ.
-%% E-mail: stacey@math.ntnu.no
+%% E-mail: loopspace@mathforge.org
%% Released under the LaTeX Project Public License v1.3c or later
%% See http://www.latex-project.org/lppl.txt
%% ----------------------------------------------------------------
@@ -29,11 +29,11 @@
},
},
save picture id/.code={%
- \immediate\write\pgfutil@auxout{%
- \string\savepointas{#1}{\pgfpictureid}}%
+ \protected@write\pgfutil@auxout{}{%
+ \string\savepointas{\tikzmark@pp@name{#1}}{\pgfpictureid}{0pt}{0pt}}%
},
if picture id/.code args={#1#2#3}{%
- \@ifundefined{save@pt@#1}{%
+ \@ifundefined{save@pt@\tikzmark@pp@name{#1}}{%
\pgfkeysalso{#3}%
}{
\pgfkeysalso{#2}%
@@ -56,15 +56,19 @@
next page/ignore/.style={%
next page vector={\pgfqpoint{0pt}{0pt}}%
},
+ tikzmark prefix/.initial=,%
+ tikzmark suffix/.initial=,%
}
-\def\savepointas#1#2{%
+\def\tikzmark@pp@name#1{\csname pgfk@/tikz/tikzmark prefix\endcsname#1\csname pgfk@/tikz/tikzmark suffix\endcsname}%
+\def\savepointas#1#2#3#4{%
\expandafter\gdef\csname save@pt@#1\endcsname{#2}%
+ \expandafter\gdef\csname save@pt@#1@offset\endcsname{\pgfqpoint{#3}{#4}}%
}
\def\savepicturepage#1#2{%
\expandafter\gdef\csname save@pg@#1\endcsname{#2}%
}
\def\tmk@labeldef#1,#2\@nil{%
- \def\tmk@label{#1}%
+ \edef\tmk@label{\tikzmark@pp@name{#1}}%
\def\tmk@def{#2}%
}
\tikzdeclarecoordinatesystem{pic}{%
@@ -87,6 +91,9 @@
\advance\pgf@y by -\pgf@ya
\pgf@xa=\pgf@x
\pgf@ya=\pgf@y
+ \pgf@process{\pgfpointorigin\csname save@pt@\tmk@label @offset\endcsname}%
+ \advance\pgf@xa by \pgf@x
+ \advance\pgf@ya by \pgf@y
\@ifundefined{save@pg@\csname save@pt@\tmk@label\endcsname}{}{%
\@ifundefined{save@pg@\pgfpictureid}{}{%
\pgfkeysvalueof{/tikz/next page vector}%
@@ -98,10 +105,39 @@
}%
\pgf@x=\pgf@xa
\pgf@y=\pgf@ya
+ \pgftransforminvert
+ \pgf@pos@transform{\pgf@x}{\pgf@y}%
}%
}
-\newcommand\tikzmark[2][]{%
+\begingroup
+\catcode`\;=\active
+\gdef\tikzmark@active#1#2{%
+\tikz[remember picture with id=#2] #1;}
+\endgroup
+\def\tikzmark@nonactive#1#2{%
\tikz[remember picture with id=#2] #1;}
+\newcommand\tikzmark@outside[2][]{%
+ \ifnum\catcode`\;=\active
+ \let\tikzmark@next=\tikzmark@active
+ \else
+ \let\tikzmark@next=\tikzmark@nonactive
+ \fi
+ \tikzmark@next{#1}{#2}%
+}
+\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 pt}{\the\pgf@y pt}}%
+}
+\def\tikzmark{%
+ \ifx\pgfpictureid\@undefined
+ \let\tikzmark@next=\tikzmark@outside
+ \else
+ \let\tikzmark@next=\tikzmark@inside
+ \fi
+ \tikzmark@next%
+}
\newcommand\pgfmark[1]{%
\bgroup
\global\advance\pgf@picture@serial@count by1\relax%
@@ -111,10 +147,21 @@
\noexpand\write\noexpand\pgfutil@auxout{%
\string\savepicturepage{\pgfpictureid}{\noexpand\thepage}}}%
\pgf@temp
- \immediate\write\pgfutil@auxout{%
- \string\savepointas{#1}{\pgfpictureid}}%
+ \protected@write\pgfutil@auxout{}{%
+ \string\savepointas{\tikzmark@pp@name{#1}}{\pgfpictureid}{0pt}{0pt}}%
\egroup
}
+\@ifclassloaded{beamer}{
+ \renewcommand<>{\tikzmark}[2][]{\only#3{\beameroriginal{\tikzmark}[{#1}]{#2}}}
+}{}
+\@ifclassloaded{beamer}{
+ \renewcommand<>{\pgfmark}[1]{\only#2{\beameroriginal{\pgfmark}{#1}}}
+}{}
+\@ifclassloaded{beamer}{
+ \tikzset{
+ tikzmark suffix=-\the\beamer@slideinframe
+ }
+}{}
\newcommand\iftikzmark[3]{%
\@ifundefined{save@pt@#1}{%
#3%
@@ -199,7 +246,7 @@
}
%%
-%% Copyright (C) 2011 by Andrew Stacey <stacey@math.ntnu.no>
+%% Copyright (C) 2011-2016 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
@@ -216,7 +263,6 @@
%% tikzmark.pdf,
%% tikzlibrarytikzmark.code.tex, and
%% tikzmarklibrarylistings.code.tex
-%% tikzmarklibraryhighlight.code.tex
%%
%%
%% End of file `tikzlibrarytikzmark.code.tex'.
diff --git a/Master/texmf-dist/tex/latex/tikzmark/tikzmarklibrarylistings.code.tex b/Master/texmf-dist/tex/latex/tikzmark/tikzmarklibrarylistings.code.tex
index a8874dc1daa..940e6dd925e 100644
--- a/Master/texmf-dist/tex/latex/tikzmark/tikzmarklibrarylistings.code.tex
+++ b/Master/texmf-dist/tex/latex/tikzmark/tikzmarklibrarylistings.code.tex
@@ -7,7 +7,7 @@
%% tikzmark.dtx (with options: `listings')
%% ----------------------------------------------------------------
%% tikzmark --- remembering absolute positioning with TikZ.
-%% E-mail: stacey@math.ntnu.no
+%% E-mail: loopspace@mathforge.org
%% Released under the LaTeX Project Public License v1.3c or later
%% See http://www.latex-project.org/lppl.txt
%% ----------------------------------------------------------------
@@ -47,7 +47,7 @@
\PackageError{tikzmark listings}{The listings package has not been loaded.}{}
}
%%
-%% Copyright (C) 2011 by Andrew Stacey <stacey@math.ntnu.no>
+%% Copyright (C) 2011-2016 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
@@ -64,7 +64,6 @@
%% tikzmark.pdf,
%% tikzlibrarytikzmark.code.tex, and
%% tikzmarklibrarylistings.code.tex
-%% tikzmarklibraryhighlight.code.tex
%%
%%
%% End of file `tikzmarklibrarylistings.code.tex'.