summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex')
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex50
1 files changed, 49 insertions, 1 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 1fefd8f12cd..3f3f4e23162 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
@@ -210,16 +210,64 @@
pgfluamathparser = nil}
\pgfplotsusecompatibilityfile{pgflibraryluamath.code.tex}
% ATTENTION: see 'pgfplots.lua' which ALSO loads these items
+ % FIXME : some .lua files reference outdated
+ % tonumber/tostring functions!
\pgfutil@directlua{%
pgfplots.pgfluamathfunctions = pgfluamathfunctions;
- pgfplots.pgfluamathparser = pgfluamathparser}
+ pgfplots.pgfluamathparser = pgfluamathparser}%
\let\pgfmathnotifynewdeclarefunction@orig=\PATCH@pgfmathnotifynewdeclarefunction@orig
\let\pgfmathsetseed@pgfbasic=\PATCH@pgfmathsetseed@pgfbasic
+ \pgfplots@log4{luamath library shipped with pgf \pgfversion\space is outdated; using a substitute shipped with pgfplots}%
\else
\pgfplots@log4{luamath library shipped with pgf \pgfversion\space is up-to-date}%
\fi
\fi
\fi
+\def\pgf@plotgnuplot@luatex@eight@seven[#1]#2{%
+ \pgf@resample@plottrue%
+ \pgfutilpreparefilename{#1.gnuplot}%
+ \let\pgf@plotgnuplotfile=\pgfretval
+ \pgfutilpreparefilename{#1.table}%
+ \let\pgf@plottablefile=\pgfretval
+ \let\pgf@plottablefile@quoted=\pgfretvalquoted
+ % Check, whether it is up-to-date
+ \openin\pgfutil@inputcheck=\pgf@plotgnuplotfile\relax
+ \ifeof\pgfutil@inputcheck%
+ \else%
+ \pgfutil@read\pgfutil@inputcheck to\pgf@temp% ignored
+ \pgfutil@read\pgfutil@inputcheck to\pgf@plot@line%
+ \closein\pgfutil@inputcheck
+ \edef\pgf@plot@code{#2\space}%
+ \ifx\pgf@plot@code\pgf@plot@line%
+ \openin\pgfutil@inputcheck=\pgfretval\relax
+ \ifeof\pgfutil@inputcheck%
+ \else%
+ \closein\pgfutil@inputcheck
+ \pgf@resample@plotfalse%
+ \fi%
+ \fi%
+ \fi
+ \ifpgf@resample@plot%
+ \immediate\openout\pgf@plotwrite=\pgf@plotgnuplotfile\relax
+ \immediate\pgfutil@write\pgf@plotwrite{\pgf@gnuplot@head}%
+ \immediate\pgfutil@write\pgf@plotwrite{#2}%
+ \immediate\closeout\pgf@plotwrite%
+ \pgfutil@shellescape{%
+ \pgfkeysvalueof{/pgf/plot/gnuplot call} \pgf@plotgnuplotfile}%
+ \fi%
+% \let\pgf@savedparsexyline=\pgf@parsexyline%
+% \let\pgf@parsexyline=\pgf@parsegnuplotxyline%
+ \pgfplotxyfile{\pgf@plottablefile}%
+% \let\pgf@parsexyline=\pgf@savedparsexyline%
+}
+
+\pgfutil@IfUndefined{pgfutil@shellescape}{%
+ \def\pgfutil@shellescape{\pgfplots@shellescape}%
+ \let\pgf@plotgnuplot=\pgf@plotgnuplot@luatex@eight@seven
+}{%
+ % ok, plot function is up-to-date
+}%
+
\endinput