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 --- Master/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty | 2 +- .../tex/latex/pgf/doc/pgfmanual.pdflinks.code.tex | 22 ++++++++- .../latex/pgf/doc/pgfmanual.prettyprinter.code.tex | 10 ++-- .../libraries/tikzlibraryexternal.code.tex | 33 +++++++++++++ Master/texmf-dist/tex/latex/pgf/math/pgfmath.sty | 1 + .../tex/latex/pgf/systemlayer/pgfsys.sty | 4 ++ .../texmf-dist/tex/latex/pgf/utilities/pgffor.sty | 1 + .../tex/latex/pgf/utilities/pgfpages.sty | 57 +++++++++------------- 8 files changed, 89 insertions(+), 41 deletions(-) (limited to 'Master/texmf-dist/tex/latex/pgf') diff --git a/Master/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty b/Master/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty index ad5c9b2ad4f..22eb6a92941 100644 --- a/Master/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty +++ b/Master/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty @@ -10,7 +10,7 @@ \RequirePackage{pgfrcs} -\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/latex/pgf/basiclayer/pgf.sty,v 1.12 2008/01/15 17:17:22 tantau Exp $ +\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/latex/pgf/basiclayer/pgf.sty,v 1.14 2013/12/18 15:01:45 tantau Exp $ \def\pgf@draft{} \DeclareOption{draft}{\def\pgf@draft{\pgf@draftmodetrue}} 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{% diff --git a/Master/texmf-dist/tex/latex/pgf/frontendlayer/libraries/tikzlibraryexternal.code.tex b/Master/texmf-dist/tex/latex/pgf/frontendlayer/libraries/tikzlibraryexternal.code.tex index 9fe775dc8a8..c3000401b0b 100644 --- a/Master/texmf-dist/tex/latex/pgf/frontendlayer/libraries/tikzlibraryexternal.code.tex +++ b/Master/texmf-dist/tex/latex/pgf/frontendlayer/libraries/tikzlibraryexternal.code.tex @@ -22,9 +22,19 @@ % It replaces \tikzpicture/ \endtikzpicture and \tikz and invokes \beginpgfgraphicnamed ... \endpgfgraphicnamed % commands if necessary. +% load this package in order to get \pdf@mdfivesum . +% \pdf@mdfivesum is available for pdftex and lualatex and computes the +% md5 sum. Note that pdftex has \pdfmdfivesum, but lualatex does not +% have it. +\usepackage{pdftexcmds} + % source generic implementation: \input tikzexternalshared.code.tex +\pgfutil@IfUndefined{pdf@mdfivesum}{}{% + \let\tikzexternal@mdfivesum=\pdf@mdfivesum +}% + \def\tikzexternal@TEXDIALECT@begpicture{\begin{tikzpicture}} \def\tikzexternal@TEXDIALECT@endpicture{\end{tikzpicture}}% @@ -52,6 +62,7 @@ \noexpand\endgroup \noexpand#1{\the\t@tikzexternal@tmpa}% }% + \t@tikzexternal@tmpa={}% release memory. \else \t@tikzexternal@tmpa=\expandafter{\the\t@tikzexternal@tmpa #2\end{#3}}% \def\tikzexternal@TEXDIALECT@collectpicture@next{% @@ -61,8 +72,30 @@ }% \def\tikzexternal@laTeX@collect@until@end@tikzpicturetikzpicturestring{tikzpicture}% +\def\tikzexternal@handle@landscape{% + \ltx@ifpackageloaded{pdflscape}{% + % Work around a bug in conjunction with pdflscape and + % external: without this optimize-away-instruction, the + % externalized image would be rotated - and it will be rotated + % once more again when it is included. + % + % if we "optimize it away", the landscape stuff will be + % omitted. I hope this is enough... might not be entirely + % fool-proof; perhaps we need to set it to \relax. For now, it + % will probably do the job + \tikzset{ + external/.cd, + optimize command away=\landscape, + optimize command away=\endlandscape + }% + }{% + }% +}% + \AtBeginDocument{% \pgfutil@ifundefined{tikzexternalrealjob}{% \global\let\tikzexternalrealjob=\jobname }{}% + \tikzexternal@handle@landscape }% + diff --git a/Master/texmf-dist/tex/latex/pgf/math/pgfmath.sty b/Master/texmf-dist/tex/latex/pgf/math/pgfmath.sty index b8092306e25..f079db528ea 100644 --- a/Master/texmf-dist/tex/latex/pgf/math/pgfmath.sty +++ b/Master/texmf-dist/tex/latex/pgf/math/pgfmath.sty @@ -7,6 +7,7 @@ % % See the file doc/generic/pgf/licenses/LICENSE for more details. +\RequirePackage{pgfrcs,pgfkeys} \input{pgfmath.code.tex} \endinput diff --git a/Master/texmf-dist/tex/latex/pgf/systemlayer/pgfsys.sty b/Master/texmf-dist/tex/latex/pgf/systemlayer/pgfsys.sty index 2e2eab766e2..6f9c2b8b932 100644 --- a/Master/texmf-dist/tex/latex/pgf/systemlayer/pgfsys.sty +++ b/Master/texmf-dist/tex/latex/pgf/systemlayer/pgfsys.sty @@ -9,6 +9,10 @@ \RequirePackage{pgfrcs} +\DeclareOption{dvisvgm}{\def\pgfsysdriver{pgfsys-dvisvgm.def}} + +\ProcessOptions + \input{pgfsys.code.tex} \input{pgfsyssoftpath.code.tex} \input{pgfsysprotocol.code.tex} diff --git a/Master/texmf-dist/tex/latex/pgf/utilities/pgffor.sty b/Master/texmf-dist/tex/latex/pgf/utilities/pgffor.sty index dc04e9aeea2..c0de8c134ad 100644 --- a/Master/texmf-dist/tex/latex/pgf/utilities/pgffor.sty +++ b/Master/texmf-dist/tex/latex/pgf/utilities/pgffor.sty @@ -9,6 +9,7 @@ \RequirePackage{pgfrcs} \RequirePackage{pgfkeys} +\RequirePackage{pgfmath} \input{pgffor.code.tex} diff --git a/Master/texmf-dist/tex/latex/pgf/utilities/pgfpages.sty b/Master/texmf-dist/tex/latex/pgf/utilities/pgfpages.sty index 9e1ebc3035e..2144e9c7005 100644 --- a/Master/texmf-dist/tex/latex/pgf/utilities/pgfpages.sty +++ b/Master/texmf-dist/tex/latex/pgf/utilities/pgfpages.sty @@ -7,7 +7,7 @@ % % See the file doc/generic/pgf/licenses/LICENSE for more details. -\ProvidesPackage{pgfpages}[2004/11/05 ver 0.01] +\ProvidesPackage{pgfpages}[2011/01/05 ver 0.02] \RequirePackage{pgfcore,calc} @@ -790,10 +790,11 @@ \else% \pgflowlevel{\pgftransformyscale{\csname pgfpages@p@\the\pgf@cpn @yscale\endcsname}}% \fi% + \pgfscope% \expandafter\ifx\csname pgfpages@p@\the\pgf@cpn @rotation\endcsname\relax% - \pgfscope% \else% - \pgflowlevel{\pgftransformrotate{\csname pgfpages@p@\the\pgf@cpn @rotation\endcsname}}% + \pgflowlevel{\pgftransformrotate{\csname + pgfpages@p@\the\pgf@cpn @rotation\endcsname}}% \fi% \pgfutil@tempdima=\csname pgfpages@p@\the\pgf@cpn @width\endcsname\relax% \pgfutil@tempdimb=\csname pgfpages@p@\the\pgf@cpn @height\endcsname\relax% @@ -855,11 +856,14 @@ \@parboxrestore% \pgfpages@originalshipout% \vbox{\hbox{% - \hskip-1in% - \vbox to \pgfphysicalheight{% - \vss\box\pgfpages@shipoutbox% - \vskip1in% - }}}% + \pgfsetupphysicalpagesizes% + \hskip-1in% + \vbox to \pgfphysicalheight{% + \vss\box\pgfpages@shipoutbox% + \vskip1in% + }}% + \pgfsetupphysicalpagesizes% + }% \endgroup% } @@ -896,8 +900,13 @@ % \pgfhookintoshipout \newcommand\pgfhookintoshipout{ - \let\pgfpages@originalshipout=\shipout - \let\shipout=\pgfpages@interceptshipout + \ifx\CROP@shipout\undefined + \let\pgfpages@originalshipout=\shipout + \let\shipout=\pgfpages@interceptshipout + \else + \let\pgfpages@originalshipout=\CROP@shipout + \let\CROP@shipout=\pgfpages@interceptshipout + \fi } \def\pgfpages@interceptshipout{% @@ -1005,37 +1014,15 @@ % \pgfsetupphysicalpagesizes \newcommand\pgfsetupphysicalpagesizes{% - % The following code was send to me by Rolf Niepraschk - \ifx\Gin@driver\pgfutil@empty\else% - \filename@parse{\Gin@driver}\@tempswafalse% - \def\reserved@a{dvips}% - \ifx\filename@base\reserved@a\@tempswatrue\fi% - \def\reserved@a{dvipdfm}% - \ifx\filename@base\reserved@a\@tempswatrue\fi% - \if@tempswa% - \AtBeginDvi{% - \special{papersize=\the\pgfphysicalwidth,\the\pgfphysicalheight}}% - \fi% - \def\reserved@a{pdftex}% - \ifx\filename@base\reserved@a - \pdfpagewidth\pgfphysicalwidth\pdfpageheight\pgfphysicalheight% - \fi% - \def\reserved@a{vtex}% - \ifx\filename@base\reserved@a - \mediawidth\pgfphysicalwidth\mediaheight\pgfphysicalheight% - \fi% - \fi + \pgfsys@global@papersize{\the\pgfphysicalwidth}{\the\pgfphysicalheight}% } % % Start/End setup % -\AtBeginDocument -{ - \pgfhookintoshipout - \pgfsetupphysicalpagesizes -} +\pgfhookintoshipout + \AtEndDocument { \clearpage -- cgit v1.2.3