[luatex] TeX-Lua interaction

Paul Isambert zappathustra at free.fr
Tue Sep 11 23:52:09 CEST 2012


Ralf Meyer <rameyer at uni-math.gwdg.de> a écrit:
> 
> I am using LuaTeX to write a couple of letters to several people whose
> addressses I have in a csv file, which I process using Lua.  The way I
> do this, all the work is done in lua.  The LaTeX file just loads a
> couple of packages and then use dofile to let Lua take over.  In
> particular, the text of the letters is contained in the Lua file and
> only given back to TeX through tex.print.  This works, but is somewhat
> inconvenient because of the need to double backslashes, etc.
> 
> I am wondering whether this is the best way to do this.  Is there a way
> to write, say, a for-loop in TeX that runs over a Lua variable?  In my
> case, the letters have identical text and only differ in the address field.

Not so sure I understand you correctly, but at least for backslashes you
can denote strings with [[string]] instead of "string".

Best,
Paul



More information about the luatex mailing list