[luatex] LuaLaTeX and tex.sprint

Troy Henderson thenders at gmail.com
Wed Apr 20 14:06:35 CEST 2016


I'm trying to get \directlua to create a \begin{enumerate} \item ...
\end{enumerate} in my document, and I'm having trouble with tex.sprint.
Here are 3 tex.sprint commands with their corresponding outputs.
---
\directlua{tex.sprint("foo")}

foo
---
\directlua{tex.sprint("\luatexluaescapestring{\TeX}")}

TeXm (i.e., the TeX logo followed by the character "m" for some reason)
---
\directlua{tex.sprint("\luatexluaescapestring{\begin{enumerate} \item foo
\end{enumerate}}")}

! Undefined control sequence.
\GenericError  ...
                                                    #4  \errhelp \@err@
...
l.5 ...int("\luatexluaescapestring{\begin{enumerate}
                                                   \item foo
\end{enumerate}...
---

I would appreciate any help getting LuaLaTeX to create an enumerate
enviornment and fill the \item's.

Thanks in advance,

Troy Henderson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/luatex/attachments/20160420/74e98dbd/attachment.html>


More information about the luatex mailing list