<div dir="ltr"><div><div>Hi everyone,<br><br></div>Sorry for the title of this mail, it is hard to find a good enough one :).<br></div>So I have a file test.lua containing <br>-----------------<br>function testMP2()<br>tex.sprint("\\begin{mplibcode}beginfig(0);")<br>tex.sprint("draw(0,0)--(2cm,2cm);endfig;\\end{mplibcode}")<br>end<br><br>function testMP()<br>tex.sprint("\\begin{mplibcode}beginfig(0);draw(0,0)--(2cm,2cm);endfig;\\end{mplibcode}")<br>end<br clear="all"><div><div><div>-----------------<br><br></div><div>and my test.tex file such as <br><br></div><div>-----------------<br>\documentclass[a4paper]{article}<br>\usepackage{luamplib}<br><br>\directlua{<br>    dofile("test.lua")<br>}<br><br>\begin{document}<br><br>\directlua{<br>    testMP()<br>}<br>\end{document}<br>-----------------<br><br></div><div>Everything is all right if I use the testMP() function, but if I use the testMP2() one I get <br></div><div><br>Runaway argument?<br> \end {document} <br>! File ended while scanning use of \mplibdoreplacenewlinebr.<br><br></div><div>There is something wrong with the \mplibdoreplacenewlinebr macro in the package luamplib, but I don't know what. Do you have any clue ?<br><br></div><div>I am using : LuaTeX, Version 0.95.0 (TeX Live 2016)<br><br></div><div>Thanks !<br></div><div><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Maxime Chupin<br>Site personnel : <a href="http://fougeriens.org/%7Emc/" target="_blank">http://fougeriens.org/~mc/</a><br>Site professionnel : <a href="http://www.ceremade.dauphine.fr/%7Echupin/" target="_blank">https://www.ceremade.dauphine.fr/~chupin/</a><br></div><div>adresse libre : <a href="mailto:chupin@fougeriens.org" target="_blank">chupin@fougeriens.org</a></div></div></div></div></div>
</div></div></div></div>