I have got a strange behaviour. In a lua program, I use CRs to make it more readable. When I execute my lua program with ZeroBrane and copy the result in LuaLaTeX, it works well. When I use \luaexec{my program} directly in LuaLaTeX, it doesn't work. When I get rid of all the CRs within the tkz commands, then it works.
Is there a substitue of CRs to have the change of line available in the lua program and yet the program can be used directly within LuaLaTeX ?
\documentclass{article} \usepackage{tikz} \usepackage{luacode} \begin{luacode*} function MNotWE() local res = [[ \begin{tikzpicture}[fill=blue!20] \path (.2,.8) node {Hello} (.2,.4) node {World}; \end{tikzpicture} ]] return res end function MWE() local res = [[ \begin{tikzpicture}[fill=blue!20] \path (.2,.8) node {Hello} (.2,.4) node {World}; \end{tikzpicture}]] return res end \end{luacode*} \begin{document} \directlua{tex.print(MWE())} %\directlua{tex.print(MNotWE())} % <-- UNCOMMENT TO SEE THE PROBLEM. \end{document} First program doesn't work whereas the second does.
