diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternalshared.code.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternalshared.code.tex | 73 |
1 files changed, 54 insertions, 19 deletions
diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternalshared.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternalshared.code.tex index 757439ed17f..2d7a81b2bf5 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternalshared.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternalshared.code.tex @@ -14,7 +14,7 @@ %%% - nested \input commands have been updated %%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% Date of this copy: Do 5. Aug 20:33:50 CEST 2010 %%% +%%% Date of this copy: Sa 30. Apr 21:00:37 CEST 2011 %%% @@ -46,7 +46,6 @@ \toksdef\t@tikzexternal@tmpa=0 \toksdef\t@tikzexternal@tmpb=1 -\newwrite\tikzexternal@outfile \newif\iftikzexternal@nestedflag \newif\iftikzexternal@verboseio \newif\iftikzexternal@genfigurelist @@ -132,6 +131,9 @@ \pgfqkeys{/tikz/external}{ figure list/.is if=tikzexternal@genfigurelist, aux in dpth/.style={/pgf/images/aux in dpth=#1},% + disable dependency files/.code={% + \let\tikzexternalfiledependsonfile@ACTIVE=\tikzexternalfiledependsonfile + }, % 'mode' applies only if \jobname==real job name. mode/.is choice, mode/only graphics/.code = {% @@ -175,7 +177,7 @@ shell escape/.initial=-shell-escape, read main aux/.is if=pgfexternalreadmainaux, image discarded text/.initial={% - [[ {\sc Image Discarded Due To} {\tt`/tikz/external/% + [[ \textsc{Image Discarded Due To} \texttt{`/tikz/external/% \ifcase\tikzexternal@opmode\relax mode=only graphics% \or @@ -215,6 +217,7 @@ \tikzexternal@optimize@RESTORE },% optimize=true, + optimize away text/.code={[ \textsc{\string#1\ optimized away because it does not contribute to exported PDF}]}, optimize/install/.code={},% optimize/restore/.code={},% % Expects two arguments, the command name and (optionally) a count @@ -332,7 +335,7 @@ \tikzexternalenable \def\tikzexternal@determineimgextension##1:##2\relax{\gdef\tikzexternalimgextension{##1}}% \xdef\pgf@tempa{\pgfsys@imagesuffixlist}% - \expandafter\tikzexternal@determineimgextension\pgf@tempa\relax + \expandafter\tikzexternal@determineimgextension\pgf@tempa:\relax \pgfutil@ifundefined{includegraphics}{% \let\tikzexternal@orig@includegraphics=\relax }{% @@ -344,6 +347,14 @@ } \def\tikzexternalize@hasbeencalled{0}% +\def\tikzifexternalizehasbeencalled#1#2{% + \if1\tikzexternalize@hasbeencalled + #1% + \else + #2% + \fi +}% + % If mode=`convert with system call', the boolean \ifpgfexternalreadmainaux % will be set depending on the current lock file. % @@ -459,27 +470,40 @@ \else \ifx#1\@EOI \else - \expandafter\let\csname tikzexternalauxlock@handleref@orig@\string#1\endcsname=#1% - \def#1{\tikzexternalauxlock@handleref@repl{#1}}% + {% + % strip the leading '\' + % this allows proper \protect ion when you write + % \caption{...\cite{..}} and #1=\cite + \escapechar=-1 + \xdef\pgf@temp{\string#1}% + }% + \expandafter\let\csname tikzexternalauxlock@handleref@orig@\pgf@temp\endcsname=#1% + \edef#1{\noexpand\pgf@texdist@protect\noexpand\tikzexternalauxlock@handleref@repl{\pgf@temp}}% \expandafter\expandafter\expandafter\tikzexternalauxlock@handleref@loop \fi \fi }% \def\tikzexternalauxlock@handleref@repl#1{\pgfutil@ifnextchar[{\tikzexternalauxlock@handleref@repl@{#1}}{\tikzexternalauxlock@handleref@repl@{#1}[]}}% \def\tikzexternalauxlock@handleref@repl@#1[#2]#3{% - \csname tikzexternalauxlock@handleref@orig@\string#1\endcsname{#3}% - \begingroup - \def\n{\pgfexternal@hat\pgfexternal@hat J}% - \tikzexternal@assemble@systemcall{\pgfactualjobname}{\pgf@tempa}% - \def\space{\noexpand\space}% - \pgfexternalstorecommand{% - \noexpand\begingroup - \noexpand\toks0={\pgf@tempa}% - \noexpand\immediate\noexpand\write16{\tikzexternalauxlock@handleref@warning{#3}{\noexpand\the\noexpand\toks0}}% - \noexpand\G@refundefinedtrue - \noexpand\endgroup + \tikzifexternalizingcurrent{% + % note that '#1' is NO control sequence! it is a protected string + \csname tikzexternalauxlock@handleref@orig@#1\endcsname{#3}% + \begingroup + \def\n{\pgfexternal@hat\pgfexternal@hat J}% + \tikzexternal@assemble@systemcall{\pgfactualjobname}{\pgf@tempa}% + \def\space{\noexpand\space}% + \pgfexternalstorecommand{% + \noexpand\begingroup + \noexpand\toks0={\pgf@tempa}% + \noexpand\immediate\noexpand\write16{\tikzexternalauxlock@handleref@warning{#3}{\noexpand\the\noexpand\toks0}}% + \noexpand\G@refundefinedtrue + \noexpand\endgroup + }% + \endgroup + }{% + % ok. We are not externalizing this part of the document. + % Throw the citation away without further notice. }% - \endgroup }% \def\tikzexternalauxlock@handleref@warning#1#2{% \n @@ -798,6 +822,11 @@ \else \pgfutil@ifundefined{tikzexternal@listmode@openedfile}{% \message{Opening '\tikzexternal@realjob.figlist' for writing.}% + \begingroup + \globaldefs=1 + % this gets round '\outer\newwrite' in plain TeX: + \csname newwrite\endcsname\tikzexternal@outfile + \endgroup \immediate\openout\tikzexternal@outfile=\tikzexternal@realjob.figlist\relax \gdef\tikzexternal@listmode@openedfile{1}% \if\tikzexternal@opmode5% mode='list and make' @@ -818,6 +847,9 @@ \def\tikzexternal@list@and@make@gentarget#1{% \tikzexternal@assemble@systemcall{#1}{\pgf@tempa}% + \def\tikzexternal@tempb{\pgfutilstrreplace{^^J}{^^J\tikzexternal@TABchar}}% + \expandafter\tikzexternal@tempb\expandafter{\pgf@tempa}% + \let\pgf@tempa=\pgfretval \iftikzexternal@verboseio \immediate\write16{Writing '#1' to '\tikzexternal@realjob.makefile'.}% \fi @@ -862,6 +894,7 @@ \def\tikzexternalmakefiledefaultdeprule{% \immediate\write\tikzexternal@outmakefile{\tikzexternal@PERCENTchar.\tikzexternaldepext:}% + \immediate\write\tikzexternal@outmakefile{\tikzexternal@TABchar mkdir -p $(dir $@)}% \immediate\write\tikzexternal@outmakefile{\tikzexternal@TABchar touch $@ \tikzexternal@HASHchar\space will be filled later.}% }% @@ -1056,7 +1089,9 @@ \iftikzexternal@verbose@optimize \immediate\write16{The command '\the\toks0' has been optimized away. Use '/tikz/external/optimize=false' to disable this.}% \fi - [ {\sc \string#1\ optimized away because it does not contribute to exported PDF}]% + \endgroup + \begingroup + \pgfkeysvalueof{/tikz/external/optimize away text/.@cmd}#1\pgfeov% \endgroup }% |