Dear Mikael, An example from PGFPlots Gallery. Please try if it works. Here on windows, it seems to work. Attached files are tt.log.txt and tt.pdf. Best, Akira % % tt.tex: from PGFPlots Gallery % \setupcolors[state=start] \usemodule[tikz] \usemodule[pgfplots] \starttext \midaligned{% \starttikzpicture \startaxis[ xmin=-3, xmax=3, ymin=-3, ymax=3, extra x ticks={-1,1}, extra y ticks={-2,2}, extra tick style={grid=major}, ] \draw[red] \pgfextra{ \pgfpathellipse{\pgfplotspointaxisxy{0}{0}} {\pgfplotspointaxisdirectionxy{1}{0}} {\pgfplotspointaxisdirectionxy{0}{2}} % see also the documentation of % 'axis direction cs' which % allows a simpler way to draw this ellipse }; \draw[blue] \pgfextra{ \pgfpathellipse{\pgfplotspointaxisxy{0}{0}} {\pgfplotspointaxisdirectionxy{1}{1}} {\pgfplotspointaxisdirectionxy{0}{2}} }; \addplot [only marks,mark=*] coordinates { (0,0) }; \stopaxis \stoptikzpicture } \stoptext
On Wed, Nov 5, 2014 at 8:42 AM, Akira Kakuto
Dear Mikael,
An example from PGFPlots Gallery. Please try if it works. Here on windows, it seems to work. Attached files are tt.log.txt and tt.pdf.
Best, Akira
% % tt.tex: from PGFPlots Gallery % \setupcolors[state=start] \usemodule[tikz] \usemodule[pgfplots]
\starttext
\midaligned{% \starttikzpicture \startaxis[ xmin=-3, xmax=3, ymin=-3, ymax=3, extra x ticks={-1,1}, extra y ticks={-2,2}, extra tick style={grid=major}, ] \draw[red] \pgfextra{ \pgfpathellipse{\pgfplotspointaxisxy{0}{0}} {\pgfplotspointaxisdirectionxy{1}{0}} {\pgfplotspointaxisdirectionxy{0}{2}} % see also the documentation of % 'axis direction cs' which % allows a simpler way to draw this ellipse }; \draw[blue] \pgfextra{ \pgfpathellipse{\pgfplotspointaxisxy{0}{0}} {\pgfplotspointaxisdirectionxy{1}{1}} {\pgfplotspointaxisdirectionxy{0}{2}} }; \addplot [only marks,mark=*] coordinates { (0,0) }; \stopaxis \stoptikzpicture }
\stoptext
it's ok with TL 2014 (and the latest luatex from experimental), that has \def\pgfversion{3.0.0} and it should be the http://sourceforge.net/projects/pgf/ but downloading the pgf module from the garden lua error > error on line 75 in file /opt/luatex/standalone-mkiv-new-I/tex/texmf/tex/generic/pgf/libraries/luamath/pgflibraryluamath.code.tex: ...iv-new-I/tex/texmf-context/tex/context/base/util-lib.lua:246: module 'pgfluamath.functions' not found: no field package.preload['pgfluamath.functions'] no file '/usr/local/share/lua/5.2/pgfluamath/functions.lua' no file '/usr/local/share/lua/5.2/pgfluamath/functions/init.lua' no file '/usr/local/lib/lua/5.2/pgfluamath/functions.lua' no file '/usr/local/lib/lua/5.2/pgfluamath/functions/init.lua' no file './pgfluamath/functions.lua' no file '/usr/local/lib/lua/5.2/pgfluamath/functions.so' no file '/usr/local/lib/lua/5.2/loadall.so' no file './pgfluamath/functions.so' no file '/usr/local/lib/lua/5.2/pgfluamath.so' no file '/usr/local/lib/lua/5.2/loadall.so' no file './pgfluamath.so' stack traceback: [C]: in function 'savedrequire' ...iv-new-I/tex/texmf-context/tex/context/base/util-lib.lua:246: in function 'require' [\directlua]:1: in main chunk 65 \let\pgfutil@directlua\directlua 66 \pgfutil@directlua{% 67 tex.enableprimitives('pgfutil@',{'luaescapestring'})} 68 \else 69 \def\pgfutil@directlua#1{} 70 \def\pgfutil@luaescapestring#1{} 71 \fi 72 73 \pgfutil@directlua{% 74 pgfluamathfunctions = require("pgfluamath.functions") 75 >> pgfluamathparser = require("pgfluamath.parser")} 76 77 78 % Patch some configuration macros such that the modifications are 79 % available in LUA as well: 80 \pgfkeys{ 81 /pgf/trig format/deg/.add code={}{\directlua{pgfluamathfunctions.setTrigFormat("deg")}\aftergroup\pgfmath@settrigformat }, 82 /pgf/trig format/rad/.add code={}{\directlua{pgfluamathfunctions.setTrigFormat("rad")}\aftergroup\pgfmath@settrigformat }, 83 } 84 % ... and reactivate the key: 85 \pgfmathiftrigonometricusesdeg{% and \def\pgfversion{3.0.0-cvs} So it seems that the cvs version is not ok with ctx and I think that these 74 pgfluamathfunctions = require("pgfluamath.functions") 75 >> pgfluamathparser = require("pgfluamath.parser")} are also wrong in Lua . -- luigi
On Wed, Nov 5, 2014 at 8:42 AM, Akira Kakuto
Dear Mikael,
An example from PGFPlots Gallery. Please try if it works. Here on windows, it seems to work. Attached files are tt.log.txt and tt.pdf.
Best, Akira
Dear Akira, since loading the package generates the error, this example does not work either. I guess (hope) that the clash in version or what it is will be resolved soon. /Mikael
On 11/5/2014 10:28 AM, Mikael P. Sundqvist wrote:
On Wed, Nov 5, 2014 at 8:42 AM, Akira Kakuto
wrote: Dear Mikael,
An example from PGFPlots Gallery. Please try if it works. Here on windows, it seems to work. Attached files are tt.log.txt and tt.pdf.
Best, Akira
Dear Akira,
since loading the package generates the error, this example does not work either. I guess (hope) that the clash in version or what it is will be resolved soon.
the pgf file structure is just wrong, if you run this you can see where is searched: \starttext \startluacode package.helpers.trace = true io.savedata("foo.bar.lua",[[print("hello")]]) require ("foo.bar") \stopluacode \stoptext so, if you want to require("foo.bar.whatever" it should be e.g.: tex/generic/foo/bar/whatever.lua when kpse is plugged into the package loader it might find foo.bar.whatever.lua but context is not going to support that lookup; in that case dofile(resolvers.findfile("foo.bar.whatever.lua")) has to be used. Also keep in mind that dot separated filenames can conflict with module initialization functions (e.g. when you have foo.core.lua it would load foo and initialize using the core function in it). The require functionality is already messy enough and adding all kind of catches to it would make it worse. (Context already has an extended and quite extensive loader, including versions external libraries and so but that's another story.) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (4)
-
Akira Kakuto
-
Hans Hagen
-
luigi scarso
-
Mikael P. Sundqvist