Thank you. It works just fine now !

2016-11-19 23:30 GMT+01:00 David Carlisle <[email protected]>:

> mplibcode needs to read the body of the environment with special
> catcodes in force, if you tex.sprint
> the body of the environment then by default the catcodes will be wrong.
>
> You could work out exactly what catcodes are needed, set up a lua
> catcode table and pass the number of that catcode table as the first
> optional argument to tex.sprint, but it is easier to let the tex side
> handle that and just concatenate the strings and pass them back as a
> single tex.sprint call,
>
> function testMP3()
> tex.sprint("\\begin{mplibcode}beginfig(0);"
> ..
> "draw(0,0)--(2cm,2cm);endfig;\\end{mplibcode}")
> end
>
> David
>
>


-- 
Maxime Chupin
Site personnel : http://fougeriens.org/~mc/
Site professionnel : http://www.ljll.math.upmc.fr/~chupin/
<http://mc.notezik.com>

Reply via email to