summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternal.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternal.sty')
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternal.sty59
1 files changed, 48 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternal.sty b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternal.sty
index 7814fb566f6..62c7709616a 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternal.sty
+++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternal.sty
@@ -14,7 +14,7 @@
%%% - nested \input commands have been updated
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Date of this copy: Mi 31. Mär 21:41:41 CEST 2010 %%%
+%%% Date of this copy: Mi 14. Jul 21:31:43 CEST 2010 %%%
@@ -50,6 +50,7 @@
\def\tikzsetnextfilename#1{\gdef\tikzexternal@nextfile{#1}}
\def\tikzsetexternalprefix#1{\def\tikzexternal@filenameprefix{#1}}
\def\tikzsetfigurename#1{\def\tikzexternal@figurename{#1}}%
+\def\tikzappendtofigurename#1{\expandafter\def\expandafter\tikzexternal@figurename\expandafter{\tikzexternal@figurename #1}}%
\tikzsetnextfilename{}
\tikzsetexternalprefix{}
\tikzsetfigurename{\tikzexternal@realjob-figure}%
@@ -107,21 +108,57 @@
\fi
\endgroup
\global\let\tikzexternal@nextfile=\empty
- \tikzexternalimage\tikzexternal@curfilename
+ \pgfincludeexternalgraphics\tikzexternal@curfilename
}%
-\def\tikzexternalimage#1{%
- % now check for (optional) .dpth files for the 'baseline' option:
+\def\tikzset#1{}\def\pgfkeys#1{}\def\pgfqkeys#1#2{}
+\long\def\beginpgfgraphicnamed#1#2\endpgfgraphicnamed{\pgfincludeexternalgraphics{#1}}
+\def\tikzifinpicture#1#2{#2}
+\def\pgfincludeexternalgraphics#1{%
\begingroup
+ \pgfexternalreaddpth{#1}%
\setbox1=\hbox{\includegraphics{#1}}%
- \openin1=#1.dpth
- \ifeof1 \box1
+ \ifdim\pgfretval=0pt
+ \box1
\else
- \read1 to\pgfincludeexternalgraphics@dp \closein1
- \dimen0=\pgfincludeexternalgraphics@dp\relax
- \hbox{\lower\dimen0\box1}%
+ \dimen0=\pgfretval\relax
+ \hbox{\lower\dimen0 \box1 }%
\fi
\endgroup
}
-\def\tikzset#1{}\def\pgfkeys#1{}\def\pgfqkeys#1#2{}
-\long\def\beginpgfgraphicnamed#1#2\endpgfgraphicnamed{\tikzexternalimage{#1}}
+\newread\r@pgf@reada
+\def\pgfexternalreaddpth#1{%
+ \edef\pgfexternalreaddpth@restore{%
+ \noexpand\endlinechar=\the\endlinechar\space
+ \noexpand\catcode`\noexpand\@=\the\catcode`\@\space
+ }%
+ \def\pgfretval{0pt}%
+ \endlinechar=-1 % suppress white space at end
+ \catcode`\@=11
+ \openin\r@pgf@reada=#1.dpth
+ \pgfincludeexternalgraphics@read@dpth
+ \pgfexternalreaddpth@restore
+}%
+\def\pgfincludeexternalgraphics@read@dpth{%
+ \ifeof\r@pgf@reada
+ \closein\r@pgf@reada
+ \else
+ \read\r@pgf@reada to\pgfincludeexternalgraphics@auxline
+ \ifx\pgfincludeexternalgraphics@auxline\empty
+ \else
+ \expandafter\pgfincludeexternalgraphics@read@dpth@line\pgfincludeexternalgraphics@auxline\pgfincludeexternalgraphics@read@dpth@line@EOI
+ \fi
+ \expandafter\pgfincludeexternalgraphics@read@dpth
+ \fi
+}%
+\long\def\pgfincludeexternalgraphics@read@dpth@line#1#2\pgfincludeexternalgraphics@read@dpth@line@EOI{%
+ \ifcat\noexpand#1\relax
+ \if@filesw
+ {\toks0={#1#2}%
+ \immediate\write\@auxout{\noexpand\def\noexpand\dpthimport{\the\toks0 }\noexpand\dpthimport }%
+ }%
+ \fi
+ \else%
+ \def\pgfretval{#1#2}%
+ \fi
+}%