[luatex] luamplib and Paragraph ended before \mplibdoreplacenewlinebr was complete.

Maxime Chupin mc at melusine.eu.org
Sat Nov 19 23:48:26 CET 2016

Thank you. It works just fine now !

2016-11-19 23:30 GMT+01:00 David Carlisle <d.p.carlisle at gmail.com>:

> 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/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/luatex/attachments/20161119/49eda46b/attachment-0001.html>

More information about the luatex mailing list