summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-04-03 23:06:54 +0000
committerKarl Berry <karl@freefriends.org>2010-04-03 23:06:54 +0000
commit36080b5cf06fe9bdde3b1edb30fd795a58e6bf10 (patch)
tree172e727ca5a42cbd0c2440855dbb81f3a5c2148e /Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib
parente27b3d0aaf815fdab1497a0a827998ac044e245d (diff)
pgfplots update (1apr10)
git-svn-id: svn://tug.org/texlive/trunk@17670 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib')
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex4
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_misc.code.tex10
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcoreexternal.code.tex351
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeys.code.tex110
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeysfiltered.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryfpu.code.tex34
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.pdflinks.code.tex11
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.prettyprinter.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmathfloat.code.tex340
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternal.sty4
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternalshared.code.tex498
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzlibraryexternal.code.tex7
14 files changed, 1239 insertions, 138 deletions
diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex
index c63985e38c4..6d1cb8a2ee1 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex
@@ -14,7 +14,7 @@
% #2: for normal processing.
\def\pgfplots@ifneedspgfcompabitibilitycode#1#2{%
%\pgfkeysifdefined{/handlers/.search also/.@cmd}{#2}{#1}%
- \pgfutil@ifundefined{pgfutilsolvetwotwoleq}{#1}{#2}%
+ \pgfutil@ifundefined{pgfkeysdefnargs}{#1}{#2}%
}%
\pgfplots@ifneedspgfcompabitibilitycode
@@ -22,9 +22,7 @@
\immediate\write16{Package pgfplots: loading complementary code for your PGF version...}
\input pgfplotsoldpgfsupp_misc.code.tex
\let\pgfkeysloaded=\undefined
- % FIXME: this does also load pgfkeysfiltered.code.tex again:
\input pgfplotsoldpgfsupp_pgfkeys.code.tex
- \input pgfplotsoldpgfsupp_pgfkeysfiltered.code.tex
\input pgfplotsoldpgfsupp_pgfmathfloat.code.tex
\input pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex
\input pgfplotsoldpgfsupp_pgflibraryfpu.code.tex
diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_misc.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_misc.code.tex
index 132240e77c7..178da4c3510 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_misc.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_misc.code.tex
@@ -3,6 +3,16 @@
% compatibility with PGF 2.0
% ======================================================
+\expandafter\ifx\csname w@pgf@writea\endcsname\relax
+\newwrite\w@pgf@writea
+\fi
+
+\expandafter\ifx\csname r@pgf@reada\endcsname\relax
+\newread\r@pgf@reada
+\fi
+\let\pgfutil@inputcheck=\r@pgf@reada
+
+
% from pgfutil-common.tex:
% Usage:
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
new file mode 100644
index 00000000000..d9e6476398f
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcoreexternal.code.tex
@@ -0,0 +1,351 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% This file is a copy of some part of PGF/Tikz.
+%%% It has been copied here to provide :
+%%% - compatibility with older PGF versions
+%%% - availability of PGF contributions by Christian Feuersaenger
+%%% which are necessary or helpful for pgfplots.
+%%%
+%%% For reasons of simplicity, I have copied the whole file, including own contributions AND
+%%% PGF parts. The copyrights are as they appear in PGF.
+%%%
+%%% Note that pgfplots has compatible licenses.
+%%%
+%%% This copy has been modified in the following ways:
+%%% - nested \input commands have been updated
+%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Date of this copy: Mi 31. Mär 21:41:41 CEST 2010 %%%
+
+
+
+% Copyright 2006 by Till Tantau
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcoreexternal.code.tex,v 1.1 2010/03/25 20:57:13 ludewich Exp $
+
+
+
+\newif\ifpgfexternal@allow@aux
+
+\pgfkeys{
+ /pgf/images/include external/.code={\pgfimage{#1}},
+ /pgf/images/aux in dpth/.is if=pgfexternal@allow@aux,
+ /pgf/images/aux in dpth/.default=true
+}
+
+% The external read/write mechanism is used as follows:
+%
+% In your document, you put a number or all of your pgfpicture (or
+% tikzpicture) environments inside a pair of \beginpgfexternal and
+% \endpgfexternal. The \beginpgfexternal gets one parameter called the
+% graphics name.
+%
+% Once this is done, the next step is to declare the names of your
+% graphics in the document at the beginning using the
+% \pgfdeclaregraphicname command.
+%
+% Now, when you typeset your document, each time a \beginpgfexternal
+% command is encountered, it will be checked whether the corresponding
+% graphics file exists. If this is the case, it will be included and
+% the code between \beginpgfexternal and \endpgfexternal is
+% ignored. Otherwise, the code is executed normally.
+%
+% Things change when you run tex on your file with the \jobname set to
+% the name of a decalred graphics name. In this case, only your
+% graphic will be typeset, the rest of the document will be "thrown away".
+% To be more precise, everything is gobbled up to the beginning
+% of the first \beginpgfexternal with the given graphics name. Then,
+% the content of the "environment" is put in a box (this "environment"
+% need not contain a graphics, it may contain anything that can be put
+% in a box). Then a single page is output whose size is exactly the
+% size of the picture.
+%
+% So, once you have run tex repeatedly, each time with the jobname set
+% to each of the graphics, you can then run tex on the whole document
+% and this will cause all graphics to be included rather than begin
+% typeset.
+%
+% Finally, once all the graphics have been created, you can also say
+% \input pgfexternal.tex instead of including pgf/TikZ.
+
+
+\newif\ifpgfexternalreadmainaux
+\pgfexternalreadmainauxtrue
+
+% Tells pgf which jobname is the name of the real file
+%
+% #1 = name
+%
+% Description:
+%
+% This command is used to tell pgf that the file named #1 should be
+% typeset normally. If \jobname is not equal to #1, only
+% the graphic called \jobname will be typeset.
+%
+% Example:
+%
+% \pgfrealjobname{survey}
+%
+% Note that afterwards, \jobname will be set to the argument. In our
+% example, \jobname will be 'survey'. This is to accomplish
+% compatibility with aux-file generation.
+
+\def\pgfrealjobname#1{%
+ \global\let\pgfactualjobname=\jobname
+ \edef\pgf@tempa{\expandafter\string\csname #1\endcsname}%
+ \edef\pgf@tempb{\expandafter\string\csname\jobname\endcsname}%
+ \ifx\pgf@tempa\pgf@tempb%
+ \else%
+ \pgf@external@grabshipouttrue%
+ \pgfexternal@nofiles
+ \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@allow@aux
+ \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@
+}%
+
+\newif\ifpgf@external@grabshipout
+\newbox\pgfexternal@startupbox
+
+\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%
+}
+
+
+% "Environment" for an external graphic.
+%
+% #1 = graphic name
+%
+% Example:
+%
+% \beginpgfgraphicnamed{main-graphic2}
+% \begin{tikzpicture}
+% ...
+% \end{tikzpicture}
+% \endpgfgraphicnamed
+
+\def\pgf@externalbegin#1{%
+ % First, check whether we wish to grab this graphic:
+ \let\pgf@next=\pgf@external@normal%
+ \ifpgf@external@grabshipout%
+ \edef\pgf@tempa{\expandafter\string\csname #1\endcsname}%
+ \edef\pgf@tempb{\expandafter\string\csname\pgfactualjobname\endcsname}%
+ \ifx\pgf@tempa\pgf@tempb%
+ \let\pgf@next=\pgf@external@grab%
+ \fi%
+ \fi%
+ \pgf@next{#1}%
+}
+
+
+\AtBeginDocument{
+ \let\beginpgfgraphicnamed=\pgf@externalbegin% overwrite definition of pgfexternal.tex if necessary
+ \let\endpgfgraphicnamed=\unskip
+}
+
+
+% Normal operation: Include an external graphic instead of the
+% picture, if such an external picture exists.
+\def\pgf@external@normal#1{%
+ \let\pgf@filename=\pgfutil@empty%
+ \expandafter\pgf@findfile\pgfsys@imagesuffixlist:+{#1}%
+ \ifx\pgf@filename\pgfutil@empty%
+ % Ok, no such image... Just typeset the picture normally.
+ \let\pgf@next=\relax%
+ \else%
+ \let\pgf@next=\pgf@replacepicturebygraphic%
+ \fi%
+ \pgf@next%
+}
+
+\long\def\pgf@replacepicturebygraphic#1\endpgfgraphicnamed{%
+ \expandafter\pgfincludeexternalgraphics\expandafter{\pgf@filename}\unskip
+}
+
+% This is almost the same as \includegraphics{#1}, but it checks
+% whether '#1.dpth' exists. In such case, it restores the boxes depth
+% stored in #1.dpth.
+%
+% Furthermore, the .dpth file may contain .aux related information
+% collected for the external graphics (references). They start after
+% the first line (if any).
+\def\pgfincludeexternalgraphics#1{%
+ \begingroup
+ \setbox1=\hbox{\pgfkeysvalueof{/pgf/images/include external/.@cmd}{#1}\pgfeov}%
+ %
+ \let\pgfincludeexternalgraphics@dp=\pgfutil@empty
+ \endlinechar=-1 % suppress white space at end
+ \catcode`\@=11
+ \openin\r@pgf@reada=#1.dpth
+ \pgfincludeexternalgraphics@read@dpth
+ \ifx\pgfincludeexternalgraphics@dp\pgfutil@empty
+ \box1
+ \else
+ \dimen0=\pgfincludeexternalgraphics@dp\relax
+ \hbox{\lower\dimen0 \box1 }%
+ \fi
+ \endgroup
+}
+%
+% 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
+}%
+\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.
+ %
+ % #1#2\relax% do NOT set the information! 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
+ }%
+ \else
+ \def\pgfincludeexternalgraphics@dp{#1#2}%
+ \fi
+}%
+
+
+
+% Grab operation: If jobname matches the graphic name, typeset this
+% picture normall.
+% REMARK:
+% this method is also invoked from within the tikz external library.
+\def\pgf@external@grab#1{%
+ \def\pgf@filename{#1}%
+ \ifpgfexternal@allow@aux
+ \begingroup
+ \pgf@external@init@aux@in@dpth
+ \fi
+ \setbox\pgfpic=\hbox\bgroup\bgroup%
+ \let\endpgfgraphicnamed=\pgf@externalend%
+}
+
+\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
+}%
+
+\def\pgf@external@init@aux@in@dpth{%
+ % 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
+}%
+
+% REMARK:
+% this method is also invoked from within the tikz external library.
+\def\pgf@externalend{%
+ \unskip\egroup\egroup%
+ {%
+ \parindent0pt % leave the space
+% \leftmargin0pt%
+% \rightmargin0pt%
+ \dimen0\ht\pgfpic%
+ \advance\dimen0\dp\pgfpic%
+ \ifdim\dp\pgfpic=0pt\relax
+ \else% store the picture's depth. Otherwise, it would be lost.
+ \ifpgfexternal@allow@aux
+ \immediate\write\@auxout{\the\dp\pgfpic}%
+ \immediate\closeout\@auxout
+ \else
+ \immediate\openout\pgf@plotwrite=\pgf@filename.dpth
+ \immediate\write\pgf@plotwrite{\the\dp\pgfpic}%
+ \immediate\closeout\pgf@plotwrite
+ \fi
+ \fi
+ \pgfsys@papersize{\the\wd\pgfpic}{\the\dimen0}%
+ \setbox0=\vbox{%
+ \kern -1truein %
+ \hbox{%
+ \kern -1truein %
+ \hbox to0pt{%
+ \wd\pgfexternal@startupbox=0pt %
+ \ht\pgfexternal@startupbox=0pt %
+ \dp\pgfexternal@startupbox=0pt %
+ \box\pgfexternal@startupbox%
+ \pgfsys@atbegindocument\hss}%
+ \box\pgfpic%
+ \kern 1truein }%
+ \kern1truein }%
+ \pgfexternal@originalshipout\box0 %
+ }%
+ \ifpgfexternal@allow@aux
+ \endgroup
+ \fi
+}
+
+
+\endinput
+
diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeys.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeys.code.tex
index 6ae79bec9bf..24203d3b330 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeys.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeys.code.tex
@@ -14,7 +14,7 @@
%%% - nested \input commands have been updated
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Date of this copy: Di 29. Dez 22:11:16 CET 2009 %%%
+%%% Date of this copy: Mi 31. Mär 21:41:41 CEST 2010 %%%
@@ -634,6 +634,85 @@
\pgfkeyssetvalue{#1/.@body}{#3}%
}
+% Like \pgfkeysdefargs, but `#2' is an integer denoting the expected
+% *number* of arguments.
+%
+% There is a subtle difference between the 'args' command, when it
+% comes to spaces:
+% a key defined with defargs{#1#2} must not have spaces between the
+% arguments when it is used.
+%
+% See this:
+%
+%--------------------------------------------------
+% % defnargs:
+% \pgfkeysdefnargs{/a}{2}{1=`#1', 2=`#2'}
+% \pgfkeys{
+% /a=
+% {1}
+% {2}
+% }
+% ->defnargs: 1=`1', 2=`2'
+%
+% defargs:
+% \pgfkeysdefargs{/b}{#1#2}{1=`#1', 2=`#2'}
+% \pgfkeys{
+% /b=
+% {1}
+% {2}
+% }
+% ->defargs: 1=`1', 2=` 2' (note the space!)
+%
+% defargs:
+% \pgfkeysdefargs{/b}{#1#2}{1=`#1', 2=`#2'}
+% \pgfkeys{
+% /b=
+% {1}%
+% {2}
+% }
+% ->defargs: 1=`1', 2=`2'
+%--------------------------------------------------
+\long\def\pgfkeysdefnargs#1#2#3{\pgfkeysdefnargs@{#1}{#2}{#3}{\def}}%
+\long\def\pgfkeysedefnargs#1#2#3{\pgfkeysdefnargs@{#1}{#2}{#3}{\edef}}%
+\long\def\pgfkeysdefnargs@#1#2#3#4{%
+ \ifcase#2\relax
+ \pgfkeyssetvalue{#1/.@args}{}%
+ \or
+ \pgfkeyssetvalue{#1/.@args}{##1}%
+ \or
+ \pgfkeyssetvalue{#1/.@args}{##1##2}%
+ \or
+ \pgfkeyssetvalue{#1/.@args}{##1##2##3}%
+ \or
+ \pgfkeyssetvalue{#1/.@args}{##1##2##3##4}%
+ \or
+ \pgfkeyssetvalue{#1/.@args}{##1##2##3##4##5}%
+ \or
+ \pgfkeyssetvalue{#1/.@args}{##1##2##3##4##5##6}%
+ \or
+ \pgfkeyssetvalue{#1/.@args}{##1##2##3##4##5##6}%
+ \or
+ \pgfkeyssetvalue{#1/.@args}{##1##2##3##4##5##6##7}%
+ \or
+ \pgfkeyssetvalue{#1/.@args}{##1##2##3##4##5##6##7##8}%
+ \or
+ \pgfkeyssetvalue{#1/.@args}{##1##2##3##4##5##6##7##8##9}%
+ \else
+ \pgfkeys@error{\string\pgfkeysdefnargs: expected <= 9 arguments, got #2}%
+ \fi
+ \pgfkeysgetvalue{#1/.@args}\pgfkeys@tempargs
+ \def\pgfkeys@temp{\expandafter#4\csname pgfk@#1/.@@body\endcsname}%
+ \expandafter\pgfkeys@temp\pgfkeys@tempargs{#3}%
+ % eliminate the \pgfeov at the end such that TeX gobbles spaces
+ % by using
+ % \pgfkeysdef{#1}{\pgfkeysvalueof{#1/.@@body}##1}
+ % (with expansion of '#1'):
+ \edef\pgfkeys@tempargs{\noexpand\pgfkeysvalueof{#1/.@@body}}%
+ \def\pgfkeys@temp{\pgfkeysdef{#1}}%
+ \expandafter\pgfkeys@temp\expandafter{\pgfkeys@tempargs##1}%
+ \pgfkeyssetvalue{#1/.@body}{#3}%
+}
+
% Defining a key command
@@ -642,8 +721,10 @@
\pgfkeysdef{/handlers/.code 2 args}{\pgfkeysdefargs{\pgfkeyscurrentpath}{##1##2}{#1}}
\pgfkeysdef{/handlers/.ecode}{\pgfkeysedef{\pgfkeyscurrentpath}{#1}}
\pgfkeysdef{/handlers/.ecode 2 args}{\pgfkeysedefargs{\pgfkeyscurrentpath}{##1##2}{#1}}
-\pgfkeysdefargs{/handlers/.code args}{#1#2}{\pgfkeysdefargs{\pgfkeyscurrentpath}{#1}{#2}}
-\pgfkeysdefargs{/handlers/.ecode args}{#1#2}{\pgfkeysedefargs{\pgfkeyscurrentpath}{#1}{#2}}
+\pgfkeysdefnargs{/handlers/.code args}{2}{\pgfkeysdefargs{\pgfkeyscurrentpath}{#1}{#2}}
+\pgfkeysdefnargs{/handlers/.ecode args}{2}{\pgfkeysedefargs{\pgfkeyscurrentpath}{#1}{#2}}
+\pgfkeysdefnargs{/handlers/.code n args}{2}{\pgfkeysdefnargs{\pgfkeyscurrentpath}{#1}{#2}}
+\pgfkeysdefnargs{/handlers/.ecode n args}{2}{\pgfkeysedefnargs{\pgfkeyscurrentpath}{#1}{#2}}
% Adding to a key command
@@ -651,15 +732,24 @@
% Find out, whether with args or not.
\pgfkeysifdefined{\pgfkeyscurrentpath/.@args}%
{% Yes, so add to body and reuse args
- \pgfkeysaddvalue{\pgfkeyscurrentpath/.@body}{#1}{#2}%
- % Redefine code
- \pgfkeysgetvalue{\pgfkeyscurrentpath/.@args}{\pgfkeys@tempargs}%
- \pgfkeysgetvalue{\pgfkeyscurrentpath/.@body}{\pgfkeys@tempbody}%
- \expandafter\expandafter\expandafter\def\expandafter\pgfkeys@temp\expandafter\pgfkeys@tempargs\expandafter{\pgfkeys@tempbody}%
- \pgfkeyslet{\pgfkeyscurrentpath/.@cmd}{\pgfkeys@temp}%
+ \pgfkeysaddvalue{\pgfkeyscurrentpath/.@body}{#1}{#2}%
+ % Redefine code
+ {%
+ \pgfkeysgetvalue{\pgfkeyscurrentpath/.@args}{\pgfkeys@tempargs}%
+ \pgfkeysgetvalue{\pgfkeyscurrentpath/.@body}{\pgfkeys@tempbody}%
+ \def\pgfkeys@marshal{\expandafter\gdef\expandafter\pgfkeys@global@temp\pgfkeys@tempargs}%
+ \expandafter\pgfkeys@marshal\expandafter{\pgfkeys@tempbody}%
+ }%
+ \pgfkeysifdefined{\pgfkeyscurrentpath/.@@body}{%
+ % support for \pgfkeysndefargs:
+ \pgfkeyslet{\pgfkeyscurrentpath/.@@body}{\pgfkeys@global@temp}%
+ }{%
+ % support for \pgfkeysdefargs:
+ \pgfkeyslet{\pgfkeyscurrentpath/.@cmd}{\pgfkeys@global@temp}%
+ }%
}%
{%
- % No, so single argument. Redefine accordingly.
+ % No, so single argument (simple \pgfkeysdef). Redefine accordingly.
{%
\toks0{#1}%
\pgfkeysifdefined{\pgfkeyscurrentpath/.@cmd}%
diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeysfiltered.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeysfiltered.code.tex
index 5d7a731334d..c795bc45ffb 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeysfiltered.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeysfiltered.code.tex
@@ -14,7 +14,7 @@
%%% - nested \input commands have been updated
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Date of this copy: Di 29. Dez 22:11:16 CET 2009 %%%
+%%% Date of this copy: Mi 31. Mär 21:41:41 CEST 2010 %%%
diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryfpu.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryfpu.code.tex
index 3bb41804bdb..0af3c3887c5 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryfpu.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryfpu.code.tex
@@ -14,7 +14,7 @@
%%% - nested \input commands have been updated
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Date of this copy: Di 29. Dez 22:11:16 CET 2009 %%%
+%%% Date of this copy: Mi 31. Mär 21:41:41 CEST 2010 %%%
@@ -94,6 +94,11 @@
fpu/output format/sci/.code= {\def\pgfmathfloatparse@output{\pgfmathfloattosci@{\pgfmathresult}}},
fpu/output format/fixed/.code= {\def\pgfmathfloatparse@output{\pgfmathfloattofixed@{\pgfmathresult}}},
fpu/output format/float,
+ fpu/rel thresh/.code={%
+ \pgfmathfloatparsenumber{#1}%
+ \let\pgfmathfloat@relthresh=\pgfmathresult
+ },
+ fpu/rel thresh=1e-4,
}
\pgfmathfloatcreate{1}{1.0}{0}\let\pgfmathfloatscale=\pgfmathresult
@@ -897,6 +902,28 @@
\ifnum\pgfmathfloatiffinite@>2 #3\else #2\fi
}%
+
+% Computes the relative error between #1 and #2 (assuming #2 != 0) and
+% invokes #3 if the relative error is below `/pgf/fpu/rel thresh' and
+% #4 if that is not the case.
+\long\def\pgfmathfloatifapproxequalrel#1#2#3#4{%
+ \begingroup
+ \pgfmathfloatparsenumber{#1}%
+ \let\pgfmathfloatarga=\pgfmathresult
+ \pgfmathfloatparsenumber{#2}%
+ \let\pgfmathfloatargb=\pgfmathresult
+ \pgfmathfloatrelerror@\pgfmathfloatarga\pgfmathfloatargb
+ \let\pgfmathfloatarga=\pgfmathresult
+ \pgfmathfloatlessthan@\pgfmathfloatarga\pgfmathfloat@relthresh
+ \ifpgfmathfloatcomparison
+ \def\pgfmathfloat@loc@TMPa{#3}%
+ \else
+ \def\pgfmathfloat@loc@TMPa{#4}%
+ \fi
+ \expandafter\endgroup
+ \pgfmathfloat@loc@TMPa
+}%
+
% Invokes code '#3' if the flags of the floating point number '#1'
% match the flag provided in '#2'.
%
@@ -1420,6 +1447,7 @@
}
\let\pgfmathfloatmod=\pgfmathfloatmod@
+
% A modification of \pgfmathfloatmod@ where #3 = 1/#2 is already
% known. This may be faster.
\def\pgfmathfloatmodknowsinverse@#1#2#3{%
@@ -1472,7 +1500,7 @@
%
% #1 is a one-argument macro which assigns \pgfmathresult.
\def\pgfmathfloatTRIG@#1#2{%
- \expandafter\ifx\csname pgfmathfloatTRIG@NUM\endcsname\relax% why not directly!??? Did not work!??
+ \expandafter\ifx\csname pgfmathfloatTRIG@NUM\endcsname\relax%
% Lazy evaluation:
\pgfmathfloatcreate{1}{3.6}{2}%
\global\let\pgfmathfloatTRIG@NUM=\pgfmathresult
@@ -1515,7 +1543,7 @@
\def\pgfmathfloatatan@#1{%
\begingroup
- \expandafter\ifx\csname pgfmathfloatatan@TMP\endcsname\relax% why not directly!??? Did not work!??
+ \expandafter\ifx\csname pgfmathfloatatan@TMP\endcsname\relax%
\pgfmathfloatcreate{1}{1.6}{4}%
\global\let\pgfmathfloatatan@TMP=\pgfmathresult
\pgfmathfloatcreate{2}{1.6}{4}%
diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex
index d2089a6fd67..f93028724a3 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex
@@ -14,7 +14,7 @@
%%% - nested \input commands have been updated
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Date of this copy: Di 29. Dez 22:11:16 CET 2009 %%%
+%%% Date of this copy: Mi 31. Mär 21:41:41 CEST 2010 %%%
diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.code.tex
index 93a7a0c59e2..a03ef94d6a5 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.code.tex
@@ -14,7 +14,7 @@
%%% - nested \input commands have been updated
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Date of this copy: Di 29. Dez 22:11:16 CET 2009 %%%
+%%% Date of this copy: Mi 31. Mär 21:41:41 CEST 2010 %%%
diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.pdflinks.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.pdflinks.code.tex
index edfc48d5a4e..0c20db997a3 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.pdflinks.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.pdflinks.code.tex
@@ -14,7 +14,7 @@
%%% - nested \input commands have been updated
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Date of this copy: Di 29. Dez 22:11:16 CET 2009 %%%
+%%% Date of this copy: Mi 31. Mär 21:41:41 CEST 2010 %%%
@@ -216,6 +216,7 @@
\pgfkeysvalueof{/pdflinks/show labels code/.@cmd}{\pgfmanualpdflabel@@}\pgfeov
\fi
%
+ \if@filesw
\ifx\pgfmanualpdf@catcode\pgfutil@empty
\else
\toks0=\expandafter{\pgfmanualpdf@catcode}%
@@ -232,6 +233,7 @@
\else
\immediate\write\@auxout{\noexpand\endgroup}%
\fi
+ \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}%
@@ -252,8 +254,10 @@
\def\pgfmanual@tempa{\foreach \prefix in }%
\pgfkeysgetvalue{/pdflinks/search key prefixes in}\pgfmanual@tempb
\expandafter\pgfmanual@tempa\expandafter{\pgfmanual@tempb}{%
- \ifcsname pgfd@lbl@\prefix\pgfmanualpdflabel@@\endcsname
- \xdef\pgfmanual@glob{\prefix\pgfmanualpdflabel@@}%
+ \edef\pgfmanualpdflabel@@{\prefix\pgfmanualpdflabel@@}%
+ \expandafter\pgfmanual@handlespeciallabeltokens@in\expandafter{\pgfmanualpdflabel@@}%
+ \ifcsname pgfd@lbl@\pgfmanualpdflabel@@\endcsname
+ \xdef\pgfmanual@glob{\pgfmanualpdflabel@@}%
\breakforeach
\fi
}%
@@ -314,6 +318,7 @@
\pgfmath@smuggleone\pgfmanualpdflabel@@
\endgroup
}%
+
\expandafter\def\expandafter\pgfmanualpdfref@substitute@backslash\expandafter#\expandafter1\pgfmanual@pretty@backslash#2\relax{%
\edef\pgfmanualpdflabel@@{#1\textbackslash #2}%
}%
diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.prettyprinter.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.prettyprinter.code.tex
index 04fed087887..20e0bf1b4d2 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.prettyprinter.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.prettyprinter.code.tex
@@ -14,7 +14,7 @@
%%% - nested \input commands have been updated
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Date of this copy: Di 29. Dez 22:11:16 CET 2009 %%%
+%%% Date of this copy: Mi 31. Mär 21:41:41 CEST 2010 %%%
diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmathfloat.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmathfloat.code.tex
index 67d2be8c72b..62a33269d8b 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmathfloat.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmathfloat.code.tex
@@ -14,7 +14,7 @@
%%% - nested \input commands have been updated
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Date of this copy: Di 29. Dez 22:11:16 CET 2009 %%%
+%%% Date of this copy: Mi 31. Mär 21:41:41 CEST 2010 %%%
@@ -643,11 +643,13 @@
\expandafter\def\expandafter\pgfmathresult\expandafter{\pgfmathresult #1}%
}%
+% @deprecated. It has been replaced by \pgfmathprintnumber@fixed@styleDEFAULT
% #1 maybe a macro
\def\pgfmathprintnumber@fixed@stylePERIOD#1#2#3e#4\relax{%
\def\pgfmathresult{#1}%
}
+% @deprecated. It has been replaced by \pgfmathprintnumber@fixed@styleDEFAULT
% #1 maybe a macro
\def\pgfmathprintnumber@fixed@styleCOMMA#1#2#3e#4\relax{%
\ifpgfmathfloatroundhasperiod
@@ -721,7 +723,10 @@
% #2: mantisse
% #3: exponent
% #4: CODE to display if the mantisse is drawn.
-% #5: CODE to display if the mantisse is NOT draw. (unused)
+% This code will be shown just before the exponent.
+% Example: #4=\cdot
+% #5: CODE to display if the mantisse is NOT draw. (unused currently)
+% Might be used to display '10^1' instead of '1*10^1'.
% #6: CODE to display the exponent.
\def\pgfmathfloatrounddisplaystyle@shared@impl#1#2e#3\relax#4#5#6{%
\pgfkeysgetvalue{/pgf/number format/@sci exponent mark}\pgfmathfloatrounddisplaystyle@e@mark
@@ -733,7 +738,7 @@
\or\pgfmathprintnumber@fixed@style{-#2}#1#2e0\relax%
\expandafter\pgfmathfloatrounddisplaystyle@shared@impl@\expandafter{\pgfmathresult}{#4#6}%
\or
- \pgfmathfloatrounddisplaystyle@shared@impl@@{NaN}{}%
+ \pgfmathfloatrounddisplaystyle@shared@impl@@{\hbox{NaN}}{}%
\or
\ifpgfmathprintnumber@showpositive
\pgfmathfloatrounddisplaystyle@shared@impl@@{+\infty}{}%
@@ -802,6 +807,20 @@
\expandafter\pgfmathfloat@loc@TMPb\expandafter{\pgfmathresult}%
}
+\def\pgfmathfloatrounddisplaystyle@generic#1#2e#3\relax{%
+ \begingroup
+ \pgfkeysvalueof {/pgf/number format/sci generic/@/.@cmd}{#3}{#1}{#2}\pgfeov
+ \pgfkeysgetvalue{/pgf/number format/sci generic/mantisse sep}\pgfmathdisplay@aftermantisse
+ \pgfkeysgetvalue{/pgf/number format/sci generic/empty mantisse sep}\pgfmathdisplay@nomantisse
+ \pgfkeysgetvalue{/pgf/number format/sci generic/exponent}\pgfmathdisplay@e
+ \toks0=\expandafter{\pgfmathdisplay@aftermantisse}%
+ \toks1=\expandafter{\pgfmathdisplay@nomantisse}%
+ \toks2=\expandafter{\pgfmathdisplay@e}%
+ \xdef\pgfmathfloat@glob@TMP{\noexpand\pgfmathfloatrounddisplaystyle@shared@impl#1#2e#3\noexpand\relax{\the\toks0}{\the\toks1}{\the\toks2}}%
+ \endgroup
+ \pgfmathfloat@glob@TMP
+}
+
% A macro which takes the argument '<SIGN><MANTISSE>e<EXPONENT>' and
% expands to the final TeX-representation for that floating point
% number.
@@ -817,15 +836,22 @@
\newif\ifpgfmathfloat@usezerofill@fixed
\newif\ifpgfmathprintnumber@assumemathmode
\newif\ifpgfmathprintnumber@showpositive
+\newif\ifpgfmathprintnumber@frac@warn
\pgfkeys{%
/pgf/number format/.is family,
/pgf/number format,
fixed/.code= \pgfmath@set@number@printer{pgfmathprintnumber@FIXED},
sci/.code= \pgfmath@set@number@printer{pgfmathprintnumber@SCI},
- std/.code= \pgfmath@set@number@printer{pgfmathprintnumber@STD},
+ std/.code= {\pgfmath@set@number@printer{pgfmathprintnumber@STD}\pgfmathprintnumber@STD@setparam{#1}},
+ std/.default=,%
int detect/.code= \pgfmath@set@number@printer{pgfmathprintnumber@INT@DETECT},
int trunc/.code= \pgfmath@set@number@printer{pgfmathprintnumber@INT@TRUNC},
+ frac/.code= \pgfmath@set@number@printer{pgfmathprintnumber@frac},%
+ frac TeX/.initial=\frac,
+ frac shift/.initial=4,
+ frac warning/.is if=pgfmathprintnumber@frac@warn,
+ frac warning=true,
assume math mode/.is if=pgfmathprintnumber@assumemathmode,
assume math mode/.default=true,
fixed zerofill/.is if= pgfmathfloat@usezerofill@fixed,
@@ -835,6 +861,16 @@
zerofill/.style= {/pgf/number format/fixed zerofill=#1,/pgf/number format/sci zerofill=#1},
zerofill/.default= true,
precision/.store in= \pgfmathfloat@round@precision,
+ sci precision/.code={%
+ \edef\pgfmathfloat@loc@TMPa{#1}%
+ \ifx\pgfmathfloat@loc@TMPa\pgfutil@empty
+ \def\pgfmathprintnumber@sci@precision{\pgfmathfloat@round@precision}%
+ \else
+ \let\pgfmathprintnumber@sci@precision=\pgfmathfloat@loc@TMPa
+ \fi
+ },%
+ sci precision/.default=,
+ sci precision=,
fixed default/.code= {\let\pgfmathprintnumber@fixed@style=\pgfmathprintnumber@fixed@styleDEFAULT},
set decimal separator/.initial=,
dec sep/.style={/pgf/number format/set decimal separator=#1},
@@ -859,6 +895,26 @@
sci E/.code= {\let\pgfmathfloatrounddisplaystyle=\pgfmathfloatrounddisplaystyle@E},
sci subscript/.code= {\let\pgfmathfloatrounddisplaystyle=\pgfmathfloatrounddisplaystyle@subscript},
sci superscript/.code= {\let\pgfmathfloatrounddisplaystyle=\pgfmathfloatrounddisplaystyle@superscript},
+ sci generic/.code= {%
+ \let\pgfmathfloatrounddisplaystyle=\pgfmathfloatrounddisplaystyle@generic
+ \pgfkeysdefargs{/pgf/number format/sci generic/@}%
+ {##1##2##3}%
+ {\pgfqkeys{/pgf/number format/sci generic}{#1}}%
+ },
+ sci generic/mantisse sep/.initial=,%
+ sci generic/empty mantisse sep/.initial=,%
+ sci generic/exponent/.initial=,%
+ sci generic/.value required,
+ verbatim/.style={%
+ sci generic={mantisse sep=,exponent={e##1}},
+ 1000 sep=,
+ skip 0.=false,
+ print sign=false,
+ dec sep=.,
+ assume math mode,
+ @dec sep mark=,
+ @sci exponent mark=,
+ },
% sci may skip mantisse/.is if=pgfmathfloatround@allow@empty@mantisse,
% sci may skip mantisse/.default=true,
}
@@ -872,14 +928,44 @@
\expandafter\pgfmathprintnumber@STD@issci\pgfmathresult\relax
}
+\def\pgfmathprintnumber@STD@setparam#1{%
+ \edef\pgfmathfloat@loc@TMPb{#1}%
+ \ifx\pgfmathfloat@loc@TMPb\pgfutil@empty
+ % DEFAULT for lower and upper bound.
+ \def\pgfmathprintnumber@STD@getlowerbound{%
+ \c@pgf@counta=\pgfmathfloat@round@precision\relax
+ \divide\c@pgf@counta by-2\relax
+ }%
+ \def\pgfmathprintnumber@STD@upperbound{4}%
+ \else
+ \expandafter\pgfutil@in@\expandafter:\expandafter{\pgfmathfloat@loc@TMPb}%
+ \ifpgfutil@in@
+ % we have -4:5 or something like that.
+ % parse both values:
+ \def\pgfmathfloat@loc@TMPa##1:##2\relax{%
+ \edef\pgfmathprintnumber@STD@getlowerbound{%
+ \noexpand\c@pgf@counta=##1\space
+ }%
+ \edef\pgfmathprintnumber@STD@upperbound{##2}%
+ }%
+ \expandafter\pgfmathfloat@loc@TMPa\pgfmathfloat@loc@TMPb\relax
+ \else
+ % we have just the lower bound:
+ \def\pgfmathprintnumber@STD@upperbound{4}%
+ \edef\pgfmathprintnumber@STD@getlowerbound{%
+ \noexpand\c@pgf@counta=\pgfmathfloat@loc@TMPb\space
+ }%
+ \fi
+ \fi
+}%
+
\def\pgfmathprintnumber@STD@issci#1#2e#3\relax{%
\expandafter\ifnum#1<3
- \expandafter\ifnum#3>4
+ \expandafter\ifnum#3>\pgfmathprintnumber@STD@upperbound\relax
\pgfmathprintnumber@SCI@issci#1#2e#3\relax%
\else
\begingroup
- \c@pgf@counta=\pgfmathfloat@round@precision\relax
- \divide\c@pgf@counta by-2\relax
+ \pgfmathprintnumber@STD@getlowerbound
\ifnum#3<\c@pgf@counta
\pgfmathprintnumber@SCI@issci#1#2e#3\relax%
\else
@@ -893,6 +979,198 @@
\fi
}
+\def\pgfmathprintnumber@frac#1{%
+ % parse the input:
+ \pgfmathfloatparsenumber{#1}%
+ \pgfmathfloatgetfrac{\pgfmathresult}%
+ \expandafter\pgfmathprintnumber@frac@formatresult\pgfmathresult
+}
+\def\pgfmathprintnumber@frac@issci#1#2e#3\relax{%
+ \pgfmathfloatcreate{#1}{#2}{#3}%
+ \pgfmathfloatgetfrac{\pgfmathresult}%
+ \expandafter\pgfmathprintnumber@frac@formatresult\pgfmathresult
+}
+\def\pgfmathprintnumber@frac@formatresult#1#2#3{%
+ \begingroup
+ \pgfkeysgetvalue{/pgf/number format/frac TeX}\pgfmathresult
+ \toks0=\expandafter{\pgfmathresult}%
+ \def\pgfmathfloat@loc@TMPa{#1}%
+ \ifx\pgfmathfloat@loc@TMPa\pgfutil@empty
+ \ifpgfmathprintnumber@showpositive
+ \def\pgfmathfloat@loc@TMPa{+}%
+ \fi
+ \else
+ % FIXME : doesn't respect show pos!
+ \fi
+ \toks1=\expandafter{\pgfmathfloat@loc@TMPa}%
+ \edef\pgfmathresult{%
+ \the\toks1 \the\toks0 {#2}{#3}%
+ }%
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+}%
+
+% Defines \pgfmathresult to contain three sets of braces containing
+% the sign (optionally containing any components >1), the counter and the denominator for #1.
+%
+% \pgfmathfloatgetfrac{0.5} -> \pgfmathresult contains {}{1}{2}
+% \pgfmathfloatgetfrac{-0.5} -> \pgfmathresult contains {-}{1}{2}
+\def\pgfmathfloatgetfrac#1{%
+ \begingroup
+ \edef\pgfmathfloat@arg{#1}%
+ \expandafter\pgfmathfloat@decompose@tok\pgfmathfloat@arg\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
+ \def\pgfmathfloat@loc@TMPa{0}%
+ \ifcase\pgfmathfloat@a@S
+ % #1 = 0:
+ \def\pgfmathresult{{}{0}{1}}%
+ \or% #1 > 0
+ \pgfmathfloat@a@S=1
+ \def\pgfmathfloat@loc@TMPa{1}%
+ \or% #1 < 0
+ \pgfmathfloat@a@S=-1
+ \def\pgfmathfloat@loc@TMPa{1}%
+ \or
+ \edef\pgfmathresult{{}{NaN}{1}}%
+ \or
+ \edef\pgfmathresult{{}{\infty}{1}}%
+ \or
+ \edef\pgfmathresult{{-}{\infty}{1}}%
+ \fi
+ \if1\pgfmathfloat@loc@TMPa
+ \ifnum\pgfmathfloat@a@E<0
+ \def\pgfmathfloat@wholenumber{}%
+ \else
+ \pgfmathfloattofixed{#1}%
+ \def\pgfmathfloat@loc@TMPa##1.##2\relax{%
+ \def\pgfmathfloat@wholenumber{##1}%
+ \pgfmathfloatparsenumber{0.##2}%
+ }%
+ \expandafter\pgfmathfloat@loc@TMPa\pgfmathresult\relax
+ \expandafter\pgfmathfloat@decompose@tok\pgfmathresult\relax\pgfmathfloat@b@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
+ \fi
+ \pgfmathfloat@a@E=-\pgfmathfloat@a@E
+ %
+ \def\pgfmathfloat@loc@TMPa##1.##2\relax{%
+ \def\pgfmathfloat@mantisse@first{##1}%
+ \def\pgfmathfloat@mantisse@ltone{0.##2}%
+ }%
+ \expandafter\pgfmathfloat@loc@TMPa\the\pgfmathfloat@a@Mtok\relax
+ %
+ \def\pgfmathfloat@loc@@to@int##1.##2\relax##3{%
+ ##3=##1
+ \ifdim0.##2pt>0.5pt
+ \advance##3 by1
+ \fi
+ }%
+ %
+ \ifdim\pgfmathfloat@mantisse@ltone pt=0pt
+ \def\pgfmathfloat@factor{1}%
+ \edef\pgfmathfloat@scaled@counter{\the\pgfmathfloat@a@Mtok}%
+ \else
+ % FIXME : this here is numerically instable.
+ %
+ % The errors of 1/r are magnified by 10^k which
+ % doesn't work.
+ \pgfutil@ifundefined{FPdiv}{%
+ \pgfmathfloatparsenumber{\pgfmathfloat@mantisse@ltone}%
+ \pgfmathfloatreciprocal@{\pgfmathresult}%
+ }{%
+ % \usepackage{fp}.
+ % yields higher absolute precision.
+ \FPmessagesfalse%
+ \FPdebugfalse%
+ \FPdiv\pgfmathresult{1}{\pgfmathfloat@mantisse@ltone}%
+ \pgfmathfloatparsenumber{\pgfmathresult}%
+ }%
+ \let\pgfmathfloat@inv=\pgfmathresult
+ \pgfmathfloatcreate{1}{1.0}{\pgfkeysvalueof{/pgf/number format/frac shift}}%
+ \let\pgfmathfloat@scalebaseten=\pgfmathresult
+ \pgfmathfloatmultiply@{\pgfmathfloat@inv}{\pgfmathfloat@scalebaseten}%
+ \let\pgfmathfloat@factor=\pgfmathresult
+ %
+ \expandafter\pgfmathfloatparsenumber\expandafter{\the\pgfmathfloat@a@Mtok}%
+ \let\pgfmathfloat@loc@TMPa=\pgfmathresult
+ \pgfmathfloatmultiply@{\pgfmathfloat@factor}{\pgfmathfloat@loc@TMPa}%
+ \pgfmathfloattofixed\pgfmathresult
+ \let\pgfmathfloat@scaled@counter=\pgfmathresult
+ %
+ \pgfmathfloattofixed\pgfmathfloat@factor
+ \expandafter\pgfmathfloat@loc@@to@int\pgfmathresult\relax{\pgfmathfloat@b@S}%
+ \edef\pgfmathfloat@factor{\the\pgfmathfloat@b@S}%
+ \fi
+ %
+ \let\pgfmathresultcounter=\pgfmathfloat@b@S
+ \let\pgfmathresultdenom=\pgfmathfloat@b@E
+ %
+ \pgfmathresultdenom=\pgfmathfloat@factor\relax
+ \pgfmathfloat@multiply@ten@to@the@E\pgfmathresultdenom
+ %
+ \expandafter\pgfmathfloat@loc@@to@int\pgfmathfloat@scaled@counter\relax{\pgfmathresultcounter}%
+%\message{scale = \pgfmathfloat@factor; Z = \the\pgfmathresultcounter\space ( von \pgfmathfloat@scaled@counter), N = \the\pgfmathresultdenom.}%
+ %
+ \pgfmathgreatestcommondivisor{\pgfmathresultcounter}{\pgfmathresultdenom}%
+ \divide\pgfmathresultcounter by\pgfmathresult\relax
+ \divide\pgfmathresultdenom by\pgfmathresult\relax
+ \ifpgfmathprintnumber@frac@warn
+ \ifnum\pgfmathresultdenom>1000
+ \pgfutil@ifundefined{FPdiv}{%
+ \pgfmathfloattosci@\pgfmathfloat@arg
+ \immediate\write16{! Package pgf /pgf/number format/frac warning=true: /pgf/number format/frac of `\pgfmathresult' = \the\pgfmathresultcounter\space / \the\pgfmathresultdenom\space might be large due to instabilities. Try \string\usepackage{fp} to improve accuracy.}%
+ }{}%
+ \fi
+ \fi
+ \ifnum\pgfmathfloat@a@S<0
+ \edef\pgfmathresult{{-\pgfmathfloat@wholenumber}{\the\pgfmathresultcounter}{\the\pgfmathresultdenom}}%
+ \else
+ \edef\pgfmathresult{{\pgfmathfloat@wholenumber}{\the\pgfmathresultcounter}{\the\pgfmathresultdenom}}%
+ \fi
+ \fi
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+}%
+\def\pgfmathfloat@gobble@until@relax#1\relax{}
+
+% computes the greatest common divisor of two integer numbers (in
+% integer arithmetics).
+\def\pgfmathgreatestcommondivisor#1#2{%
+ \begingroup
+ \count0=#1\relax
+ \count1=#2\relax
+ \ifnum\count0=0
+ \edef\pgfmathresult{\the\count1}%
+ \else
+ \pgfmathgreatestcommondivisor@loop
+ \edef\pgfmathresult{\the\count0}%
+ \fi
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+}
+\def\pgfmathgreatestcommondivisor@loop{%
+ \ifnum\count1=0
+ \else
+ \ifnum\count0>\count1
+ \advance\count0 by-\count1
+ \else
+ \advance\count1 by-\count0
+ \fi
+ \expandafter\pgfmathgreatestcommondivisor@loop
+ \fi
+}%
+
+% multiplies a TeX register by 10^E where E is stored in the register
+% \pgfmathfloat@a@E (and it should be positive!)%
+%
+% #1 a TeX register
+\def\pgfmathfloat@multiply@ten@to@the@E#1{%
+ \ifnum\pgfmathfloat@a@E>0
+ \multiply#1 by10
+ \advance\pgfmathfloat@a@E by-1
+ \def\pgfmathfloat@multiply@ten@to@the@E@next{\pgfmathfloat@multiply@ten@to@the@E{#1}}%
+ \else
+ \let\pgfmathfloat@multiply@ten@to@the@E@next=\relax%
+ \fi
+ \pgfmathfloat@multiply@ten@to@the@E@next
+}%
\def\pgfmathprintnumber@INT@TRUNC#1{%
\pgfmathfloatparsenumber{#1}%
@@ -914,6 +1192,37 @@
\fi
}
+% Invokes '#2' if '#1' is actually an integer or '#3' if not.
+%
+% As a side--effect, \pgfretval will be set to the integer value if it
+% actually *is* an integer. Otherwise, \pgfretval will contain the
+% parsed floating point number.
+%
+% #1 a number constant (not necessarily a parsed float).
+\def\pgfmathifisint#1#2#3{%
+ \gdef\pgfmathfloatisint@@{0}%
+ \begingroup
+ \pgfmathfloatparsenumber{#1}%
+ \let\pgfretval\pgfmathresult
+ \pgfmathfloat@to@FMeE@style\pgfmathresult
+ \expandafter\pgfmathfloatisint@\pgfmathresult\relax
+ \pgfmath@smuggleone\pgfretval
+ \endgroup
+ \if1\pgfmathfloatisint@@ #2\else #3\fi
+}%
+\def\pgfmathfloatisint@#1#2e#3\relax{%
+ \ifnum#1<3\relax
+ \pgfmathfloatcreate{#1}{#2}{#3}%
+ \pgfmathfloattofixed{\pgfmathresult}%
+ \def\pgfmathfloat@round@precision{6}%
+ \expandafter\pgfmathroundto\expandafter{\pgfmathresult}%
+ \ifpgfmathfloatroundhasperiod
+ \else
+ \let\pgfretval\pgfmathresult%
+ \gdef\pgfmathfloatisint@@{1}%
+ \fi
+ \fi
+}
\def\pgfmathprintnumber@INT@DETECT#1{%
\pgfmathfloatparsenumber{#1}%
@@ -926,8 +1235,10 @@
\ifnum#1<3\relax
\pgfmathfloatcreate{#1}{#2}{#3}%
\pgfmathfloattofixed{\pgfmathresult}%
+ \let\pgfmathfloat@round@precision@=\pgfmathfloat@round@precision
\def\pgfmathfloat@round@precision{6}%
\expandafter\pgfmathroundto\expandafter{\pgfmathresult}%
+ \let\pgfmathfloat@round@precision=\pgfmathfloat@round@precision@
\ifpgfmathfloatroundhasperiod
\pgfmathprintnumber@SCI@issci#1#2e#3\relax
\else
@@ -979,7 +1290,9 @@
}
\def\pgfmathprintnumber@SCI@issci#1#2e#3\relax{%
+ \begingroup
\pgfmathfloatcreate{#1}{#2}{#3}%
+ \edef\pgfmathfloat@round@precision{\pgfmathprintnumber@sci@precision}%
\ifpgfmathfloat@usezerofill@sci
\pgfmathfloatroundzerofill{\pgfmathresult}%
\else
@@ -987,6 +1300,8 @@
\fi
\pgfmathfloat@to@FMeE@style\pgfmathresult
\expandafter\pgfmathfloatrounddisplaystyle\pgfmathresult\relax
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
}
% Prints argument #1 using the current pretty printer environment (all
@@ -994,6 +1309,11 @@
%
% You may specify optional arguments with \pgfmathprintnumber[...].
\def\pgfmathprintnumber{%
+ % \protect allows to supply \pgfmathprintnumber inside of latex
+ % captions. The \csname yields \relax in case protect is undefined.
+ \csname protect\endcsname\pgfmathprintnumber@protected
+}%
+\def\pgfmathprintnumber@protected{%
\pgfutil@ifnextchar[%
{\pgfmathprintnumber@OPT}%
{\pgfmathprintnumber@noopt}%
@@ -1063,11 +1383,7 @@
\expandafter\let\expandafter\pgfmathprintnumber@issci\csname #1@issci\endcsname
}
-\pgfmath@set@number@printer{pgfmathprintnumber@STD}
-%\pgfmath@set@number@printer{pgfmathprintnumber@FIXED}
-%\pgfmath@set@number@printer{pgfmathprintnumber@FIXED@ZEROFILL}
-%\pgfmath@set@number@printer{pgfmathprintnumber@SCI@ZEROFILL}
-%\pgfmath@set@number@printer{pgfmathprintnumber@SCI}
+\pgfkeys{/pgf/number format/std}
%%%%%%%%%%%%%%%%%%%%%%%%%%
%
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 eefc385245e..7814fb566f6 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: Di 29. Dez 22:11:16 CET 2009 %%%
+%%% Date of this copy: Mi 31. Mär 21:41:41 CEST 2010 %%%
@@ -45,7 +45,7 @@
\toksdef\t@tikzexternal@tmpb=1
\def\tikzexternalize{\@ifnextchar[{\tikzexternalize@opt}{\tikzexternalize@opt[]}}%
-\def\tikzexternalize@opt[#1]#2{\def\tikzexternal@realjob{#2}}
+\def\tikzexternalize@opt[#1]{\@ifnextchar\bgroup{\def\tikzexternal@realjob}{\let\tikzexternal@realjob=\jobname}}%
\def\tikzsetnextfilename#1{\gdef\tikzexternal@nextfile{#1}}
\def\tikzsetexternalprefix#1{\def\tikzexternal@filenameprefix{#1}}
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 1993db33660..1e788bd5a27 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,11 +14,11 @@
%%% - nested \input commands have been updated
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Date of this copy: Di 29. Dez 22:11:16 CET 2009 %%%
+%%% Date of this copy: Mi 31. Mär 21:41:41 CEST 2010 %%%
-% Copyright 2008 by Christian Feuersaenger
+% Copyright 2008-2010 by Christian Feuersaenger
%
% This file may be distributed and/or modified
%
@@ -87,7 +87,24 @@
\tikzexternalgetnextfilename\tikzexternal@temp
\tikzifexternaljobnamematches\tikzexternal@temp{#1}{#2}%
\else
- #2
+ #2%
+ \fi
+}%
+% Invokes '#1' if the external lib is currently externalizing the
+% current picture. It invokes '#2' if that is not the case.
+%
+% If the command is invoked outside of a picture, '#2' will be
+% invoked.
+\def\tikzifexternalizingcurrent#1#2{%
+ \ifpgf@external@grabshipout
+ \tikzexternalgetcurrentfilename\tikzexternal@temp
+ \ifx\tikzexternal@temp\pgfutil@empty
+ #2%
+ \else
+ \tikzifexternaljobnamematches\tikzexternal@temp{#1}{#2}%
+ \fi
+ \else
+ #2%
\fi
}%
@@ -96,25 +113,49 @@
%
\def\tikzifexternaljobnamematches#1#2#3{%
\edef\pgf@tempa{\expandafter\string\csname#1\endcsname}%
- \edef\pgf@tempb{\expandafter\string\csname\jobname\endcsname}%
+ \edef\pgf@tempb{\expandafter\string\csname\pgfactualjobname\endcsname}%
\ifx\pgf@tempa\pgf@tempb #2\else#3 \fi%
}%
+
+\pgfutil@ifundefined{pdfshellescape}{%
+ \def\tikzexternalcheckshellescape{}%
+}{%
+ \ifnum\pdfshellescape=1
+ \def\tikzexternalcheckshellescape{\pgfkeysvalueof{/tikz/external/shell escape}\space}%
+ \else
+ \def\tikzexternalcheckshellescape{}%
+ \fi
+}%
+\newif\iftikzexternal@auto@detect@jobname
+
\pgfqkeys{/tikz/external}{
figure list/.is if=tikzexternal@genfigurelist,
- figure list=true,
+ aux in dpth/.style={/pgf/images/aux in dpth=#1},%
% 'mode' applies only if \jobname==real job name.
mode/.is choice,
- mode/only graphics/.code = {\def\tikzexternal@opmode{0}},
+ mode/only graphics/.code = {%
+ \def\tikzexternal@opmode{0}%
+ \pgfkeysalso{/pgf/images/aux in dpth=true}%
+ },
mode/no graphics/.code = {\def\tikzexternal@opmode{1}},
% an alias for 'no graphics:'
mode/only pictures/.code = {\def\tikzexternal@opmode{1}},
- mode/graphics if exists/.code= {\def\tikzexternal@opmode{2}},
+ mode/graphics if exists/.code= {%
+ \def\tikzexternal@opmode{2}%
+ \pgfkeysalso{/pgf/images/aux in dpth=true}%
+ },
mode/list only/.code = {\def\tikzexternal@opmode{3}\tikzexternal@genfigurelisttrue},
- mode/convert with system call/.code={\def\tikzexternal@opmode{4}\tikzexternal@genfigurelistfalse},
- mode/list and make/.code = {\def\tikzexternal@opmode{5}\tikzexternal@genfigurelisttrue},
+ mode/convert with system call/.code={%
+ \def\tikzexternal@opmode{4}%
+ \pgfkeysalso{/tikz/external/figure list=false,/pgf/images/aux in dpth=false}%
+ },
+ mode/list and make/.code = {%
+ \def\tikzexternal@opmode{5}%
+ \pgfkeysalso{/tikz/external/figure list=true,/pgf/images/aux in dpth=true}%
+ },
mode=convert with system call,
- system call/.initial={pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"},
+ system call/.initial={pdflatex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"},
% system call/.initial={pdflatex -interaction=batchmode -jobname '\image' '\texsource'; pdftops -eps \image.pdf},
force remake/.is if=tikzexternal@force@remake,
force remake/.default=true,
@@ -125,7 +166,9 @@
verbose IO/.is if=tikzexternal@verboseio,
verbose IO/.default=true,
verbose IO=true,
+ shell escape/.initial=-shell-escape,
verbose optimize/.is if=tikzexternal@verbose@optimize,
+ read main aux/.is if=pgfexternalreadmainaux,
optimize/.is choice,
optimize/true/.code={%
\tikzexternal@optimizetrue
@@ -207,11 +250,20 @@
% This method initialises automatic externalization.
%
-% The first argument is the job's real name, without suffix.
+% The command does need any argument, but it has two optional ones:
%
-% \tikzexternalize{myarticle}
+% 1. \tikzexternalize[<options>]
%
-% Doing so will
+% 2. \tikzexternalize{<real job's name>}
+%
+% 3. \tikzexternalize[<options>]{<real job's name>}
+%
+% The <real job's name> is the job's file name, without the suffix
+% .tex .
+% If the <real job's name> is omitted, it will be deduced
+% automatically.
+%
+% The effect is:
% 1. automatically surround EVERY tikzpicture by \beginpgfgraphicnamed % sections.
% 2. in case that the job's real name and the current \jobname differ,
% it will process ONLY the matching tikzpicture.
@@ -222,22 +274,137 @@
\tikzexternalize@opt[]%
}%
}%
-\def\tikzexternalize@hasbeencalled{0}%
-\def\tikzexternalize@opt[#1]#2{%
- \pgfqkeys{/tikz/external}{#1}%
- \def\tikzexternal@realjob{#2}%
- \pgfrealjobname{#2}%
- \def\tikzexternalize@hasbeencalled{1}%
- \tikzexternalenable
- \def\tikzexternal@determineimgextension##1:##2\relax{\gdef\tikzexternal@imgext{##1}}%
- \xdef\pgf@tempa{\pgfsys@imagesuffixlist}%
- \expandafter\tikzexternal@determineimgextension\pgf@tempa\relax
- \pgfutil@ifundefined{includegraphics}{%
- \let\tikzexternal@orig@includegraphics=\relax
+\def\tikzexternalize@opt[#1]{%
+ \pgfutil@ifnextchar\bgroup{%
+ \tikzexternal@auto@detect@jobnamefalse
+ \tikzexternalize@opt@withname[#1]%
}{%
- \let\tikzexternal@orig@includegraphics=\includegraphics
+ \tikzexternal@auto@detect@jobnametrue
+ \pgfutil@ifundefined{tikzexternalrealjob}{%
+ % ok, \tikzexternalrealjob is not known.
+ % Assume we are currently *not* externalizing.
+ \let\tikzexternalrealjob=\jobname
+ }{}%
+ \def\pgf@tempa{\tikzexternalize@opt@withname[#1]}%
+ \expandafter\pgf@tempa\expandafter{\tikzexternalrealjob}%
}%
+}%
+\def\tikzexternalize@opt@withname[#1]#2{%
+ \gdef\tikzexternalrealjob{#2}%
+ \if1\tikzexternalize@hasbeencalled
+ \else
+ \pgfqkeys{/tikz/external}{#1}%
+ \def\tikzexternal@realjob{#2}%
+ \tikzexternalauxlock@init
+ \pgfrealjobname{#2}%
+ \def\tikzexternalize@hasbeencalled{1}%
+ \tikzexternalenable
+ \def\tikzexternal@determineimgextension##1:##2\relax{\gdef\tikzexternalimgextension{##1}}%
+ \xdef\pgf@tempa{\pgfsys@imagesuffixlist}%
+ \expandafter\tikzexternal@determineimgextension\pgf@tempa\relax
+ \pgfutil@ifundefined{includegraphics}{%
+ \let\tikzexternal@orig@includegraphics=\relax
+ }{%
+ \let\tikzexternal@orig@includegraphics=\includegraphics
+ }%
+ \let\tikzexternalfiledependsonfile=\tikzexternalfiledependsonfile@ACTIVE
+ \let\tikzpicturedependsonfile=\tikzpicturedependsonfile@ACTIVE
+ \fi
}
+\def\tikzexternalize@hasbeencalled{0}%
+
+% If mode=`convert with system call', the boolean \ifpgfexternalreadmainaux
+% will be set depending on the current lock file.
+%
+% The idea is as follows: Suppose
+% pdflatex -shell-escape mainjob.tex
+% is running.
+%
+% While it runs,
+% a) it modifies its mainjob.aux file,
+% b) it issues pdflatex -jobname mainjob-figure0 mainjob.tex .
+%
+% The call (b) will try to read mainjob.aux in order to resolve \ref
+% commands. This may fail since the aux
+% file is not complete; it may be subject to output buffering. To
+% avoid such failure, a locking mechanism is established.
+%
+% The locking mechanisms causes (a) to write a lock command into
+% mainjob.auxlock
+% just before (b) is called. Then, (b) will check it. After (b) has
+% completed, the lock will be reset.
+%
+% Thus: mode=convert with system call does NOT support \ref commands
+% inside of images. You will need to call the externalization command
+% manually. In this case, it should work.
+%
+% @PRECONDITION : this command must be invoked AFTER
+% \tikzexternal@realjob has been defined but BEFORE \pgfrealjobname is
+% called.
+%
+% @POSTCONDITION : If \ifpgfexternalreadmainaux=\iffalse, we won't do
+% anything. Otherwise, it will be changed depending for 'mode=convert
+% with system call' if necessary.
+\def\tikzexternalauxlock@init{%
+ \if4\tikzexternal@opmode
+ \ifpgfexternalreadmainaux
+ % mode=convert with system call
+ \edef\pgf@tempa{\expandafter\string\csname\tikzexternal@realjob\endcsname}%
+ \edef\pgf@tempb{\expandafter\string\csname\jobname\endcsname}%
+ \ifx\pgf@tempa\pgf@tempb
+ % we are *not* externalizing. Set lock into its
+ % initial "unlocked" state.
+ \tikzexternalauxlock@setlock{0}%
+ \else
+ % we are externalizing. Query the lock's value:
+ \tikzexternalauxlock@getlockvalue
+ \if1\tikzexternallocked
+ \pgfexternalreadmainauxfalse
+ \else
+ \pgfexternalreadmainauxtrue
+ \fi
+ \fi
+ \else
+ % NO-OP. We won't read the main aux file anyway.
+ \def\tikzexternalauxlock@setlock##1{}%
+ \fi
+ \fi
+}
+% defines \tikzexternallocked to be either 0 or 1, depending on the
+% lock file.
+\def\tikzexternalauxlock@getlockvalue{%
+ \openin\r@pgf@reada=\tikzexternal@realjob.auxlock
+ \ifeof\r@pgf@reada
+ % no lock file. Unlock.
+ \def\tikzexternallocked{0}%
+ \else
+ % read first line...
+ \read\r@pgf@reada to\pgf@tempa
+ % ... and execute it.
+ \pgf@tempa
+ % it should contain a definition of \tikzexternallocked. If
+ % not, lock it anyway.
+ \pgfutil@ifundefined
+ {tikzexternallocked}
+ {\def\tikzexternallocked{1}}%
+ {}%
+ \fi
+ \closein\r@pgf@reada
+}%
+\def\tikzexternalauxlock@setlock#1{%
+ \immediate\openout\w@pgf@writea=\tikzexternal@realjob.auxlock
+ \immediate\write\w@pgf@writea{\noexpand\def\noexpand\tikzexternallocked{#1}}%
+ \immediate\closeout\w@pgf@writea
+}
+
+% Expands to the default image extension (it is set by
+% \tikzexternalize).
+%
+% This image extension may not resemble the correct one; you may need
+% to overwrite this macro *after* \tikzexternalize in this case.
+%
+% The default setting uses the first registered image extension.
+\def\tikzexternalimgextension{}%
% can be used to (temporarily) disable the externalization.
\def\tikzexternaldisable{%
@@ -339,6 +506,7 @@
\let\tikzexternal@origtikz=\tikz
\let\tikzexternal@origpicture=\tikzpicture
\let\tikzexternal@origendpicture=\endtikzpicture
+\let\tikzexternal@curfilename=\relax
% Replacement for '\tikzpicture'.
%
@@ -348,6 +516,7 @@
% externalize the picture selected by 'jobname' (and only this picture).
\def\tikzexternal@tikzpicture@replacement{%
\leavevmode
+ \global\tikzexternal@file@isuptodatetrue% may be set to false during checks.
\tikzexternal@getnextfilename\tikzexternal@curfilename
\ifx\tikzexternal@curfilename\pgfutil@empty
\ifpgf@external@grabshipout
@@ -455,11 +624,28 @@
\def\tikzexternalgetnextfilename#1{%
\begingroup
\let\tikzexternal@getnextfilename@advancecount\relax% NOP
+ \def\tikzexternal@protocol@to@file##1{}% NOP
\tikzexternal@getnextfilename#1%
\pgfmath@smuggleone#1%
\endgroup
}%
+% Returns the file name of the current picture.
+%
+% It returns the empty string in case the command is invoked outside
+% of a picture.
+% #1 the macro which will contain the file name.
+% @see \tikzexternalgetnextfilename
+\def\tikzexternalgetcurrentfilename#1{%
+ \ifx\tikzexternal@curfilename\relax
+ % we are outside of a picture.
+ \let#1=\pgfutil@empty
+ \else
+ % we are inside of a picture.
+ \let#1=\tikzexternal@curfilename
+ \fi
+}
+
% Fills #1 with a filename for the current picture.
%
% The filename will be generated automatically by appending '-figure<number>' to the real jobname.
@@ -506,36 +692,24 @@
\global\let\tikzexternal@nextfile=\pgfutil@empty
\global\tikzexternalexportnexttrue
%
- % Handle verbose output:
+ \tikzexternal@protocol@to@file#1%
+}%
+
+% #1: the image file name which should be protocolled. (can be a
+% macro)
+\def\tikzexternal@protocol@to@file#1{%
\ifpgf@external@grabshipout%
\else
\iftikzexternal@genfigurelist
- \ifx#1\pgfutil@empty
+ \edef\tikzexternal@temp{#1}%
+ \ifx\tikzexternal@temp\pgfutil@empty
\else
\pgfutil@ifundefined{tikzexternal@listmode@openedfile}{%
\message{Opening '\tikzexternal@realjob.figlist' for writing.}%
\immediate\openout\tikzexternal@outfile=\tikzexternal@realjob.figlist\relax
\gdef\tikzexternal@listmode@openedfile{1}%
\if\tikzexternal@opmode5% mode='list and make'
- \iftikzexternal@verboseio
- \immediate\write16{Opening '\tikzexternal@realjob.makefile' for writing.}%
- \fi
- \begingroup
- % this makes \tikzexternal@outmakefile global:
- \globaldefs=1
- % this gets round '\outer\newwrite' in plain TeX:
- \csname newwrite\endcsname\tikzexternal@outmakefile
- \endgroup
- \immediate\openout\tikzexternal@outmakefile=\tikzexternal@realjob.makefile\relax
- \immediate\write\tikzexternal@outmakefile{ALL_FIGURE_NAMES=\tikzexternal@DOLLARchar(shell cat \tikzexternal@realjob.figlist)}%
- \immediate\write\tikzexternal@outmakefile{ALL_FIGURES=\tikzexternal@DOLLARchar(ALL_FIGURE_NAMES:\tikzexternal@PERCENTchar=\tikzexternal@PERCENTchar\tikzexternal@imgext)}%
- \immediate\write\tikzexternal@outmakefile{}%
- \immediate\write\tikzexternal@outmakefile{allimages: \tikzexternal@DOLLARchar(ALL_FIGURES)}%
- \immediate\write\tikzexternal@outmakefile{\tikzexternal@TABchar @echo All images exist now. Use make -B to re-generate them.}%
- \immediate\write\tikzexternal@outmakefile{}%
- \pgfutil@ifundefined{AtEndDocument}{}{%
- \AtEndDocument{\immediate\write16{===== mode=`list and make': Use 'make -f \tikzexternal@realjob.makefile' to generate all images. Then, re-run (pdf)latex \tikzexternal@realjob. =====}}%
- }%
+ \tikzexternal@list@and@make@prepare
\fi
}{}%
\iftikzexternal@verboseio
@@ -543,19 +717,147 @@
\fi
\immediate\write\tikzexternal@outfile{#1}%
\if\tikzexternal@opmode5% mode='list and make'
- \tikzexternal@assemble@systemcall{\pgf@tempa}%
- \iftikzexternal@verboseio
- \immediate\write16{Writing '#1' to '\tikzexternal@realjob.makefile'.}%
- \fi
- \immediate\write\tikzexternal@outmakefile{#1\tikzexternal@imgext:}%
- \immediate\write\tikzexternal@outmakefile{\tikzexternal@TABchar\pgf@tempa}%
- \immediate\write\tikzexternal@outmakefile{}%
+ \tikzexternal@list@and@make@gentarget{#1}%
\fi
\fi
\fi
\fi
}%
+\def\tikzexternal@list@and@make@gentarget#1{%
+ \tikzexternal@assemble@systemcall{#1}{\pgf@tempa}%
+ \iftikzexternal@verboseio
+ \immediate\write16{Writing '#1' to '\tikzexternal@realjob.makefile'.}%
+ \fi
+ \global\tikzexternal@file@isuptodatetrue% only check for force remake:
+ \tikzexternal@checkforceremake%
+ \immediate\write\tikzexternal@outmakefile{#1\tikzexternalimgextension: \iftikzexternal@file@isuptodate\else FORCEREMAKE\fi}%
+ \immediate\write\tikzexternal@outmakefile{\tikzexternal@TABchar\pgf@tempa}%
+ \immediate\write\tikzexternal@outmakefile{}%
+}
+
+\def\tikzexternal@list@and@make@prepare{%
+ \iftikzexternal@verboseio
+ \immediate\write16{Opening '\tikzexternal@realjob.makefile' for writing.}%
+ \fi
+ \begingroup
+ % this makes \tikzexternal@outmakefile global:
+ \globaldefs=1
+ % this gets round '\outer\newwrite' in plain TeX:
+ \csname newwrite\endcsname\tikzexternal@outmakefile
+ \endgroup
+ \immediate\openout\tikzexternal@outmakefile=\tikzexternal@realjob.makefile\relax
+ \immediate\write\tikzexternal@outmakefile{ALL_FIGURE_NAMES=\tikzexternal@DOLLARchar(shell cat \tikzexternal@realjob.figlist)}%
+ \immediate\write\tikzexternal@outmakefile{ALL_FIGURES=\tikzexternal@DOLLARchar(ALL_FIGURE_NAMES:\tikzexternal@PERCENTchar=\tikzexternal@PERCENTchar\tikzexternalimgextension)}%
+ \immediate\write\tikzexternal@outmakefile{}%
+ \immediate\write\tikzexternal@outmakefile{allimages: \tikzexternal@DOLLARchar(ALL_FIGURES)}%
+ \immediate\write\tikzexternal@outmakefile{\tikzexternal@TABchar @echo All images exist now. Use make -B to re-generate them.}%
+ \immediate\write\tikzexternal@outmakefile{}%
+ \immediate\write\tikzexternal@outmakefile{FORCEREMAKE:}%
+ \immediate\write\tikzexternal@outmakefile{}%
+ %
+ % support for .dep files and auto-dependencies:
+ \immediate\write\tikzexternal@outmakefile{include $(ALL_FIGURE_NAMES:\tikzexternal@PERCENTchar=\tikzexternal@PERCENTchar.\tikzexternaldepext)}%
+ \immediate\write\tikzexternal@outmakefile{}%
+ \tikzexternalmakefiledefaultdeprule
+ \immediate\write\tikzexternal@outmakefile{}%
+ \tikzexternal@outmakefile@pendingcommands
+ \pgfutil@ifundefined{AtEndDocument}{}{%
+ \AtEndDocument{\immediate\write16{===== mode=`list and make': Use 'make -f \tikzexternal@realjob.makefile' to generate all images. Then, re-run (pdf)latex \tikzexternal@realjob. =====}}%
+ }%
+}%
+\def\tikzexternaldepext{dep}
+
+\def\tikzexternalmakefiledefaultdeprule{%
+ \immediate\write\tikzexternal@outmakefile{\tikzexternal@PERCENTchar.\tikzexternaldepext:}%
+ \immediate\write\tikzexternal@outmakefile{\tikzexternal@TABchar touch $@ \tikzexternal@HASHchar\space will be filled later.}%
+}%
+
+% Invokes '#1' if a makefile is to be written and '#2' if not.
+\def\tikzexternalifwritesmakefile#1#2{%
+ \if5\tikzexternal@opmode #1\else #2\fi
+}%
+\def\tikzexternal@outmakefile@pendingcommands{}%
+
+% Will write something to the make file. If the makefile is not yet
+% opened, #1 will be written as soon as it *is* opened.
+\def\tikzexternalwritetomakefile#1{%
+ \pgfutil@ifundefined{tikzexternal@outmakefile}{%
+ \expandafter\gdef\expandafter\tikzexternal@outmakefile@pendingcommands\expandafter{%
+ \tikzexternal@outmakefile@pendingcommands
+ \immediate\write\tikzexternal@outmakefile{#1}%
+ }%
+ }{%
+ \immediate\write\tikzexternal@outmakefile{#1}%
+ }%
+}%
+
+\def\tikzexternal@dep@file@name{}
+
+% Adds a dependency for the externalized picture file name `#1',
+% namely another file `#2'.
+%
+% #1: the fully qualified path name (without image extension) of the
+% external graphics for which we are adding a dependency.
+% #2: a file name. If this file gets changed, #1 shall be remade.
+%
+% This command will be actived as soons as \tikzexternalize has been
+% called.
+\def\tikzexternalfiledependsonfile@ACTIVE#1#2{%
+ \begingroup
+ \def\tikzpicturedependsonfile@name{#1}%
+ \ifx\tikzpicturedependsonfile@name\pgfutil@empty
+ % could be auto-generated: empty file name means "picture
+ % won't be externalized". Skip it.
+ \else
+ \edef\tikzpicturedependsonfile@name{#1.\tikzexternaldepext}%
+ \ifx\tikzexternal@dep@file@name\tikzpicturedependsonfile@name
+ % file is open and ready.
+ \else
+ % create new output file.
+ \pgfutil@ifundefined{tikzexternal@dep@file}{%
+ \begingroup
+ % this makes \tikzexternal@dep@file global:
+ \globaldefs=1
+ % this gets round '\outer\newwrite' in plain TeX:
+ \csname newwrite\endcsname\tikzexternal@dep@file
+ \endgroup
+ }{}%
+ \ifx\tikzexternal@dep@file@name\pgfutil@empty
+ \else
+ % it is already open. Close it.
+ \immediate\closeout\tikzexternal@dep@file
+ \fi
+ \global\let\tikzexternal@dep@file@name=\tikzpicturedependsonfile@name
+ \immediate\openout\tikzexternal@dep@file=\tikzexternal@dep@file@name\relax
+ \fi
+ \immediate\write\tikzexternal@dep@file{#1\tikzexternalimgextension: #2}%
+ \fi
+ \endgroup
+}%
+\def\tikzexternalfiledependsonfile#1#2{}% NO-OP until \tikzexternalize has been called.
+
+% Adds a dependency for the NEXT picture which is about to be
+% externalized. If we are currently inside of a picture, the
+% dependency is added for this current picture.
+%
+% #1: a file name. If this file gets changed, the tikzpicture's
+% externalized graphics shall be remade.
+%
+% This command will be actived as soons as \tikzexternalize has been
+% called.
+\def\tikzpicturedependsonfile@ACTIVE#1{%
+ \begingroup
+ \tikzexternalgetcurrentfilename\tikzpicturedependsonfile@name
+ \ifx\tikzpicturedependsonfile@name\pgfutil@empty
+ \tikzexternalgetnextfilename\tikzpicturedependsonfile@name
+ \fi
+ \expandafter\tikzexternalfiledependsonfile\expandafter{\tikzpicturedependsonfile@name}{#1}%
+ \endgroup
+}%
+\def\tikzpicturedependsonfile#1{}% NO-OP until \tikzexternalize has been called.
+
+
% This command is invoked
% if and only if ( (grab mode && --jobname matches) || 'mode=graphics if exists' )
%
@@ -616,29 +918,6 @@
\tikzpicture
}%
-% FIXME : this does not respect catcode changes!
-%--------------------------------------------------
-% \long\def\tikzexternal@externalizefig@@#1{%
-% \let\tikzpicture=\tikzexternal@origpicture
-% \iftikzexternal@optimize
-% \ifpgf@external@grabshipout
-% \tikzexternal@optimize@RESTORE
-% \fi
-% \fi
-% \expandafter\beginpgfgraphicnamed\expandafter{\tikzexternal@curfilename}%
-% \tikzpicture
-% #1
-% \endtikzpicture
-% \endpgfgraphicnamed
-% \let\tikzpicture=\tikzexternal@tikzpicture@replacement
-% \iftikzexternal@optimize
-% \ifpgf@external@grabshipout
-% \tikzexternal@optimize@REPLACE
-% \fi
-% \fi
-% \tikzexternal@closeenvironments
-% }%
-%--------------------------------------------------
% Used by the optimization code.
% It will be called if GRAB mode is on.
@@ -753,6 +1032,7 @@
\let\endtikzpicture=\relax
\tikzexternal@TEXDIALECT@endpicture
\let\endtikzpicture=\tikzexternal@origendpicture
+ \let\tikzexternal@curfilename=\relax
}
% Throws a tikzpicture away - without further notice.
@@ -921,20 +1201,30 @@
\catcode`\^^I=12
\catcode`\$=12
\catcode`\%=12
-\xdef\tikzexternal@TABchar{^^I}\xdef\tikzexternal@PERCENTchar{%}\xdef\tikzexternal@DOLLARchar{$}}
+\catcode`\#=12
+\gdef\tikzexternal@HASHchar{#}
+\gdef\tikzexternal@TABchar{^^I}\gdef\tikzexternal@PERCENTchar{%}\xdef\tikzexternal@DOLLARchar{$}}
% Creates the '/tikz/external/system call' command as string and
-% returns it into the (global!) macro #1.
-\def\tikzexternal@assemble@systemcall#1{%
+% returns it into the (global!) macro #2.
+% #1: the image file name (as returned by
+% \tikzexternalgetnextfilename)
+% #2: the global return value macro
+%
+\def\tikzexternal@assemble@systemcall#1#2{%
\begingroup
- \let\image=\tikzexternal@curfilename
- \let\texsource=\tikzexternal@realjob
+ \def\image{#1}%
+ \iftikzexternal@auto@detect@jobname
+ \edef\texsource{\string\def\string\tikzexternalrealjob{\tikzexternal@realjob}\string\input{\tikzexternal@realjob}}%
+ \else
+ \let\texsource=\tikzexternal@realjob
+ \fi
\ifnum\the\catcode`\"=13 \tikzexternal@activate@normal@dq\fi
\ifnum\the\catcode`\'=13 \tikzexternal@activate@normal@sq\fi
\ifnum\the\catcode`\;=13 \tikzexternal@activate@normal@semic\fi
\ifnum\the\catcode`\-=13 \tikzexternal@activate@normal@dash\fi
\let\\=\tikzexternal@normal@backslash
- \xdef#1{\pgfkeysvalueof{/tikz/external/system call}}%
+ \xdef#2{\pgfkeysvalueof{/tikz/external/system call}}%
\endgroup
}%
\long\def\tikzexternal@externalizefig@systemcall@@#1{%
@@ -947,11 +1237,14 @@
\else
\begingroup
% no such image. Generate it!
- \tikzexternal@assemble@systemcall{\pgf@tempa}%
+ \tikzexternal@assemble@systemcall{\tikzexternal@curfilename}{\pgf@tempa}%
\iftikzexternal@verboseio
\immediate\write16{===== 'mode=convert with system call': Invoking '\pgf@tempa' ========}%
\fi
+ %
+ \tikzexternalauxlock@setlock1%
\immediate\write18{\pgf@tempa}%
+ \tikzexternalauxlock@setlock0%
\expandafter\tikzexternal@externalizefig@systemcall@assertsuccess\expandafter{\pgf@tempa}%
\pgfmath@smuggleone\pgf@filename
\endgroup
@@ -989,6 +1282,19 @@
\tikzexternal@externalizefig@systemcall@next
}%
+% Sets \iftikzexternal@file@isuptodate to false if one of the "force
+% remake" things is active.
+\def\tikzexternal@checkforceremake{%
+ \iftikzexternal@force@remake
+ \global\tikzexternal@file@isuptodatefalse
+ \else
+ \iftikzexternalremakenext
+ \global\tikzexternal@file@isuptodatefalse
+ \global\tikzexternalremakenextfalse
+ \fi
+ \fi
+}
+
% Checks whether the current picture needs to be externalized.
%
% This is the case if
@@ -997,23 +1303,15 @@
%
% It returns \iftikzexternal@file@isuptodate accordingly.
\def\tikzexternal@externalizefig@systemcall@uptodatecheck{%
- \iftikzexternal@force@remake
- \global\tikzexternal@file@isuptodatefalse
- \else
- \iftikzexternalremakenext
+ \tikzexternal@checkforceremake
+ \iftikzexternal@file@isuptodate
+ % check if there is already a file.
+ % In that case, use it. If that is not the case, generate it and include it afterwards.
+ \gdef\pgf@filename{}%
+ \xdef\pgf@tempa{\noexpand\pgf@findfile\pgfsys@imagesuffixlist:+{\tikzexternal@curfilename}}%
+ \pgf@tempa
+ \ifx\pgf@filename\pgfutil@empty%
\global\tikzexternal@file@isuptodatefalse
- \global\tikzexternalremakenextfalse
- \else
- % check if there is already a file.
- % In that case, use it. If that is not the case, generate it and include it afterwards.
- \gdef\pgf@filename{}%
- \xdef\pgf@tempa{\noexpand\pgf@findfile\pgfsys@imagesuffixlist:+{\tikzexternal@curfilename}}%
- \pgf@tempa
- \ifx\pgf@filename\pgfutil@empty%
- \global\tikzexternal@file@isuptodatefalse
- \else
- \global\tikzexternal@file@isuptodatetrue
- \fi
\fi
\fi
}%
diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzlibraryexternal.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzlibraryexternal.code.tex
index ee158b55427..a850f7f3608 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzlibraryexternal.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzlibraryexternal.code.tex
@@ -14,7 +14,7 @@
%%% - nested \input commands have been updated
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Date of this copy: Di 29. Dez 22:11:16 CET 2009 %%%
+%%% Date of this copy: Mi 31. Mär 21:41:41 CEST 2010 %%%
@@ -81,3 +81,8 @@
}%
\def\tikzexternal@laTeX@collect@until@end@tikzpicturetikzpicturestring{tikzpicture}%
+\AtBeginDocument{%
+ \pgfutil@ifundefined{tikzexternalrealjob}{%
+ \global\let\tikzexternalrealjob=\jobname
+ }{}%
+}%