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