summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcoreexternal.code.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcoreexternal.code.tex')
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcoreexternal.code.tex464
1 files changed, 252 insertions, 212 deletions
diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcoreexternal.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcoreexternal.code.tex
index 8f769db849b..5b9be1a3087 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcoreexternal.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcoreexternal.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 %%%
@@ -27,16 +27,30 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcoreexternal.code.tex,v 1.9 2010/07/14 19:32:13 ludewich Exp $
+\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcoreexternal.code.tex,v 1.17 2010/09/01 08:56:40 ludewich Exp $
\newif\ifpgfexternal@aux@in@dpth
+\newif\ifpgfexternal@info
\pgfkeys{
- /pgf/images/include external/.code={\pgfimage{#1}},
- /pgf/images/aux in dpth/.is if=pgfexternal@aux@in@dpth,
- /pgf/images/aux in dpth/.default=true
+ /pgf/images/include external/.code={\pgfimage{#1}},
+ /pgf/images/aux in dpth/.is if=pgfexternal@aux@in@dpth,
+ /pgf/images/aux in dpth/.default=true,
+ /pgf/images/trim external/.code n args={4}{%
+ \def\pgf@external@kern@left{#1}%
+ \def\pgf@external@kern@bottom{#2}%
+ \def\pgf@external@kern@right{#3}%
+ \def\pgf@external@kern@top{#4}%
+ \ifx\pgf@external@kern@left\pgfutil@empty\def\pgf@external@kern@left{0sp}\fi%
+ \ifx\pgf@external@kern@bottom\pgfutil@empty\def\pgf@external@kern@bottom{0sp}\fi%
+ \ifx\pgf@external@kern@right\pgfutil@empty\def\pgf@external@kern@right{0sp}\fi%
+ \ifx\pgf@external@kern@top\pgfutil@empty\def\pgf@external@kern@top{0sp}\fi%
+ },
+ /pgf/images/trim external={1truein}{1truein}{1truein}{1truein},
+ /pgf/images/external info/.is if=pgfexternal@info,
+ /pgf/images/external info/.default=true,
}
% The external read/write mechanism is used as follows:
@@ -103,68 +117,68 @@
\ifx\pgf@tempa\pgf@tempb%
\else%
\pgf@external@grabshipouttrue%
- \pgfexternal@nofiles% see also \pgf@external@init@aux@in@dpth
- \ifpgfexternalreadmainaux
- % and reset the jobname. This should allow to handle any
- % \label/\ref constructions which are stored in \jobname.aux (and
- % which won't be found otherwise)
- \gdef\jobname{#1}%
- \fi
- \ifpgfexternal@aux@in@dpth
- \csname newwrite\endcsname\w@pgfexternal@auxout
- \fi
+ \pgfexternal@nofiles% see also \pgf@external@init@aux@in@dpth
+ \ifpgfexternalreadmainaux
+ % and reset the jobname. This should allow to handle any
+ % \label/\ref constructions which are stored in \jobname.aux (and
+ % which won't be found otherwise)
+ \gdef\jobname{#1}%
+ \fi
+ \ifpgfexternal@aux@in@dpth
+ \csname newwrite\endcsname\w@pgfexternal@auxout
+ \fi
\fi%
\gdef\pgfrealjobname##1{}% avoid multiple calls.
}
\def\pgfexternal@nofiles{%
- % replace \relax. The \nofiles macros does
- % \let\makeglossary=\relax
- % but the glossary.sty calls \renewcommand\makeglossary (which
- % will fail if \makeglossary=\relax). Stupid, but it works.
- \let\pgfexternal@nofiles@=\relax
- \def\relax{\relax}%
- %
- % suppress generation of LaTeX .aux, .toc etc files.
- % generation of these files is not thread-safe.
- % the \csname \endcsname yields \relax if \nofiles doesn't exist.
- \csname nofiles\endcsname
- %
- \let\relax=\pgfexternal@nofiles@
+ % replace \relax. The \nofiles macros does
+ % \let\makeglossary=\relax
+ % but the glossary.sty calls \renewcommand\makeglossary (which
+ % will fail if \makeglossary=\relax). Stupid, but it works.
+ \let\pgfexternal@nofiles@=\relax
+ \def\relax{\relax}%
+ %
+ % suppress generation of LaTeX .aux, .toc etc files.
+ % generation of these files is not thread-safe.
+ % the \csname \endcsname yields \relax if \nofiles doesn't exist.
+ \csname nofiles\endcsname
+ %
+ \let\relax=\pgfexternal@nofiles@
}%
\newif\ifpgf@external@grabshipout
\newbox\pgfexternal@startupbox
\pgfutil@ifundefined{AtBeginDocument}{}{%
- \AtBeginDocument{%
- \ifpgf@external@grabshipout%
- \global\let\pgfexternal@originalshipout=\shipout%
- \global\def\shipout{\setbox\pgfpic=}%
- \maxdeadcycles=10000%
- % Ok, gather everything we have seen up to now in a box. This box
- % will contain any specials that have been used.
- {%
- \output{\global\setbox\pgfexternal@startupbox=\vbox{\csname @begindvi\endcsname\unvbox255}}%
- \hbox{}\eject%
- }%
- \fi%
- }
+ \AtBeginDocument{%
+ \ifpgf@external@grabshipout%
+ \global\let\pgfexternal@originalshipout=\shipout%
+ \global\def\shipout{\setbox\pgfpic=}%
+ \maxdeadcycles=10000%
+ % Ok, gather everything we have seen up to now in a box. This box
+ % will contain any specials that have been used.
+ {%
+ \output{\global\setbox\pgfexternal@startupbox=\vbox{\csname @begindvi\endcsname\unvbox255}}%
+ \hbox{}\eject%
+ }%
+ \fi%
+ }
}%
\pgfutil@ifundefined{AtEndDocument}{}{%
- \AtEndDocument{%
- \ifpgf@external@grabshipout
- \pgfutil@ifundefined{pgfexternal@did@a@shipout}{%
- \pgfexternal@error@no@shipout
- }{}%
- \fi
- }%
+ \AtEndDocument{%
+ \ifpgf@external@grabshipout
+ \pgfutil@ifundefined{pgfexternal@did@a@shipout}{%
+ \pgfexternal@error@no@shipout
+ }{}%
+ \fi
+ }%
}
% This will be overwritten by the tikz external lib if it is loaded.
\def\pgfexternal@error@no@shipout{%
- \PackageError{pgf}{Sorry, image externalization failed: the resulting image was EMPTY. I tried to externalize '\pgfactualjobname'. Perhaps there was a typo somewhere? Please check that your document contains '\string\beginpgfgraphicnamed{\pgfactualjobname} ... \string\endpgfgraphicnamed'}%
+ \PackageError{pgf}{Sorry, image externalization failed: the resulting image was EMPTY. I tried to externalize '\pgfactualjobname'. Perhaps there was a typo somewhere? Please check that your document contains '\string\beginpgfgraphicnamed{\pgfactualjobname} ... \string\endpgfgraphicnamed'}%
}%
@@ -215,7 +229,7 @@
}
\long\def\pgf@replacepicturebygraphic#1\endpgfgraphicnamed{%
- \expandafter\pgfincludeexternalgraphics\expandafter{\pgf@filename}\unskip
+ \expandafter\pgfincludeexternalgraphics\expandafter{\pgf@filename}\unskip
}
% This is almost the same as \includegraphics{#1}, but it checks
@@ -226,22 +240,22 @@
% collected for the external graphics (references). They start after
% the first line (if any).
\def\pgfincludeexternalgraphics#1{%
- \begingroup
- \pgfexternalreaddpth{#1}%
- \pgfkeysifdefined{/pgf/images/include external/#1/.@cmd}{%
- \pgfkeysgetvalue{/pgf/images/include external/#1/.@cmd}\pgf@tempa
- \pgfkeysgetlet{/pgf/images/include external/.@cmd}\pgf@tempa
- }{}%
- \setbox1=\hbox{\pgfkeysvalueof{/pgf/images/include external/.@cmd}{#1}\pgfeov}%
- \ifdim\pgfexternaltrimleft=0sp \else \kern\pgfexternaltrimleft\relax \fi
- \ifdim\pgfexternaldepth=0pt
- \box1
- \else
- \dimen0=\pgfexternaldepth\relax
- \hbox{\lower\dimen0 \box1 }%
- \fi
- \ifdim\pgfexternaltrimright=0sp \else \kern\pgfexternaltrimright\relax \fi
- \endgroup
+ \begingroup
+ \pgfexternalreaddpth{#1}%
+ \pgfkeysifdefined{/pgf/images/include external/#1/.@cmd}{%
+ \pgfkeysgetvalue{/pgf/images/include external/#1/.@cmd}\pgf@tempa
+ \pgfkeyslet{/pgf/images/include external/.@cmd}\pgf@tempa
+ }{}%
+ \setbox1=\hbox{\pgfkeysvalueof{/pgf/images/include external/.@cmd}{#1}\pgfeov}%
+ \ifdim\pgfexternaltrimleft=0sp \else \kern\pgfexternaltrimleft\relax \fi
+ \ifdim\pgfexternaldepth=0pt
+ \box1
+ \else
+ \dimen0=\pgfexternaldepth\relax
+ \hbox{\lower\dimen0 \box1 }%
+ \fi
+ \ifdim\pgfexternaltrimright=0sp \else \kern\pgfexternaltrimright\relax \fi
+ \endgroup
}
% Defines \pgfexternaldepth to be the depth of the external picture
@@ -252,81 +266,88 @@
% .dpth file (it appends it to the main aux file).
%
\def\pgfexternalreaddpth#1{%
- % no \begingroup. Handle that manually:
- \edef\pgfexternalreaddpth@restore{%
- \noexpand\endlinechar=\the\endlinechar\space
- \noexpand\catcode`\noexpand\@=\the\catcode`\@\space
- }%
- %
- \def\pgfexternaldepth{0sp}%
- \def\pgfexternaltrimleft{0sp}%
- \def\pgfexternaltrimright{0sp}%
- \endlinechar=-1 % suppress white space at end
- \catcode`\@=11
- \openin\r@pgf@reada=#1.dpth
- \pgfincludeexternalgraphics@read@dpth
- %
- \pgfexternalreaddpth@restore
+ % no \begingroup. Handle that manually:
+ \edef\pgfexternalreaddpth@restore{%
+ \noexpand\endlinechar=\the\endlinechar\space
+ \noexpand\catcode`\noexpand\@=\the\catcode`\@\space
+ }%
+ %
+ \def\pgfexternaldepth{0sp}%
+ \def\pgfexternaltrimleft{0sp}%
+ \def\pgfexternaltrimright{0sp}%
+ \endlinechar=-1 % suppress white space at end
+ \catcode`\@=11
+ \openin\r@pgf@reada=#1.dpth
+ \pgfincludeexternalgraphics@read@dpth
+ %
+ \pgfexternalreaddpth@restore
}%
%
% The .dpth consists of 0-N lines, where each is either a single
% dimension (the box' depth) or something which belongs to the .aux
% file (such lines will always start with a macro).
\def\pgfincludeexternalgraphics@read@dpth{%
- \ifeof\r@pgf@reada
- \closein\r@pgf@reada
- \else
- \read\r@pgf@reada to\pgfincludeexternalgraphics@auxline
- \ifx\pgfincludeexternalgraphics@auxline\pgfutil@empty
- \else
- \expandafter\pgfincludeexternalgraphics@read@dpth@line\pgfincludeexternalgraphics@auxline\pgfincludeexternalgraphics@read@dpth@line@EOI
- \fi
- \expandafter\pgfincludeexternalgraphics@read@dpth
- \fi
+ \ifeof\r@pgf@reada
+ \closein\r@pgf@reada
+ \else
+ \read\r@pgf@reada to\pgfincludeexternalgraphics@auxline
+ \ifx\pgfincludeexternalgraphics@auxline\pgfutil@empty
+ \else
+ \expandafter\pgfincludeexternalgraphics@read@dpth@line\pgfincludeexternalgraphics@auxline\pgfincludeexternalgraphics@read@dpth@line@EOI
+ \fi
+ \expandafter\pgfincludeexternalgraphics@read@dpth
+ \fi
}%
-\def\pgfexternal@restore#1{}%
-
-\long\def\pgfincludeexternalgraphics@read@dpth@line#1#2\pgfincludeexternalgraphics@read@dpth@line@EOI{%
- \ifcat\noexpand#1\relax
- % Ah -- the first token is a control sequence. It belongs to
- % the .aux file.
- %
- \ifx#1\pgfexternal@restore
- #2%
- \else
- % do NOT execute #1#2! many LaTeX commands don't support it (\label for example)
- \pgfutil@ifundefined{if@filesw}{%
- % sorry, .aux file support only for latex
- }{%
- % append to main .aux file (for forward references)
- \if@filesw
- {%
- \toks0={#1#2}%
- % believe it or not, but the
- % \def\dpthimport{...}\dpthimport *makes* a
- % difference! In ensures any occuring `##' characters are properly expanded to `#'.
- \immediate\write\@auxout{\noexpand\def\noexpand\dpthimport{\the\toks0 }\noexpand\dpthimport }%
- }%
- \fi
- }%
- \fi
- \else% it is the depth (which is simply a number for backwards compatibility)
- \def\pgfexternaldepth{#1#2}%
- \fi
+\def\pgfexternal@restore#1{#1}%
+
+\long\def\pgfincludeexternalgraphics@read@dpth@line@getfirst#1#2\pgfincludeexternalgraphics@read@dpth@line@EOI{%
+ \def\pgf@first{#1}%
+}%
+\long\def\pgfincludeexternalgraphics@read@dpth@line#1\pgfincludeexternalgraphics@read@dpth@line@EOI{%
+ \pgfincludeexternalgraphics@read@dpth@line@getfirst#1\pgfincludeexternalgraphics@read@dpth@line@EOI
+ \expandafter\ifcat\expandafter\noexpand\pgf@first\relax
+ % Ah -- the first token is a control sequence. It belongs to
+ % the .aux file.
+ %
+ \expandafter\ifx\pgf@first\pgfexternal@restore
+ #1%
+ \else
+ % do NOT execute #1! many LaTeX commands don't support it (\label for example)
+ \pgfutil@ifundefined{if@filesw}{%
+ % sorry, .aux file support only for latex
+ }{%
+ % append to main .aux file (for forward references)
+ \if@filesw
+ {%
+ \toks0={#1}%
+ % believe it or not, but the
+ % \def\dpthimport{...}\dpthimport *makes* a
+ % difference! In ensures any occuring `##' characters are properly expanded to `#'.
+ \immediate\write\@auxout{%
+ \noexpand\def\noexpand\dpthimport{\the\toks0}\noexpand\dpthimport}%
+ }%
+ \fi
+ }%
+ \fi
+ \else% it is the depth (which is simply a number for backwards compatibility)
+ \def\pgfexternaldepth{#1}%
+ \fi
}%
-% Stores '#1' into (expanded!) into the .dpth file of the currently
+% Stores '#1' (expanded!) into the .dpth file of the currently
% exported image.
%
-% Just before the image is included into the main document, '#1' will be
-% invoked.
-%
% This command has only an effect if an image is being exported.
+%
+% The stored contents will be read in the context where
+% /pgf/images/include external is active (i.e. by
+% \pgfexternalreaddpth).
+%
\def\pgfexternalstorecommand#1{%
}%
\def\pgfexternalstorecommand@isexporting#1{%
- \immediate\write\w@pgfexternal@auxout{\noexpand\pgfexternal@restore{#1}}%
+ \immediate\write\w@pgfexternal@auxout{\noexpand\pgfexternal@restore{#1}}%
}%
@@ -337,10 +358,10 @@
% this method is also invoked from within the tikz external library.
\def\pgf@external@grab#1{%
\def\pgf@filename{#1}%
- \ifpgfexternal@aux@in@dpth
- \begingroup
- \pgf@external@init@aux@in@dpth
- \let\G@refundefinedtrue=\pgf@external@grab@refundefinedtrue
+ \ifpgfexternal@aux@in@dpth
+ \begingroup
+ \pgf@external@init@aux@in@dpth
+ \let\G@refundefinedtrue=\pgf@external@grab@refundefinedtrue
\fi
\gdef\pgf@trimleft@final{0sp}%
\gdef\pgf@trimright@final{0sp}%
@@ -353,99 +374,115 @@
\expandafter\let\expandafter\pgf@external@grab@refundefinedtrue@orig\csname G@refundefinedtrue\endcsname
\def\pgf@external@grab@refundefinedtrue{%
- \pgf@external@grab@refundefinedtrue@orig
- \begingroup
- \def\n{\pgfexternal@hat\pgfexternal@hat J}%
- \pgfexternalstorecommand{%
- \noexpand\immediate\noexpand\write16{\pgf@external@grab@refundefinedtrue@warning}%
- \noexpand\G@refundefinedtrue
- }%
- \endgroup
+ \pgf@external@grab@refundefinedtrue@orig
+ \begingroup
+ \def\n{\pgfexternal@hat\pgfexternal@hat J}%
+ \pgfexternalstorecommand{%
+ \noexpand\immediate\noexpand\write16{\pgf@external@grab@refundefinedtrue@warning}%
+ \noexpand\G@refundefinedtrue
+ }%
+ \endgroup
}%
\def\pgf@external@grab@refundefinedtrue@warning{%
- LaTeX Warning: External picture `\pgfactualjobname' contains undefined references\noexpand\on@line.\n
+ LaTeX Warning: External picture `\pgfactualjobname' contains undefined references\noexpand\on@line.\n
}%
\let\pgf@external@@protected@write@orig=\protected@write
\long\def\pgf@external@@protected@write@immediate#1#2#3{%
- \begingroup
- \let\pgf@write@=\write
- \def\write{\noexpand\immediate\pgf@write@}%
- \pgf@external@@protected@write@orig{#1}{#2}{#3}%
- \endgroup
+ \begingroup
+ \let\pgf@write@=\write
+ \def\write{\noexpand\immediate\pgf@write@}%
+ \pgf@external@@protected@write@orig{#1}{#2}{#3}%
+ \endgroup
}%
\def\pgf@external@init@aux@in@dpth{%
- \let\pgfexternalstorecommand=\pgfexternalstorecommand@isexporting
- %
- % tell LaTeX to write aux files...
- \csname @fileswtrue\endcsname
- % ... but redirect output to the .dpth file!
- \immediate\openout\w@pgfexternal@auxout=\pgf@filename.dpth
- \let\@auxout=\w@pgfexternal@auxout
- % ... and disable the correct page numbers. I can't get that
- % (because the correct page number is only available in the
- % shipout routine). Use immediate output:
- \let\protected@write=\pgf@external@@protected@write@immediate
+ \let\pgfexternalstorecommand=\pgfexternalstorecommand@isexporting
+ %
+ % tell LaTeX to write aux files...
+ \csname @fileswtrue\endcsname
+ % ... but redirect output to the .dpth file!
+ \immediate\openout\w@pgfexternal@auxout=\pgf@filename.dpth
+ \let\@auxout=\w@pgfexternal@auxout
+ % ... and disable the correct page numbers. I can't get that
+ % (because the correct page number is only available in the
+ % shipout routine). Use immediate output:
+ \let\protected@write=\pgf@external@@protected@write@immediate
}%
\def\pgf@externalend@storeshifts#1{%
- \immediate\write#1{\the\dp\pgfpic}%
- \ifx\pgf@trimleft@final\pgfutil@empty\else
- \immediate\write#1{\noexpand\pgfexternal@restore{\noexpand\def\noexpand\pgfexternaltrimleft{\pgf@trimleft@final}}}%
- \fi
- \ifx\pgf@trimright@final\pgfutil@empty\else
- \immediate\write#1{\noexpand\pgfexternal@restore{\noexpand\def\noexpand\pgfexternaltrimright{\pgf@trimright@final}}}%
- \fi
+ \immediate\write#1{\the\dp\pgfpic}% store the depth simply as number for backw. compat.
+ \ifx\pgf@trimleft@final\pgfutil@empty\else
+ \immediate\write#1{\noexpand\pgfexternal@restore{\noexpand\def\noexpand\pgfexternaltrimleft{\pgf@trimleft@final}}}%
+ \fi
+ \ifx\pgf@trimright@final\pgfutil@empty\else
+ \immediate\write#1{\noexpand\pgfexternal@restore{\noexpand\def\noexpand\pgfexternaltrimright{\pgf@trimright@final}}}%
+ \fi
+ \ifpgfexternal@info
+ \immediate\write#1{\noexpand\pgfexternal@restore{\noexpand\def\noexpand\pgfexternalwidth{\the\wd\pgfpic}}}%
+ \immediate\write#1{\noexpand\pgfexternal@restore{\noexpand\def\noexpand\pgfexternalheight{\the\dimen0}}}%
+ \fi
}
% REMARK:
% this method is also invoked from within the tikz external library.
\def\pgf@externalend{%
\unskip\egroup\egroup%
{%
- \def\pgf@external@trim{0}%
- \def\pgf@external@store@dpth{0}%
- %
- \ifdim\pgf@trimleft@final=0sp \gdef\pgf@trimleft@final{} \else\def\pgf@external@trim{1}\fi
- \ifdim\pgf@trimright@final=0sp \gdef\pgf@trimright@final{} \else\def\pgf@external@trim{1}\fi
- \if1\pgf@external@trim
- % UNDO the trimming! export to pdf doesn't supported trimmed
- % bounding boxes (has to do with the mediabox/trimbox etc).
- % I'll keep the bounding box intact and store the trim information
- % into the .dpth file.
- \setbox\pgfpic=\hbox{%
- \ifx\pgf@trimleft@final\pgfutil@empty\else\kern-\pgf@trimleft@final\fi
- \box\pgfpic
- \ifx\pgf@trimright@final\pgfutil@empty\else\kern-\pgf@trimright@final\fi
- }%
- \def\pgf@external@store@dpth{1}%
- \fi
- %
+ \def\pgf@external@trim{0}%
+ \def\pgf@external@store@dpth{0}%
+ %
+ \ifpgf@trim@lowlevel
+ \gdef\pgf@trimleft@final{}%
+ \gdef\pgf@trimright@final{}%
+ \else
+ \ifdim\pgf@trimleft@final=0sp \gdef\pgf@trimleft@final{} \else\def\pgf@external@trim{1}\fi
+ \ifdim\pgf@trimright@final=0sp \gdef\pgf@trimright@final{} \else\def\pgf@external@trim{1}\fi
+ \if1\pgf@external@trim
+ % UNDO the trimming! export to pdf doesn't supported trimmed
+ % bounding boxes (has to do with the mediabox/trimbox etc).
+ % I'll keep the bounding box intact and store the trim information
+ % into the .dpth file.
+ \setbox\pgfpic=\hbox{%
+ \ifx\pgf@trimleft@final\pgfutil@empty\else\kern-\pgf@trimleft@final\fi
+ \box\pgfpic
+ \ifx\pgf@trimright@final\pgfutil@empty\else\kern-\pgf@trimright@final\fi
+ }%
+ \def\pgf@external@store@dpth{1}%
+ \fi
+ \fi
+ %
\parindent0pt % leave the space
% \leftmargin0pt%
% \rightmargin0pt%
+ \hoffset=0pt % reset to default
+ \voffset=0pt
\dimen0\ht\pgfpic%
\advance\dimen0\dp\pgfpic%
- \ifdim\dp\pgfpic=0pt\relax
- \else% store the picture's depth. Otherwise, it would be lost.
- \def\pgf@external@store@dpth{1}%
- \fi
- %
- \if1\pgf@external@store@dpth
- \ifpgfexternal@aux@in@dpth
- \pgf@externalend@storeshifts\@auxout
- \immediate\closeout\@auxout
- \else
- \immediate\openout\pgf@plotwrite=\pgf@filename.dpth
- \pgf@externalend@storeshifts\pgf@plotwrite
- \immediate\closeout\pgf@plotwrite
- \fi
- \fi
+ \ifdim\dp\pgfpic=0pt\relax
+ \else% store the picture's depth. Otherwise, it would be lost.
+ \def\pgf@external@store@dpth{1}%
+ \fi
+ \ifpgfexternal@info
+ \def\pgf@external@store@dpth{1}%
+ \fi
+ %
+ \if1\pgf@external@store@dpth
+ \ifpgfexternal@aux@in@dpth
+ \pgf@externalend@storeshifts\@auxout
+ \immediate\closeout\@auxout
+ \else
+ \immediate\openout\pgf@plotwrite=\pgf@filename.dpth
+ \pgf@externalend@storeshifts\pgf@plotwrite
+ \immediate\closeout\pgf@plotwrite
+ \fi
+ \fi
\pgfsys@papersize{\the\wd\pgfpic}{\the\dimen0}%
+ %
\setbox0=\vbox{%
- \kern -1truein %
+ % I admit that I don't know why there is this kerning:
+ \kern -\pgf@external@kern@top\relax%
\hbox{%
- \kern -1truein %
+ \kern -\pgf@external@kern@left\relax%
\hbox to0pt{%
\wd\pgfexternal@startupbox=0pt %
\ht\pgfexternal@startupbox=0pt %
@@ -453,29 +490,32 @@
\box\pgfexternal@startupbox%
\pgfsys@atbegindocument\hss}%
\box\pgfpic%
- \kern 1truein }%
- \kern1truein }%
- %
- % compatibility with eso-pic package: \nointerlineskip is not
- % allowed here, but the eso-pic package uses \nointerlineskip in
- % its shipout routine.
- \let\pgfexternal@nointerlineskip@orig=\nointerlineskip
- \let\nointerlineskip=\pgfexternal@nointerlineskip
- %
+ \kern\pgf@external@kern@right\relax%
+ }%
+ \kern\pgf@external@kern@bottom\relax%
+ }%
+ %
+ % compatibility with eso-pic package: \nointerlineskip is not
+ % allowed here, but the eso-pic package uses \nointerlineskip in
+ % its shipout routine.
+ \let\pgfexternal@nointerlineskip@orig=\nointerlineskip
+ \let\nointerlineskip=\pgfexternal@nointerlineskip
+ %
\pgfexternal@originalshipout\box0 %
- \gdef\pgfexternal@did@a@shipout{1}%
+ \gdef\pgfexternal@did@a@shipout{1}%
}%
\ifpgfexternal@aux@in@dpth
- \endgroup
+ \endgroup
\fi
}
\def\pgfexternal@nointerlineskip{%
- \ifvmode
- \pgfexternal@nointerlineskip@orig
- \else
- \relax% \nointerlineskip in horizontal mode not allowed. Silently ignore the error message.
- \fi
+ \ifvmode
+ \pgfexternal@nointerlineskip@orig
+ \else
+ \relax% \nointerlineskip in horizontal mode not allowed. Silently ignore the error message.
+ \fi
}%
\endinput
+% vi: tabstop=4 shiftwidth=2 expandtab