Re: [NTG-context] gnuplot module broken with latest 2020-07-13 16:31
Many thanks for the quick fix Hans, I have tried the lmtx inclusions as well, very nice indeed (and added it to the wiki)! Kind Regards, Adam Reviczky On Mon, Jul 13, 2020 at 10:38 PM Hans Hagen wrote: > On 7/13/2020 8:53 PM, Adam Reviczky wrote: > > Hi, > > > > Using the minimal example from the contextgarden for gnuplot > > (https://wiki.contextgarden.net/Gnuplot) I am getting the following > > error message: > > > > This is LuaTeX, Version 1.13.0 (TeX Live 2021/dev/Debian) > > system commands enabled. > > open source > level 1, order 1, name > > '/usr/share/texmf/tex/context/base/mkiv/cont-yes.mkiv' > > system > > > system > ConTeXt ver: 2020.07.13 16:23 MKIV fmt: 2020.7.13 > > int: english/english > > system > > > system > 'cont-new.mkiv' loaded > > open source > level 2, order 2, name > > '/usr/share/texmf/tex/context/base/mkiv/cont-new.mkiv' > > system > beware: some patches loaded from cont-new.mkiv > > close source> level 2, order 2, name > > '/usr/share/texmf/tex/context/base/mkiv/cont-new.mkiv' > > system > files > jobname 'mwe', input './mwe', result 'mwe' > > fonts > latin modern fonts are not preloaded > > languages > language 'en' is active > > open source > level 2, order 3, name '/tmp/4/mwe.tex' > > modules > 'gnuplot' is loaded > > open source > level 3, order 4, name > > '/usr/share/texmf/tex/context/third/gnuplot/t-gnuplot.mkiv' > > loading > Gnuplot module > > open source > level 4, order 5, name > > '/usr/share/texmf/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' > > close source> level 4, order 5, name > > '/usr/share/texmf/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' > > close source> level 3, order 5, name > > '/usr/share/texmf/tex/context/third/gnuplot/t-gnuplot.mkiv' > > > > lua error > lua error on line 4 in file /tmp/4/mwe.tex: > > > > /usr/share/texmf/tex/context/base/mkiv/buff-ini.lua:439: attempt to call > > a nil value (upvalue 'gettoken') > > stack traceback: > > /usr/share/texmf/tex/context/base/mkiv/buff-ini.lua:439: in upvalue > 'pickup' > > /usr/share/texmf/tex/context/base/mkiv/buff-ini.lua:635: in function > > > > (...tail calls...) > > > > 1 \usemodule[gnuplot] > > 2 > > 3 % write a script for gnuplot > > 4 >> \startGNUPLOTscript[sin] > > 5plot sin(x) > > 6 \stopGNUPLOTscript > > 7 > > 8 % include the resulting graphic into the document > > 9 \useGNUPLOTgraphic[sin] > > 10 > > > > mtx-context | fatal error: return code: 256 > > > > Does the gnuplot module need adjustments? > No, i messed up something ... will be fixed tomorrow > > Do you have lmtx installed? It has nicer gnuplot support: > > m-gnuplot-demo.gp : > > > set format xy "$%g$" > > set title 'This is a plot of $y=\\sin(x)$' > set xlabel 'This is the $x$ axis' > set ylabel 'This is the $y$ axis' > > plot [0:6.28] [0:1] sin(x) > > > Can be included with: > > \starttext > > \externalfigure[m-gnuplot-demo.gp][conversion=svg,width=4cm] > > \externalfigure[m-gnuplot-demo.gp][conversion=svg,width=8cm] > > \stoptext > > > - >Hans Hagen | PRAGMA ADE >Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] gnuplot module broken with latest 2020-07-13 16:31
On 7/13/2020 8:53 PM, Adam Reviczky wrote: Hi, Using the minimal example from the contextgarden for gnuplot (https://wiki.contextgarden.net/Gnuplot) I am getting the following error message: This is LuaTeX, Version 1.13.0 (TeX Live 2021/dev/Debian) system commands enabled. open source > level 1, order 1, name '/usr/share/texmf/tex/context/base/mkiv/cont-yes.mkiv' system > system > ConTeXt ver: 2020.07.13 16:23 MKIV fmt: 2020.7.13 int: english/english system > system > 'cont-new.mkiv' loaded open source > level 2, order 2, name '/usr/share/texmf/tex/context/base/mkiv/cont-new.mkiv' system > beware: some patches loaded from cont-new.mkiv close source > level 2, order 2, name '/usr/share/texmf/tex/context/base/mkiv/cont-new.mkiv' system > files > jobname 'mwe', input './mwe', result 'mwe' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > level 2, order 3, name '/tmp/4/mwe.tex' modules > 'gnuplot' is loaded open source > level 3, order 4, name '/usr/share/texmf/tex/context/third/gnuplot/t-gnuplot.mkiv' loading > Gnuplot module open source > level 4, order 5, name '/usr/share/texmf/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source > level 4, order 5, name '/usr/share/texmf/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source > level 3, order 5, name '/usr/share/texmf/tex/context/third/gnuplot/t-gnuplot.mkiv' lua error > lua error on line 4 in file /tmp/4/mwe.tex: /usr/share/texmf/tex/context/base/mkiv/buff-ini.lua:439: attempt to call a nil value (upvalue 'gettoken') stack traceback: /usr/share/texmf/tex/context/base/mkiv/buff-ini.lua:439: in upvalue 'pickup' /usr/share/texmf/tex/context/base/mkiv/buff-ini.lua:635: in function (...tail calls...) 1 \usemodule[gnuplot] 2 3 % write a script for gnuplot 4 >> \startGNUPLOTscript[sin] 5 plot sin(x) 6 \stopGNUPLOTscript 7 8 % include the resulting graphic into the document 9 \useGNUPLOTgraphic[sin] 10 mtx-context | fatal error: return code: 256 Does the gnuplot module need adjustments? No, i messed up something ... will be fixed tomorrow Do you have lmtx installed? It has nicer gnuplot support: m-gnuplot-demo.gp : set format xy "$%g$" set title 'This is a plot of $y=\\sin(x)$' set xlabel 'This is the $x$ axis' set ylabel 'This is the $y$ axis' plot [0:6.28] [0:1] sin(x) Can be included with: \starttext \externalfigure[m-gnuplot-demo.gp][conversion=svg,width=4cm] \externalfigure[m-gnuplot-demo.gp][conversion=svg,width=8cm] \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] gnuplot module broken with latest 2020-07-13 16:31
Hi, Using the minimal example from the contextgarden for gnuplot ( https://wiki.contextgarden.net/Gnuplot) I am getting the following error message: This is LuaTeX, Version 1.13.0 (TeX Live 2021/dev/Debian) system commands enabled. open source > level 1, order 1, name '/usr/share/texmf/tex/context/base/mkiv/cont-yes.mkiv' system > system > ConTeXt ver: 2020.07.13 16:23 MKIV fmt: 2020.7.13 int: english/english system > system > 'cont-new.mkiv' loaded open source > level 2, order 2, name '/usr/share/texmf/tex/context/base/mkiv/cont-new.mkiv' system > beware: some patches loaded from cont-new.mkiv close source> level 2, order 2, name '/usr/share/texmf/tex/context/base/mkiv/cont-new.mkiv' system > files > jobname 'mwe', input './mwe', result 'mwe' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > level 2, order 3, name '/tmp/4/mwe.tex' modules > 'gnuplot' is loaded open source > level 3, order 4, name '/usr/share/texmf/tex/context/third/gnuplot/t-gnuplot.mkiv' loading > Gnuplot module open source > level 4, order 5, name '/usr/share/texmf/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source> level 4, order 5, name '/usr/share/texmf/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source> level 3, order 5, name '/usr/share/texmf/tex/context/third/gnuplot/t-gnuplot.mkiv' lua error > lua error on line 4 in file /tmp/4/mwe.tex: /usr/share/texmf/tex/context/base/mkiv/buff-ini.lua:439: attempt to call a nil value (upvalue 'gettoken') stack traceback: /usr/share/texmf/tex/context/base/mkiv/buff-ini.lua:439: in upvalue 'pickup' /usr/share/texmf/tex/context/base/mkiv/buff-ini.lua:635: in function (...tail calls...) 1 \usemodule[gnuplot] 2 3 % write a script for gnuplot 4 >> \startGNUPLOTscript[sin] 5plot sin(x) 6 \stopGNUPLOTscript 7 8 % include the resulting graphic into the document 9 \useGNUPLOTgraphic[sin] 10 mtx-context | fatal error: return code: 256 Does the gnuplot module need adjustments? Version 2020-07-09 14:50 is fine. Regards, Adam ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] gnuplot-module broken under lmtx
On 4/10/2019 4:34 PM, Christian Prim wrote: Hi It's little off-topic as there are officially no modules included in lmtx. But when I used the modules from a mkiv-installation, there was little to no problem. But with the gnuplot-module I can't fix the error myself. not off-topic .. as modules should also work ok in lmtx fixed in next beta (probably tommorrow an upload) Hans MWE: \usemodule[gnuplot] \startGNUPLOTscript[sin] plot sin(x) \stopGNUPLOTscript \starttext \placefigure[here]{Sine Test}{\useGNUPLOTgraphic[sin]} \stoptext Under mkiv everything is fine. mkiv creates a file gnuplot-gnuplot-1.plt, sends this file to gnuplot and uses the output gnuplot-gnuplot-1-ctx.tex. Under lmtx only the files gnuplot-gnuplot-1.tmp and gnuplot-gnuplot-inclusions.tmp are created. When I copy the correct .plt file from a mkiv-run, no gnuplot-gnuplot-1-ctx.tex is generated. If I copy the correct -ctx.tex file from a mkiv-run, I still get an error. Relevant part from the logfile of a working mkiv-run: modules > 'gnuplot' is loaded open source > level 3, order 4, name '/home/user/context/tex/texmf-modules/tex/context/third/gnuplot/t-gnuplot.mkiv' loading > Gnuplot module open source > level 4, order 5, name '/home/user/context/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source > level 4, order 5, name '/home/user/context/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source > level 3, order 5, name '/home/user/context/tex/texmf-modules/tex/context/third/gnuplot/t-gnuplot.mkiv' fonts > preloading latin modern fonts (second stage) fonts > 'fallback modern-designsize rm 12pt' is loaded open source > level 3, order 6, name 'gnuplot-gnuplot-1-ctx.tex' close source > level 3, order 6, name 'gnuplot-gnuplot-1-ctx.tex' metapost > initializing instance 'metafun:1' using format 'metafun' and method 'default' metapost > loading 'metafun' as '/home/user/context/tex/texmf-context/metapost/context/base/mpiv/metafun.mpiv' using method 'default' metapost > initializing number mode 'scaled' floatblocks > '1' placed (here) from a lmtx-run (no .plt-file and -ctx.tex given): modules > 'gnuplot' is loaded open source > level 3, order 4, name '/home/user/lmtx/tex/texmf-modules/tex/context/third/gnuplot/t-gnuplot.mkiv' loading > Gnuplot module open source > level 4, order 5, name '/home/user/lmtx/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source > level 4, order 5, name '/home/user/lmtx/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source > level 3, order 5, name '/home/user/lmtx/tex/texmf-modules/tex/context/third/gnuplot/t-gnuplot.mkiv' fonts > preloading latin modern fonts (second stage) fonts > 'fallback modern-designsize rm 12pt' is loaded mtxrun | mtxrun | executing: gnuplot gnuplot-gnuplot-1.plt mtxrun | mtxrun | /home/user/lmtx/tex/texmf-linux-64/bin/mtxrun.lua:26166: attempt to call a nil value (field 'exec') aaa > mtxrun --direct gnuplot gnuplot-gnuplot-1.plt floatblocks > no block given floatblocks > '1' placed (here) lmtx with given .plt and -ctx.tex-file: modules > 'gnuplot' is loaded open source > level 3, order 4, name '/home/user/lmtx/tex/texmf-modules/tex/context/third/gnuplot/t-gnuplot.mkiv' loading > Gnuplot module open source > level 4, order 5, name '/home/user/lmtx/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source > level 4, order 5, name '/home/user/lmtx/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source > level 3, order 5, name '/home/user/lmtx/tex/texmf-modules/tex/context/third/gnuplot/t-gnuplot.mkiv' fonts > preloading latin modern fonts (second stage) fonts > 'fallback modern-designsize rm 12pt' is loaded mtxrun | mtxrun | executing: gnuplot gnuplot-gnuplot-1.plt mtxrun | mtxrun | /home/user/lmtx/tex/texmf-linux-64/bin/mtxrun.lua:26166: attempt to call a nil value (field 'exec') aaa > mtxrun --direct gnuplot gnuplot-gnuplot-1.plt open source > level 3, order 6, name 'gnuplot-gnuplot-1-ctx.tex' close source > level 3, order 6, name 'gnuplot-gnuplot-1-ctx.tex' metapost > initializing instance 'metafun:1' using format 'metafun' and method 'default' metapost > loading 'metafun' as '/home/user/lmtx/tex/texmf-context/metapost/context/base/mpiv/metafun.mpiv' using method 'default' metapost > initializing number mode 'scaled' floatblocks > '1' placed (here) tex error > tex error on line 1 in file gnuplot-gnuplot-1-ctx.tex: ! Undefined control sequence \GNUPLOTfile -ctx.tex \fourthoffivearguments #1#2#3#4#5->#4 set output "\@@GNUPLOTresult "
[NTG-context] gnuplot-module broken under lmtx
Hi It's little off-topic as there are officially no modules included in lmtx. But when I used the modules from a mkiv-installation, there was little to no problem. But with the gnuplot-module I can't fix the error myself. MWE: \usemodule[gnuplot] \startGNUPLOTscript[sin] plot sin(x) \stopGNUPLOTscript \starttext \placefigure[here]{Sine Test}{\useGNUPLOTgraphic[sin]} \stoptext Under mkiv everything is fine. mkiv creates a file gnuplot-gnuplot-1.plt, sends this file to gnuplot and uses the output gnuplot-gnuplot-1-ctx.tex. Under lmtx only the files gnuplot-gnuplot-1.tmp and gnuplot-gnuplot-inclusions.tmp are created. When I copy the correct .plt file from a mkiv-run, no gnuplot-gnuplot-1-ctx.tex is generated. If I copy the correct -ctx.tex file from a mkiv-run, I still get an error. Relevant part from the logfile of a working mkiv-run: modules > 'gnuplot' is loaded open source > level 3, order 4, name '/home/user/context/tex/texmf-modules/tex/context/third/gnuplot/t-gnuplot.mkiv' loading > Gnuplot module open source > level 4, order 5, name '/home/user/context/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source> level 4, order 5, name '/home/user/context/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source> level 3, order 5, name '/home/user/context/tex/texmf-modules/tex/context/third/gnuplot/t-gnuplot.mkiv' fonts > preloading latin modern fonts (second stage) fonts > 'fallback modern-designsize rm 12pt' is loaded open source > level 3, order 6, name 'gnuplot-gnuplot-1-ctx.tex' close source> level 3, order 6, name 'gnuplot-gnuplot-1-ctx.tex' metapost> initializing instance 'metafun:1' using format 'metafun' and method 'default' metapost> loading 'metafun' as '/home/user/context/tex/texmf-context/metapost/context/base/mpiv/metafun.mpiv' using method 'default' metapost> initializing number mode 'scaled' floatblocks > '1' placed (here) from a lmtx-run (no .plt-file and -ctx.tex given): modules > 'gnuplot' is loaded open source > level 3, order 4, name '/home/user/lmtx/tex/texmf-modules/tex/context/third/gnuplot/t-gnuplot.mkiv' loading > Gnuplot module open source > level 4, order 5, name '/home/user/lmtx/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source> level 4, order 5, name '/home/user/lmtx/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source> level 3, order 5, name '/home/user/lmtx/tex/texmf-modules/tex/context/third/gnuplot/t-gnuplot.mkiv' fonts > preloading latin modern fonts (second stage) fonts > 'fallback modern-designsize rm 12pt' is loaded mtxrun | mtxrun | executing: gnuplot gnuplot-gnuplot-1.plt mtxrun | mtxrun | /home/user/lmtx/tex/texmf-linux-64/bin/mtxrun.lua:26166: attempt to call a nil value (field 'exec') aaa > mtxrun --direct gnuplot gnuplot-gnuplot-1.plt floatblocks > no block given floatblocks > '1' placed (here) lmtx with given .plt and -ctx.tex-file: modules > 'gnuplot' is loaded open source > level 3, order 4, name '/home/user/lmtx/tex/texmf-modules/tex/context/third/gnuplot/t-gnuplot.mkiv' loading > Gnuplot module open source > level 4, order 5, name '/home/user/lmtx/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source> level 4, order 5, name '/home/user/lmtx/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source> level 3, order 5, name '/home/user/lmtx/tex/texmf-modules/tex/context/third/gnuplot/t-gnuplot.mkiv' fonts > preloading latin modern fonts (second stage) fonts > 'fallback modern-designsize rm 12pt' is loaded mtxrun | mtxrun | executing: gnuplot gnuplot-gnuplot-1.plt mtxrun | mtxrun | /home/user/lmtx/tex/texmf-linux-64/bin/mtxrun.lua:26166: attempt to call a nil value (field 'exec') aaa > mtxrun --direct gnuplot gnuplot-gnuplot-1.plt open source > level 3, order 6, name 'gnuplot-gnuplot-1-ctx.tex' close source> level 3, order 6, name 'gnuplot-gnuplot-1-ctx.tex' metapost> initializing instance 'metafun:1' using format 'metafun' and method 'default' metapost> loading 'metafun' as '/home/user/lmtx/tex/texmf-context/metapost/context/base/mpiv/metafun.mpiv' using method 'default' metapost> initializing number mode 'scaled' floatblocks > '1' placed (here) tex error > tex error on line 1 in file gnuplot-gnuplot-1-ctx.tex: ! Undefined control sequence \GNUPLOTfile -ctx.tex \fourthoffivearguments #1#2#3#4#5->#4 set output "\@@GNUPLOTresult " }\endwrite \shipoutscratchbox \page_shipout_box #1->\clf_shipoutpage #1 \relax \global \setbox #1\emptybox ... ...l.8 \stoptext 1 >> % Written by ConTeXt terminal
Re: [NTG-context] gnuplot module broken
Dear Hans, please consider the following example in MKII: \setupcolors[state=start] \starttext \startMPextensions a := \abc; color b; b := \MPcolor{currentcolor}; \stopMPextensions \startuseMPgraphic{bla} fill fullcircle scaled a withcolor b; \stopuseMPgraphic \def\abc{3cm}\color[blue]{\useMPgraphic{bla}} % Nice small black circle \def\abc{1cm}\useMPgraphic{bla} \stoptext I still don't know how to reproduce this in MKIV. I tried with MPdefinitions as you suggested, but this only works the first time when it is used. The following example creates two equal circles instead of two different ones: \starttext \startMPdefinitions a := \abc; color b; b := \MPcolor{currentcolor}; \stopMPdefinitions \startuseMPgraphic{bla} fill fullcircle scaled a withcolor b; \stopuseMPgraphic \def\abc{3cm}\color[blue]{\useMPgraphic{bla}} % I want a black 1cm circle here \def\abc{1cm}\useMPgraphic{bla} \stoptext Unless MKII is more powerful than MKIV: how can I achieve the same functionality in MKIV as I did in MKII? Thank you, Mojca On Tue, Feb 19, 2013 at 10:36 AM, Hans Hagen wrote: On 2/19/2013 1:37 AM, Mojca Miklavec wrote: On Mon, Feb 18, 2013 at 5:40 PM, Marco Patzer wrote: Hi Mojca et al. todays beta broke the gnuplot module. This is probably due to the changes in the MP inclusion mechanism. \usemodule [gnuplot] \starttext \stoptext Here's an almost minimal example: \def\abc{1cm} \startMPextensions a := \abc; color b; b := \MPcolor{currentcolor}; \stopMPextensions \def\abc{3cm} \starttext \startcolor[blue] \startMPcode fill fullcircle scaled a withcolor b; \stopMPcode \stopcolor \stoptext The old ConTeXt draws a blue circle with diameter 3cm and the new ConTeXt draws a black circle with diameter 1cm. Which one is right? From a recent message by Hans: - add mp functionality (immediate expansion) It seems that ConTeXt now parses everything inside MPextensions earlier than it did before and I don't have the slightest idea how to account for this in the module without a major rewrite. In case that Hans wants to keep the new functionality, I either need [quite some] help with the module or I'll simply stick to TeX Live 2012 for the foreseeable future ;) For the (not texlive) module use: \defineMPinstance[gnuplot] [format=metafun, extensions=yes, initializations=yes, method=double] \startMPdefinitions[gnuplot] ... and then use the gnuplot instance. This not only isolates the code, but also gives you floats. It also means that if someone crashes the gnuplot instance, the rest still keeps running. Definitions are per instance and are delayed i.e. passed via the tex end when they get expanded. The reason for extensions being immediate (at least for now) is that it was more easy to implement as extensions meant for mp extensions and can be for all instances of specific (sets) of instances. Sorry for the changes but as we have multiple instances, scale vs double and maybe more coming it's probably worth the trouble. Hans ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] gnuplot module broken
On 2013–04–19 Mojca Miklavec wrote: Dear Hans, please consider the following example in MKII: \setupcolors[state=start] \starttext \startMPextensions a := \abc; color b; b := \MPcolor{currentcolor}; \stopMPextensions \startuseMPgraphic{bla} fill fullcircle scaled a withcolor b; \stopuseMPgraphic \def\abc{3cm}\color[blue]{\useMPgraphic{bla}} % Nice small black circle \def\abc{1cm}\useMPgraphic{bla} \stoptext I still don't know how to reproduce this in MKIV. Use \startMPinitializations instead of \startMPextensions, it's global to all MP instances, though. Marco signature.asc Description: Digital signature ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] gnuplot module broken
On 2/19/2013 1:37 AM, Mojca Miklavec wrote: On Mon, Feb 18, 2013 at 5:40 PM, Marco Patzer wrote: Hi Mojca et al. todays beta broke the gnuplot module. This is probably due to the changes in the MP inclusion mechanism. \usemodule [gnuplot] \starttext \stoptext Here's an almost minimal example: \def\abc{1cm} \startMPextensions a := \abc; color b; b := \MPcolor{currentcolor}; \stopMPextensions \def\abc{3cm} \starttext \startcolor[blue] \startMPcode fill fullcircle scaled a withcolor b; \stopMPcode \stopcolor \stoptext The old ConTeXt draws a blue circle with diameter 3cm and the new ConTeXt draws a black circle with diameter 1cm. Which one is right? From a recent message by Hans: - add mp functionality (immediate expansion) It seems that ConTeXt now parses everything inside MPextensions earlier than it did before and I don't have the slightest idea how to account for this in the module without a major rewrite. In case that Hans wants to keep the new functionality, I either need [quite some] help with the module or I'll simply stick to TeX Live 2012 for the foreseeable future ;) For the (not texlive) module use: \defineMPinstance[gnuplot] [format=metafun, extensions=yes, initializations=yes, method=double] \startMPdefinitions[gnuplot] ... and then use the gnuplot instance. This not only isolates the code, but also gives you floats. It also means that if someone crashes the gnuplot instance, the rest still keeps running. Definitions are per instance and are delayed i.e. passed via the tex end when they get expanded. The reason for extensions being immediate (at least for now) is that it was more easy to implement as extensions meant for mp extensions and can be for all instances of specific (sets) of instances. Sorry for the changes but as we have multiple instances, scale vs double and maybe more coming it's probably worth the trouble. 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 - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] gnuplot module broken
Hi Mojca et al. todays beta broke the gnuplot module. This is probably due to the changes in the MP inclusion mechanism. \usemodule [gnuplot] \starttext \stoptext Marco signature.asc Description: Digital signature ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] gnuplot module broken
On Mon, Feb 18, 2013 at 5:40 PM, Marco Patzer wrote: Hi Mojca et al. todays beta broke the gnuplot module. This is probably due to the changes in the MP inclusion mechanism. \usemodule [gnuplot] \starttext \stoptext Here's an almost minimal example: \def\abc{1cm} \startMPextensions a := \abc; color b; b := \MPcolor{currentcolor}; \stopMPextensions \def\abc{3cm} \starttext \startcolor[blue] \startMPcode fill fullcircle scaled a withcolor b; \stopMPcode \stopcolor \stoptext The old ConTeXt draws a blue circle with diameter 3cm and the new ConTeXt draws a black circle with diameter 1cm. Which one is right? From a recent message by Hans: - add mp functionality (immediate expansion) It seems that ConTeXt now parses everything inside MPextensions earlier than it did before and I don't have the slightest idea how to account for this in the module without a major rewrite. In case that Hans wants to keep the new functionality, I either need [quite some] help with the module or I'll simply stick to TeX Live 2012 for the foreseeable future ;) Mojca ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___