I have a Lua script that produces a Lua string like this:

    str = [[
1. First line.
2. Second line.
]]

I wish to achieve the effect that

\begin{verbatim}
1. First line.
2. Second line.
\end{verbatim}

would have produced. My attempt has been to make the module
produce

    vstr = [[
\begin{verbatim}
1. First line.
2. Second line.
\end{verbatim}
]]

and code `\directlua{tex.print(vstr)}`. But the end-of-line is not respected.

I can't find the string `verbatim` in the LuaTeX manual. Under what word
should I search for a trick that can achieve what I need?

Reply via email to