From 90ae413a94da014dbf7a6a8ab584f7c668483a5a Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 27 Feb 2014 00:01:50 +0000 Subject: pgf 3.0.0 git-svn-id: svn://tug.org/texlive/trunk@33057 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/pgf/doc/pgfmanual.pdflinks.code.tex | 22 ++++++++++++++++++++-- .../latex/pgf/doc/pgfmanual.prettyprinter.code.tex | 10 +++++++--- 2 files changed, 27 insertions(+), 5 deletions(-) (limited to 'Master/texmf-dist/tex/latex/pgf/doc') diff --git a/Master/texmf-dist/tex/latex/pgf/doc/pgfmanual.pdflinks.code.tex b/Master/texmf-dist/tex/latex/pgf/doc/pgfmanual.pdflinks.code.tex index e507d30e85c..ba9ed33e243 100644 --- a/Master/texmf-dist/tex/latex/pgf/doc/pgfmanual.pdflinks.code.tex +++ b/Master/texmf-dist/tex/latex/pgf/doc/pgfmanual.pdflinks.code.tex @@ -82,6 +82,9 @@ /pdflinks/codeexample links/.is if=pgfmanualprettyenabled, /pdflinks/codeexample links/.default=true, % + % How to render a hyperlink + /pdflinks/render hyperlink/.code=#1, + % % whenever an unqualified key is found, the following key prefix % list is tried to find a match. /pdflinks/search key prefixes in/.initial={/tikz/,/pgf/}, @@ -123,6 +126,12 @@ /pdflinks/internal link prefix/.initial=pgf, } +\begingroup + \catcode`\_=12 + \gdef\pgfmanualpdf@underscore{_}% + \catcode`\ =13\relax\gdef\pgfmanualpdf@install@active@space{\def {\space}}% +\endgroup + \gdef\pgfmanualpdf@installreplacements{% \def\marg##1{{##1}}% \def\oarg##1{[##1]}% @@ -132,10 +141,15 @@ \def\\{\textbackslash}% \def\space{:}% \edef\ {\space}% + \edef\SPACE{\` \relax}% + \ifnum\the\catcode`\ =13 % + \pgfmanualpdf@install@active@space + \fi \edef\#{}% \def\printanat{@}% \def\protect{}% \def\textasciicircum{o}% + \def\_{\pgfmanualpdf@underscore}% \expandafter\edef\pgfmanual@verb@activebar{\pgfmanual@verb@bar}% }% @@ -216,7 +230,11 @@ \fi \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@@}% - \expandafter\hypertarget\expandafter{\pgfmanualpdflabel@@}{#2}% + \ifvmode% + \expandafter\hypertarget\expandafter{\pgfmanualpdflabel@@}{#2}% + \else% + {\setbox0=\hbox{\raise1em\hbox{\expandafter\hypertarget\expandafter{\pgfmanualpdflabel@@}{}}}\ht0=0pt\box0}#2% + \fi% \else #2% \fi @@ -262,7 +280,7 @@ }% \def\pgfmanualpdfref@#1#2{% \pgfkeysgetvalue{/pdflinks/internal link prefix}\pgfmanual@temp - \expandafter\hyperlink\expandafter{\pgfmanual@temp.#1}{#2}% + \expandafter\hyperlink\expandafter{\pgfmanual@temp.#1}{\pgfkeysvalueof{/pdflinks/render hyperlink/.@cmd}{#2}\pgfeov}% \ifpgfmanualshowlabels \pgfkeysvalueof{/pdflinks/show labels code/.@cmd}{#1}\pgfeov \fi diff --git a/Master/texmf-dist/tex/latex/pgf/doc/pgfmanual.prettyprinter.code.tex b/Master/texmf-dist/tex/latex/pgf/doc/pgfmanual.prettyprinter.code.tex index 85482fedaaf..3c4f5c28fbc 100644 --- a/Master/texmf-dist/tex/latex/pgf/doc/pgfmanual.prettyprinter.code.tex +++ b/Master/texmf-dist/tex/latex/pgf/doc/pgfmanual.prettyprinter.code.tex @@ -191,6 +191,10 @@ % #1: the coordinate system name (*without* the leading brace). % The leading brace must be re-inserted by this style. /codeexample/prettyprint/point with cs/.code 2 args={(#1:#2},% + % + % The font / color command to use for comments. Will be set at + % the beginning of a comment + /codeexample/prettyprint/comment font/.initial=,% % the same with specialised code: %/codeexample/prettyprint/point with cs//.code 2 args={(#1:#2},% % @@ -285,12 +289,12 @@ % \def\pgfmanual@pretty@installcommenthandler{% \expandafter\def\pgfmanual@pretty@activepercent{% - \begingroup + \begingroup% \pgfmanualprettycommentactivetrue \expandafter\let\pgfmanual@pretty@activenl=\pgfmanual@pretty@recoveraftercomment \expandafter\def\pgfmanual@pretty@activepercent{\%}% - %\tt - \% % + \pgfkeysvalueof{/codeexample/prettyprint/comment font}%\tt + \%% }% }% \def\pgfmanual@pretty@recoveraftercomment{% -- cgit v1.2.3