texlive[52293] Master/texmf-dist: tikzmark

commits+karl at tug.org commits+karl at tug.org
Sat Oct 5 22:49:26 CEST 2019


Revision: 52293
          http://tug.org/svn/texlive?view=revision&revision=52293
Author:   karl
Date:     2019-10-05 22:49:26 +0200 (Sat, 05 Oct 2019)
Log Message:
-----------
tikzmark

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/tikzmark/tikzmark.pdf
    trunk/Master/texmf-dist/source/latex/tikzmark/tikzmark.dtx
    trunk/Master/texmf-dist/tex/latex/tikzmark/tikzlibrarytikzmark.code.tex

Modified: trunk/Master/texmf-dist/doc/latex/tikzmark/tikzmark.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/tikzmark/tikzmark.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tikzmark/tikzmark.dtx	2019-10-05 20:49:13 UTC (rev 52292)
+++ trunk/Master/texmf-dist/source/latex/tikzmark/tikzmark.dtx	2019-10-05 20:49:26 UTC (rev 52293)
@@ -99,8 +99,15 @@
  
 \usepackage{listings}
 \lstloadlanguages{[LaTeX]TeX}
-\lstset{gobble=2,breakatwhitespace=true,breaklines=true,language=TeX}
- 
+ \lstset{
+  gobble=2,
+  breakatwhitespace=true,
+  breaklines=true,
+  language=[LaTeX]TeX,
+  basicstyle=\small\ttfamily,
+  keepspaces=true,
+  columns=fullflexible
+}
 \usepackage{fancyvrb}
 
 \usepackage[hyperindex=false]{hyperref}
@@ -112,8 +119,7 @@
    \begin{center}
 %   \setlength{\parindent}{0pt}
    \fbox{\begin{minipage}{.9\linewidth}
-     \lstset{breakatwhitespace=true,breaklines=true,language=TeX,basicstyle=\small}
-     \lstinputlisting[]{example.out}
+     \lstinputlisting{example.out}
    \end{minipage}}
 
    \fbox{\begin{minipage}{.9\linewidth}
@@ -129,8 +135,7 @@
    \begin{center}
 %   \setlength{\parindent}{0pt}
    \fbox{\begin{minipage}{.9\linewidth}
-     \lstset{breakatwhitespace=true,breaklines=true,language=TeX,basicstyle=\small}
-     \lstinputlisting[]{example.out}
+     \lstinputlisting{example.out}
    \end{minipage}}
 \end{center}
 }
@@ -201,7 +206,7 @@
 %</driver>
 % \fi
 %
-% \CheckSum{1119}
+% \CheckSum{1138}
 %
 % \CharacterTable
 %  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -228,6 +233,7 @@
 % \changes{1.5}{2018/09/09}{Reintroduced the original command (now as tikzmarknode) with a mathchoice hack for different math modes}
 % \changes{1.6}{2018/10/18}{Added the ability to save node information between runs and between TeX documents}
 % \changes{1.7}{2019/05/07}{Added conditions to test if a tikzmark is on a particular page}
+% \changes{1.8}{2019/10/04}{Fixed some bugs with subnode and tikzmarknode inside maths}
 %
 % \DoNotIndex{\newcommand,\newenvironment}
 %
@@ -234,7 +240,7 @@
 % \providecommand*{\url}{\texttt}
 % \title{The \textsf{tikzmark} package}
 % \author{Andrew Stacey \\ \url{loopspace at mathforge.org}}
-% \date{v1.7~from 2019/05/07}
+% \date{v1.8~from 2019/10/04}
 %
 %
 % \maketitle
@@ -342,7 +348,7 @@
 %
 % \begin{figure}
 % \centering
-% \includegraphics{tikzmarkExample}
+% \IfFileExists{tikzmarkExample.pdf}{\includegraphics{tikzmarkExample}}{}
 % \caption{First use of tikzmark}
 % \label{fig:tikzmarkex}
 % \end{figure}
@@ -467,6 +473,8 @@
 % Possible values are (by default) \Verb+above+, \Verb+below+, \Verb+left+, \Verb+right+, and \Verb+ignore+.
 % (The last one sets the vector to the zero vector.)
 %
+% Previous versions of \Verb+tikzmark+ tried to make this work correctly with the mark being on, say, \(5\) pages further on but this got too fiddly so this version just pretends that the mark is on the next or previous page and points to it as appropriate.
+%
 % \item \Verb+/tikz/tikzmark prefix=<prefix>+  and \Verb+/tikz/tikzmark suffix=<suffix>+
 %
 % These keys allow for the automatic addition of a prefix and/or suffix to each \Verb+\tikzmark+ name.
@@ -690,7 +698,7 @@
 % This produces:
 %
 % \begin{center}
-% \fbox{\includegraphics{tikzrefextnodes}}
+% \fbox{\IfFileExists{tikzrefextnodes.pdf}{\includegraphics{tikzrefextnodes}}{}}
 % \end{center}
 %
 % \subsection{Code Listings}
