From 26d429cb927bc39e85321f20763e9ffcdefdcdcf Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 3 May 2015 21:21:13 +0000 Subject: pgfplots (3may15) git-svn-id: svn://tug.org/texlive/trunk@37169 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/generic/pgfplots/README | 5 ++ .../doc/latex/pgfplots/TeX-programming-notes.pdf | Bin 371434 -> 371435 bytes .../doc/latex/pgfplots/pgfplots.doc.src.tar.bz2 | Bin 1787667 -> 1791186 bytes Master/texmf-dist/doc/latex/pgfplots/pgfplots.pdf | Bin 10451047 -> 10449154 bytes .../doc/latex/pgfplots/pgfplotstable.pdf | Bin 705166 -> 704926 bytes .../texmf-dist/doc/latex/pgfplots/pgfplotstodo.pdf | Bin 403665 -> 410247 bytes .../third/pgfplots/pgfplotstests.context.tar.bz2 | Bin 30853 -> 30866 bytes .../source/latex/pgfplots/pgfplotstests.tar.bz2 | Bin 1374651 -> 1374436 bytes .../libs/tikzlibrarypgfplots.statistics.code.tex | 4 +- .../tex/generic/pgfplots/pgfplots.code.tex | 15 ++-- .../tex/generic/pgfplots/pgfplots.revision.tex | 8 +- .../pgfplots/pgfplotscoordprocessing.code.tex | 52 +++++++----- .../tex/generic/pgfplots/pgfplotscore.code.tex | 88 ++++++++++++++++----- .../generic/pgfplots/util/pgfplotsbinary.code.tex | 2 +- .../pgfplots/util/pgfplotscolormap.code.tex | 4 +- .../generic/pgfplots/util/pgfplotsutil.code.tex | 32 -------- 16 files changed, 124 insertions(+), 86 deletions(-) diff --git a/Master/texmf-dist/doc/generic/pgfplots/README b/Master/texmf-dist/doc/generic/pgfplots/README index ac023d64411..c80c59d88db 100644 --- a/Master/texmf-dist/doc/generic/pgfplots/README +++ b/Master/texmf-dist/doc/generic/pgfplots/README @@ -41,6 +41,11 @@ along with this program. If not, see . HISTORY: +1.12.1: minor bugfix release +- fixed bug: incompatibility of 1.12 with unicode-math +- fixed bug: lua backend failed to work with table input and dependency on \coordindex +- fixed bug: lua backend failed with 'forget plot' + 1.12: scalability + performance - scalability: reduced TeX memory consumption for huge inline tables - scalability: lualatex allows bigger 3d graphics diff --git a/Master/texmf-dist/doc/latex/pgfplots/TeX-programming-notes.pdf b/Master/texmf-dist/doc/latex/pgfplots/TeX-programming-notes.pdf index 5d4e91d251d..c7e578dde5b 100644 Binary files a/Master/texmf-dist/doc/latex/pgfplots/TeX-programming-notes.pdf and b/Master/texmf-dist/doc/latex/pgfplots/TeX-programming-notes.pdf differ diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.doc.src.tar.bz2 b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.doc.src.tar.bz2 index 7cf1ee93af6..846b6de22ca 100644 Binary files a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.doc.src.tar.bz2 and b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.doc.src.tar.bz2 differ diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.pdf b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.pdf index b6bed36c3fd..8494981041e 100644 Binary files a/Master/texmf-dist/doc/latex/pgfplots/pgfplots.pdf and b/Master/texmf-dist/doc/latex/pgfplots/pgfplots.pdf differ diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.pdf b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.pdf index b23c7e2d74c..732f8df680d 100644 Binary files a/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.pdf and b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.pdf differ diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfplotstodo.pdf b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstodo.pdf index fdf88fd8810..1c6018421bf 100644 Binary files a/Master/texmf-dist/doc/latex/pgfplots/pgfplotstodo.pdf and b/Master/texmf-dist/doc/latex/pgfplots/pgfplotstodo.pdf differ diff --git a/Master/texmf-dist/source/context/third/pgfplots/pgfplotstests.context.tar.bz2 b/Master/texmf-dist/source/context/third/pgfplots/pgfplotstests.context.tar.bz2 index e0d3cd38d5b..a33e9e31329 100644 Binary files a/Master/texmf-dist/source/context/third/pgfplots/pgfplotstests.context.tar.bz2 and b/Master/texmf-dist/source/context/third/pgfplots/pgfplotstests.context.tar.bz2 differ diff --git a/Master/texmf-dist/source/latex/pgfplots/pgfplotstests.tar.bz2 b/Master/texmf-dist/source/latex/pgfplots/pgfplotstests.tar.bz2 index bc2fba1a454..23ce7d57676 100644 Binary files a/Master/texmf-dist/source/latex/pgfplots/pgfplotstests.tar.bz2 and b/Master/texmf-dist/source/latex/pgfplots/pgfplotstests.tar.bz2 differ diff --git a/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.statistics.code.tex b/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.statistics.code.tex index 7fbf4f5ea44..6b05a8a9a69 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.statistics.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.statistics.code.tex @@ -24,7 +24,7 @@ \newif\ifpgfplotsplothandlerboxplot@variable@width \ifpgfplots@LUA@supported - \directlua{require("pgfplots.statistics")}% + \pgfplotsutil@directlua{require("pgfplots.statistics")}% \fi \newif\ifpgfplots@boxplot@ensure@plot@mark @@ -721,7 +721,7 @@ }% \def\pgfplotsplothandlerboxplot@LUA@survey@point{% - \directlua{pgfplots.texBoxPlotSurveyPoint("\pgfplots@current@point@data")}% + \pgfplotsutil@directlua{pgfplots.texBoxPlotSurveyPoint("\pgfplots@current@point@data")}% }% \def\pgfplotsplothandlersurveypoint@boxplot@{% \pgfplotsutil@advancestringcounter\c@pgfplotsplothandlerboxplot@num diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex index d088694c992..baad7fe4c4e 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex @@ -604,7 +604,9 @@ /pgfplots/lua backend/.is if=pgfplots@LUA@backend@supported, /pgfplots/lua backend/.default=true, % - /pgfplots/lua debug/.is choice, + /pgfplots/lua debug/.code={% + \pgfqkeys{/pgfplots/lua debug}{#1}% + }, /pgfplots/lua debug/false/.style={/pgfplots/lua debug/off},% /pgfplots/lua debug/off/.code={% \def\pgfplots@LUA@backend@debugmode{off}% @@ -625,6 +627,9 @@ \def\pgfplots@LUA@loglevel@info{4}% \pgfplots@LUA@fail@on@TeX@fallbackfalse }, + /pgfplots/lua debug/trace/.code={% + \let\pgfplotsutil@directlua=\pgfplotsutil@directlua@trace + },% /pgfplots/lua debug/compileerror/.code={% \def\pgfplots@LUA@backend@debugmode{compileerror}% \def\pgfplots@LUA@loglevel@debug{4}% @@ -10428,7 +10433,7 @@ % \ifpgfplots@LUA@backend@supported \pgfplots@log{\pgfplots@LUA@loglevel@debug}{lua backend=true: Activating LUA backend for axis.}% - \directlua{% + \pgfplotsutil@directlua{% pgfplots.gca = pgfplots.Axis.new(); pgfplots.gca.is3d = \pgfplots@boolval{pgfplots@threedim}; pgfplots.gca.clipLimits = \pgfplots@boolval{pgfplots@clip@limits}; @@ -10979,12 +10984,12 @@ \fi }% %\message{Executing \pgfplots@loc@TMPa}% - \directlua{\pgfplots@loc@TMPa} + \pgfplotsutil@directlua{\pgfplots@loc@TMPa} }% \def\pgfplots@LUA@cleanup{% \ifpgfplots@LUA@backend@supported - \directlua{pgfplots.gca=nil}% + \pgfplotsutil@directlua{pgfplots.gca=nil}% \fi }% @@ -11290,7 +11295,7 @@ \def\pgfplots@checkunit@fpu#1{% \ifpgfplots@usefpu \begingroup - \pgfkeys{/pgf/fpu}% + \pgfkeys{/pgf/fpu, /pgf/fpu/output format/float}% \tikz@checkunit@orig{#1}% \pgfmathfloattofixed{\pgfmathresult}% \xdef\pgfplots@glob@TMPd{% diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplots.revision.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplots.revision.tex index 2a0e8cac3bd..d716cdcdf07 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/pgfplots.revision.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplots.revision.tex @@ -5,10 +5,10 @@ \catcode`\:=12 \catcode`\+=12 \catcode`\-=12 -\gdef\pgfplotsrevision{1.12} -\gdef\pgfplotsversion{1.12} -\gdef\pgfplotsversiondatetime{2015-01-31 10:35:56 +0100} -\gdef\pgfplotsrevisiondatetime{2015-01-31 10:35:56 +0100} +\gdef\pgfplotsrevision{1.12.1} +\gdef\pgfplotsversion{1.12.1} +\gdef\pgfplotsversiondatetime{2015-05-02 21:30:45 +0200} +\gdef\pgfplotsrevisiondatetime{2015-05-02 21:30:45 +0200} \gdef\pgfplots@glob@TMPa#1-#2-#3 #4\relax{#1/#2/#3} \xdef\pgfplotsversiondate{\expandafter\pgfplots@glob@TMPa\pgfplotsversiondatetime\relax} \xdef\pgfplotsrevisiondate{\expandafter\pgfplots@glob@TMPa\pgfplotsrevisiondatetime\relax} diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex index d370f845a70..eecf176414f 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex @@ -2332,7 +2332,9 @@ parsenumber=\pgfmathfloatparsenumber{#1}, parse={% \begingroup - \pgfkeys{/pgf/fpu}% + \pgfkeys{/pgf/fpu,% + /pgf/fpu/output format=float,% + }% \edef\pgfmathresult{#1}% \expandafter\pgfmathparse\expandafter{\pgfmathresult}% \pgfmath@smuggleone\pgfmathresult @@ -3464,6 +3466,7 @@ % Did we prepare the data within LUA? remember that! \ifpgfplots@LUA@backend@supported \noexpand\pgfplots@LUA@backend@supportedtrue + \pgfplots@LUA@backend@serialized@commands \else \noexpand\pgfplots@LUA@backend@supportedfalse \fi @@ -3641,10 +3644,11 @@ \fi % \ifpgfplots@LUA@backend@supported + \edef\pgfplots@LUA@backend@plotnum{\pgfutil@directlua{tex.sprint(\pgfplotsHASH pgfplots.gca.plothandlers)}}% \begingroup \pgfkeysgetvalue{/pgfplots/point meta min}\pgfplots@loc@metamin \pgfkeysgetvalue{/pgfplots/point meta max}\pgfplots@loc@metamax - \pgfplots@log{\pgfplots@LUA@loglevel@debug}{lua backend=true: Activating LUA backend for plot \the\pgfplots@numplots\space (type '\pgfplotsplothandlername').}% + \pgfplots@log{\pgfplots@LUA@loglevel@debug}{lua backend=true: Activating LUA backend for plot \the\pgfplots@numplots\space (lua \pgfplots@LUA@backend@plotnum, type '\pgfplotsplothandlername').}% \edef\pgfplots@loc@TMPa{% local gca = pgfplots.gca;^^J% gca.min = {^^J% @@ -3677,24 +3681,30 @@ "\pgfplots@loc@filter@x",^^J% "\pgfplots@loc@filter@y",^^J% "\pgfplots@loc@filter@z"};^^J% - gca.plothandlers[\the\pgfplots@numplots+1] = plothandler;^^J% + gca.plothandlers[\pgfplots@LUA@backend@plotnum+1]= plothandler;^^J% gca.currentPlotHandler = plothandler;^^J% plothandler:surveystart();^^J% }% %\message{Executing ^^J\pgfplots@loc@TMPa^^J^^J}% - \directlua{\pgfplots@loc@TMPa}% + \pgfplotsutil@directlua{\pgfplots@loc@TMPa}% \endgroup + \def\pgfplots@LUA@backend@serialized@commands{% + \noexpand\def\noexpand\pgfplots@LUA@backend@plotnum{\pgfplots@LUA@backend@plotnum}% + }% \fi \fi }% \def\pgfplots@LUA@survey@point{% - \directlua{pgfplots.texSurveyPoint("\pgfplots@current@point@x","\pgfplots@current@point@y","\pgfplots@current@point@z","\pgfplots@current@point@meta")}% + \edef\pgfplots@loc@TMPa{pgfplots.texSurveyPoint("\pgfplots@current@point@x","\pgfplots@current@point@y","\pgfplots@current@point@z","\pgfplots@current@point@meta")}% + \pgfplotsutil@directlua{\pgfplots@loc@TMPa}% + % increase \pgfplots@current@point@coordindex: + \advance\c@pgfplots@coordindex by1 }% \def\pgfplots@LUA@survey@end{% % LUA defines a couple of TeX macros here... - \directlua{pgfplots.texSurveyEnd()}% + \pgfplotsutil@directlua{pgfplots.texSurveyEnd()}% % \pgfplotsapplistXXpushback{--- acquire from LUA! --}% }% @@ -3723,12 +3733,12 @@ % FIXME : what about \pgfplots@LUA@backend@failed in this context!? \pgfplots@log{\pgfplots@LUA@loglevel@info}{Using 'lua backend=false' for visualization of plot \the\pgfplots@numplots\space (type '\pgfplotsplothandlername'): it has no LUA visualizer.}% \expandafter\def\expandafter\pgfplots@stored@current@data\expandafter{% - \directlua{pgfplots.texGetSurveyedCoordsToPgfplots()}% + \pgfplotsutil@directlua{pgfplots.texGetSurveyedCoordsToPgfplots()}% }% \else % visualize using LUA! ... and acquire the coordinates. \expandafter\def\expandafter\pgfplots@stored@current@data\expandafter{% - \directlua{pgfplots.texVisualizePlot(\pgfplotsplothandlerLUAvisualizerfactory)}% + \pgfplotsutil@directlua{pgfplots.texVisualizePlot(\pgfplotsplothandlerLUAvisualizerfactory)}% }% %\message{plot \plotnum: LUA backend returned \pgfplots@stored@current@data^^J}% % @@ -4314,7 +4324,7 @@ \ifpgfplots@LUA@backend@supported \def\pgfplots@perpointmeta@trafo##1{% \edef\pgfmathresult{% - \directlua{% + \pgfplotsutil@directlua{% pgfplots.texPerpointMetaTrafo("\pgfplots@current@point@meta") }% }% @@ -4809,7 +4819,9 @@ % enable FPU after any \pgfplotsset operations. Otherwise things like % linewidth=... which use the math parser might fail. \ifpgfplots@usefpu - \pgfkeys{/pgf/fpu=true}% + \pgfkeys{/pgf/fpu=true,% + /pgf/fpu/output format=float,% + }% \fi % % make sure it is reset, just in case it is not supported by the @@ -5450,7 +5462,7 @@ % - if a plot expression contains directlua -- the expansion will play % funny tricks in this case \xdef\pgfplotsglobalretval{% - \directlua{% + \pgfplotsutil@directlua{% pgfplots.texAddplotExpressionCoordinateGenerator(^^J% \ifpgfplots@curplot@threedim true \else false\fi,^^J% "#1", ^^J% @@ -7041,7 +7053,9 @@ % the key name (example: 'x filter') \def\pgfplots@filter@expression#1{% \begingroup - \pgfkeys{/pgf/fpu=true}% + \pgfkeys{/pgf/fpu=true,% + /pgf/fpu/output format=float,% + }% \pgfkeysgetvalue{/pgfplots/#1/@expressionvalue}\pgfplots@loc@TMPa \pgfmathparse{\pgfplots@loc@TMPa}% \pgfmath@smuggleone\pgfmathresult @@ -7185,10 +7199,10 @@ \def\pgfplots@LUA@visualization@init{% \ifpgfplots@LUA@backend@supported \edef\pgfplots@loc@TMPa{% - \directlua{pgfplots.texVisualizationInit(\plotnum, \ifpgfplots@curplot@threedim true\else false\fi)}% + \pgfplotsutil@directlua{pgfplots.texVisualizationInit(\pgfplots@LUA@backend@plotnum, \ifpgfplots@curplot@threedim true\else false\fi)}% }% \if1\pgfplots@loc@TMPa - \pgfplots@log{\pgfplots@LUA@loglevel@debug}{lua backend=true: Activating partial LUA backend for visualization of plot \plotnum.}% + \pgfplots@log{\pgfplots@LUA@loglevel@debug}{lua backend=true: Activating partial LUA backend for visualization of plot \plotnum\space (lua: \pgfplots@LUA@backend@plotnum).}% \else \pgfplots@LUA@backend@supportedfalse \fi @@ -7530,7 +7544,7 @@ \if1\b@pgfplots@LUA@visualization@enabled \ifx\pgfplots@plot@timer@args\relax \expandafter\gdef\expandafter\pgfplots@plot@timer@args\expandafter{% - \directlua{pgfplots.texGetSurveyedCoordsToPgfplots()}% + \pgfplotsutil@directlua{pgfplots.texGetSurveyedCoordsToPgfplots()}% }% \fi \let\pgfplotsaxisdeserializedatapointfrom@private=\pgfplotsaxisdeserializedatapointfrom@private@nonLUA @@ -8784,7 +8798,7 @@ \or % reverse xy seq: \ifpgfplots@LUA@backend@supported - \directlua{pgfplots.texApplyZBufferReverseStream()}% + \pgfplotsutil@directlua{pgfplots.texApplyZBufferReverseStream()}% \else \begingroup \def\pgfplots@coord@stream@start{% @@ -8807,7 +8821,7 @@ % sort. \if\pgfplots@meshmode n% \ifpgfplots@LUA@backend@supported - \directlua{pgfplots.texApplyZBufferSort()}% + \pgfplotsutil@directlua{pgfplots.texApplyZBufferSort()}% \else \pgfplots@apply@zbuffer@sort@coordinates \fi @@ -8940,7 +8954,7 @@ % \pgfplotsglobalretval contains the partial reversion. \def\pgfplots@apply@zbuffer@reversescanline{% \ifpgfplots@LUA@backend@supported - \directlua{pgfplots.texApplyZBufferReverseScanline(\pgfplotsscanlinelength)}% + \pgfplotsutil@directlua{pgfplots.texApplyZBufferReverseScanline(\pgfplotsscanlinelength)}% \else \begingroup \def\pgfplots@coord@stream@start{% @@ -8981,7 +8995,7 @@ % scanlines occur. \def\pgfplots@apply@zbuffer@reversetransposed{% \ifpgfplots@LUA@backend@supported - \directlua{pgfplots.texApplyZBufferReverseTransposed(\pgfplotsscanlinelength)}% + \pgfplotsutil@directlua{pgfplots.texApplyZBufferReverseTransposed(\pgfplotsscanlinelength)}% \else \begingroup \def\pgfplots@coord@stream@start{% diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplotscore.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplotscore.code.tex index c2ed44a36b7..e446999cb80 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/pgfplotscore.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplotscore.code.tex @@ -38,6 +38,24 @@ } \pgfplotsutil@IfUndefined{pgfutil@IfUndefined}{\let\pgfutil@IfUndefined=\pgfplotsutil@IfUndefined}{} +\def\pgfplotsloglevel{4}% + +\def\pgfplots@log#1#2{% + \ifnum#1>\pgfplotsloglevel\relax + \else + \ifnum\inputlineno=1 + \pgfutil@IfUndefined{@currenvline}{% + \def\pgfplots@log@tmp{}% + }{% + \let\pgfplots@log@tmp=\@currenvline + }% + \else + \def\pgfplots@log@tmp{ on input line \the\inputlineno}% + \fi + \immediate\write-1{Package pgfplots info\pgfplots@log@tmp: #2}% + \fi +}% + \newif\ifpgfplots@LUA@supported \pgfutil@IfUndefined{directlua}{% \pgfplots@LUA@supportedfalse @@ -51,13 +69,58 @@ % use \def\pgfplotsenablelua{0} to switch it off. '1' switches it on % (or uncommenting the line). \pgfutil@IfUndefined{pgfplotsenablelua}{}{% - \def\pgfplots@glob@TMPc{1}% - \ifx\pgfplots@glob@TMPc\pgfplotsenablelua - \else - \pgfplots@LUA@supportedfalse + \ifpgfplots@LUA@supported + \def\pgfplots@glob@TMPc{1}% + \ifx\pgfplots@glob@TMPc\pgfplotsenablelua + \message{Pgfplots: found emergency control flag \string\pgfplotsenablelua=1. Keeping LUA active.^^J}% + \else + \message{Pgfplots: found emergency control flag \string\pgfplotsenablelua!=1. Disabling LUA support.^^J}% + \pgfplots@LUA@supportedfalse + \fi \fi }% +\def\pgfplots@alloc@catcodetable{% + % it is task of the TeX format to load this. + % context comes with it out-of-the box, and pgfplots.sty loads luatexbase.sty + \pgfutil@IfUndefined{newcatcodetable}{% + % Oh. The TeX format does not have support for + % \newcatcodetable and the associated pgfplots module did not + % load an addon-package!? + % + % We _need_ the catcodes which are active when pgfplots starts. + % And there is no central mechanism to allocate catcodes. I will + % take one for me now and hope that it will not be used (soon). + \def\pgfplotsglobalretval{41}% + }{% + % the macro \pgfplots@luabackend@table is never used by TeX + % code. + % I only need the value inside of the .lua files: whenever + % they print something, they need to use it. + \newcatcodetable\pgfplots@luabackend@table + \let\pgfplotsglobalretval=\pgfplots@luabackend@table + }% +}% +\ifpgfplots@LUA@supported + \let\pgfplotsutil@directlua=\directlua + \let\pgfplotsutil@directlua@std=\pgfplotsutil@directlua + \pgfplotsutil@directlua{ + tex.enableprimitives("pgfplotsutil@",{ "savecatcodetable", "luaescapestring"})}% + \def\pgfplotsutil@directlua@trace#1{% + \directlua{% + texio.write_nl("CALLING\string\n\pgfplotsutil@luaescapestring{#1}"); + #1% + }% + }% + \pgfplots@log3{Initializing with LUA version \pgfplotsutil@directlua{tex.print(_VERSION)}}% + \pgfplotsutil@directlua{require("pgfplots"); pgfplots.pgfplotsversion = "\pgfplotsversion";}% + % + \pgfplots@alloc@catcodetable + \c@pgf@counta=\pgfplotsglobalretval + \pgfplotsutil@savecatcodetable\c@pgf@counta + \pgfplotsutil@directlua{pgfplots.LOAD_TIME_CATCODETABLE = \the\c@pgf@counta}% +\fi + \pgfkeys{ /pgfplots/lua support/.is choice, /pgfplots/lua support/true/.code={\pgfplots@LUA@supportedtrue},% @@ -72,23 +135,6 @@ %/pgfplots/lua support/auto,% this is the default anyway } -\def\pgfplotsloglevel{4}% - -\def\pgfplots@log#1#2{% - \ifnum#1>\pgfplotsloglevel\relax - \else - \ifnum\inputlineno=1 - \pgfutil@IfUndefined{@currenvline}{% - \def\pgfplots@log@tmp{}% - }{% - \let\pgfplots@log@tmp=\@currenvline - }% - \else - \def\pgfplots@log@tmp{ on input line \the\inputlineno}% - \fi - \immediate\write-1{Package pgfplots info\pgfplots@log@tmp: #2}% - \fi -}% \def\pgfplots@error#1{\PackageError{pgfplots}{#1}{}}% \def\pgfplotstable@error@pkg#1{\PackageError{pgfplotstable}{#1}{}}% % DO NOT USE THIS METHOD DIRECTLY: use \pgfplotswarning{}\pgfeov diff --git a/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotsbinary.code.tex b/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotsbinary.code.tex index ca2c74c5f58..42c4cb1aae8 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotsbinary.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotsbinary.code.tex @@ -70,7 +70,7 @@ % string.char(1,2,3) which results in a binary string with chars 0x01, 0x02, 0x03 etc. % I only need to get the integer numbers. To this end, I patch \pgfplotscharno % and create the binary string here: - \directlua{% + \pgfplotsutil@directlua{% pgfplotsretval = pgfplotsGetLuaBinaryStringFromCharIndices({#1}); }% }% diff --git a/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotscolormap.code.tex b/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotscolormap.code.tex index ba639531d5a..c80b2c7b848 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotscolormap.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotscolormap.code.tex @@ -349,7 +349,7 @@ \def\pgfplots@colormap@LUA@new#1{% \ifpgfplots@LUA@supported \pgfplotscolormapserializecomponentstomacro{#1}\pgfplots@loc@TMPa - \directlua{% + \pgfplotsutil@directlua{% local colorspace =^^J% pgfplots.\csname pgfpl@cm@#1@colspace\endcsname;^^J% if colorspace then^^J% @@ -624,7 +624,7 @@ \def\pgfplotscolormapfind@precomputed[#1:#2][#3]#4#5{% \ifpgfplots@LUA@supported \edef\pgfmathresult{% - \directlua{% + \pgfplotsutil@directlua{% pgfplots.texColorMapPrecomputed("#5", #1,#2,#4) }% }% diff --git a/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotsutil.code.tex b/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotsutil.code.tex index a84276adbc0..8af2ed312c6 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotsutil.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotsutil.code.tex @@ -2058,38 +2058,6 @@ \gdef\pgfplotsHASH{#}% \catcode`\%=12 \gdef\pgfplotsPERCENT{%}} -\def\pgfplots@alloc@catcodetable{% - % it is task of the TeX format to load this. - % context comes with it out-of-the box, and pgfplots.sty loads luatexbase.sty - \pgfutil@IfUndefined{newcatcodetable}{% - % Oh. The TeX format does not have support for - % \newcatcodetable and the associated pgfplots module did not - % load an addon-package!? - % - % We _need_ the catcodes which are active when pgfplots starts. - % And there is no central mechanism to allocate catcodes. I will - % take one for me now and hope that it will not be used (soon). - \def\pgfplotsglobalretval{41}% - }{% - % the macro \pgfplots@luabackend@table is never used by TeX - % code. - % I only need the value inside of the .lua files: whenever - % they print something, they need to use it. - \newcatcodetable\pgfplots@luabackend@table - \let\pgfplotsglobalretval=\pgfplots@luabackend@table - }% -}% -\pgfutil@IfUndefined{directlua}{}{% - \directlua{tex.enableprimitives("",tex.extraprimitives())}% - \pgfplots@log3{Initializing with LUA version \directlua{tex.print(_VERSION)}}% - \directlua{require("pgfplots"); pgfplots.pgfplotsversion = "\pgfplotsversion";}% - % - \pgfplots@alloc@catcodetable - \c@pgf@counta=\pgfplotsglobalretval - \savecatcodetable\c@pgf@counta - \directlua{pgfplots.LOAD_TIME_CATCODETABLE = \the\c@pgf@counta}% -}% - % swaps the content of two macros \def\pgfplotsutil@swap#1#2{% \let\pgfplotsutil@swap@=#1% -- cgit v1.2.3