Skip to content
Permalink
Browse files

Remove cleanuplink and friends #796

  • Loading branch information
hmenke committed Dec 1, 2019
1 parent d8ae2fc commit 8445f362fd9f123d56ef029fe7a45f12376aa63a
Showing with 5 additions and 32 deletions.
  1. +2 −22 doc/generic/pgf/macros/pgfmanual-en-macros.tex
  2. +3 −10 tex/latex/pgf/doc/pgfmanual.pdflinks.code.tex
@@ -10,28 +10,8 @@
% $Header$


\providecommand\href[2]{\texttt{#1}}
\providecommand\hypertarget[2]{\texttt{#1}}
\providecommand\hyperlink[2]{\texttt{#1}}


\newcount\pgfmanualtargetcount

\def\cleanuplink#1{%
\expandafter\ifx\csname pgfmanual@hlink@#1\endcsname\relax%
\global\advance\pgfmanualtargetcount by1\relax%
\expandafter\xdef\csname pgfmanual@hlink@#1\endcsname{pgfmanual-pos-\the\pgfmanualtargetcount}%
\fi%
}
\def\cleanedhypertarget#1#2{% necessary for dvisvgm
\cleanuplink{#1}%
\hypertarget{\csname pgfmanual@hlink@#1\endcsname}{#2}%
}
\def\cleanedhyperlink#1#2{%
\cleanuplink{#1}%
\hyperlink{\csname pgfmanual@hlink@#1\endcsname}{#2}%
}

\colorlet{examplefill}{yellow!80!black}
\definecolor{graphicbackground}{rgb}{0.96,0.96,0.8}
\definecolor{codebackground}{rgb}{0.9,0.9,1}
@@ -232,7 +212,7 @@
\newenvironment{luafiledescription}[1]{}{}

\newenvironment{luacommand}[4]{
\cleanedhypertarget{pgf/lua/#1}{\luageneric{#2}{#3}{\texttt{(#4)}}{\texttt{function}}}
\hypertarget{pgf/lua/#1}{\luageneric{#2}{#3}{\texttt{(#4)}}{\texttt{function}}}
}{\endluageneric}

\newenvironment{luaparameters}{\par\emph{Parameters:}%
@@ -313,7 +293,7 @@
\newenvironment{math-function}[1]{
\def\mathdefaultname{#1}
\extractmathfunctionname{#1}
\edef\mathurl{{math:\mathname}}\expandafter\cleanedhypertarget\expandafter{\mathurl}{}%
\edef\mathurl{{math:\mathname}}\expandafter\hypertarget\expandafter{\mathurl}{}%
\begin{pgfmanualentry}
\pgfmanualentryheadline{\texttt{#1}}%
\index{\mathname @\protect\texttt{\mathname} math function}%
@@ -53,13 +53,6 @@

\newif\ifpgfmanualshowlabels

% FIXME : \cleanedhypertarget/\cleanedhyperlink have been introduced
% in http://pgf.cvs.sourceforge.net/viewvc/pgf/pgf/latex/pgf/doc/pgfmanual.pdflinks.code.tex?r1=1.15&r2=1.16
% but they are not present on my (CFR) system... what problem did they
% address/how can we satisfy this dependency?
\pgfutil@IfUndefined{cleanedhypertarget}{\let\cleanedhypertarget=\hypertarget}{}
\pgfutil@IfUndefined{cleanedhyperlink}{\let\cleanedhyperlink=\hyperlink}{}

\pgfkeys{%
/codeexample/prettyprint/cs arguments/pgfkeys/.initial=1,
/codeexample/prettyprint/cs/pgfkeys/.code 2 args={\pgfmanualpdfref{#1}{#1}\{\pgfmanualprettyprintpgfkeys{#2}\pgfmanualclosebrace},
@@ -238,9 +231,9 @@
\expandafter\gdef\csname pgfd@lbl@\pgfmanualpdflabel@@\endcsname{w}% 1. remember the label AND remember that we "w"rote it into the pdf.
\edef\pgfmanualpdflabel@@{\pgfkeysvalueof{/pdflinks/internal link prefix}.\pgfmanualpdflabel@@}%
\ifvmode%
\expandafter\cleanedhypertarget\expandafter{\pgfmanualpdflabel@@}{#2}%
\expandafter\hypertarget\expandafter{\pgfmanualpdflabel@@}{#2}%
\else%
{\setbox0=\hbox{\raise1em\hbox{\expandafter\cleanedhypertarget\expandafter{\pgfmanualpdflabel@@}{}}}\ht0=0pt\box0}#2%
{\setbox0=\hbox{\raise1em\hbox{\expandafter\hypertarget\expandafter{\pgfmanualpdflabel@@}{}}}\ht0=0pt\box0}#2%
\fi%
\else
#2%
@@ -287,7 +280,7 @@
}%
\def\pgfmanualpdfref@#1#2{%
\pgfkeysgetvalue{/pdflinks/internal link prefix}\pgfmanual@temp
\expandafter\cleanedhyperlink\expandafter{\pgfmanual@temp.#1}{\pgfkeysvalueof{/pdflinks/render hyperlink/.@cmd}{#2}\pgfeov}%
\expandafter\hyperlink\expandafter{\pgfmanual@temp.#1}{\pgfkeysvalueof{/pdflinks/render hyperlink/.@cmd}{#2}\pgfeov}%
\ifpgfmanualshowlabels
\pgfkeysvalueof{/pdflinks/show labels code/.@cmd}{#1}\pgfeov
\fi

0 comments on commit 8445f36

Please sign in to comment.
You can’t perform that action at this time.