@@ -962,10 +970,14 @@
         \@ifundefined{save at pg@\pgfpictureid}{}{%
           \pgfkeysvalueof{/tikz/next page vector}%
         \edef\tmk at pg{\the\numexpr \csname save at pg@\csname save at pt@\tmk at label\endcsname\endcsname - \csname save at pg@\pgfpictureid\endcsname\relax}%
-        \advance \pgf at xa by %
-        \tmk at pg\pgf at x\relax
-        \advance \pgf at ya by %
-        \tmk at pg\pgf at y\relax
+        \ifnum \tmk at pg > 0 \relax
+        \advance \pgf at xa by \pgf at x\relax
+        \advance \pgf at ya by \pgf at y\relax
+        \fi
+        \ifnum \tmk at pg < 0 \relax
+        \advance \pgf at xa by -\pgf at x\relax
+        \advance \pgf at ya by -\pgf at y\relax
+        \fi
         }%
       }%
       \pgf at x=\pgf at xa
@@ -1206,7 +1218,10 @@
   \expandafter\ifx\csname\tzmk at pic\endcsname\relax
 \edef\tzmk at pic{\tzmk at prfx\the\numexpr\the\pgf at picture@serial at count-3\relax}%
   \expandafter\ifx\csname\tzmk at pic\endcsname\relax
-%    \pgfnodealias{#2}{#2-t}%  %% Fallback
+  \pgfutil at ifundefined{pgf at sh@ns@#2}{%
+    \pgfnodealias{#2}{#2-t}%
+    \tikzmarkalias{#2}{#2-t}%
+  }{}%
   \else
     \pgfnodealias{#2}{#2-d}%
     \tikzmarkalias{#2}{#2-d}%
@@ -1275,7 +1290,10 @@
   \expandafter\ifx\csname\tzmk at pic\endcsname\relax
 \edef\tzmk at pic{\tzmk at prfx\the\numexpr\the\pgf at picture@serial at count-3\relax}%
   \expandafter\ifx\csname\tzmk at pic\endcsname\relax
-  % No fallback due to potential nested mathchoices
+  \pgfutil at ifundefined{pgf at sh@ns@#2}{%
+    \pgfnodealias{#2}{#2-t}%
+    \tikzmarkalias{#2}{#2-t}%
+  }{}%
   \else
     \pgfnodealias{#2}{#2-d}%
     \tikzmarkalias{#2}{#2-d}%

Modified: trunk/Master/texmf-dist/tex/latex/tikzmark/tikzlibrarytikzmark.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tikzmark/tikzlibrarytikzmark.code.tex	2019-10-05 20:49:13 UTC (rev 52292)
+++ trunk/Master/texmf-dist/tex/latex/tikzmark/tikzlibrarytikzmark.code.tex	2019-10-05 20:49:26 UTC (rev 52293)
@@ -144,10 +144,14 @@
         \@ifundefined{save at pg@\pgfpictureid}{}{%
           \pgfkeysvalueof{/tikz/next page vector}%
         \edef\tmk at pg{\the\numexpr \csname save at pg@\csname save at pt@\tmk at label\endcsname\endcsname - \csname save at pg@\pgfpictureid\endcsname\relax}%
-        \advance \pgf at xa by %
-        \tmk at pg\pgf at x\relax
-        \advance \pgf at ya by %
-        \tmk at pg\pgf at y\relax
+        \ifnum \tmk at pg > 0 \relax
+        \advance \pgf at xa by \pgf at x\relax
+        \advance \pgf at ya by \pgf at y\relax
+        \fi
+        \ifnum \tmk at pg < 0 \relax
+        \advance \pgf at xa by -\pgf at x\relax
+        \advance \pgf at ya by -\pgf at y\relax
+        \fi
         }%
       }%
       \pgf at x=\pgf at xa
@@ -326,6 +330,10 @@
   \expandafter\ifx\csname\tzmk at pic\endcsname\relax
 \edef\tzmk at pic{\tzmk at prfx\the\numexpr\the\pgf at picture@serial at count-3\relax}%
   \expandafter\ifx\csname\tzmk at pic\endcsname\relax
+  \pgfutil at ifundefined{pgf at 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 at pic\endcsname\relax
 \edef\tzmk at pic{\tzmk at prfx\the\numexpr\the\pgf at picture@serial at count-3\relax}%
   \expandafter\ifx\csname\tzmk at pic\endcsname\relax
-  % No fallback due to potential nested mathchoices
+  \pgfutil at ifundefined{pgf at sh@ns@#2}{%
+    \pgfnodealias{#2}{#2-t}%
+    \tikzmarkalias{#2}{#2-t}%
+  }{}%
   \else
     \pgfnodealias{#2}{#2-d}%
     \tikzmarkalias{#2}{#2-d}%



More information about the tex-live-commits mailing list