[luatex] File I/O.

luigi scarso luigi.scarso at gmail.com
Fri Jul 30 22:42:51 CEST 2010


On Fri, Jul 30, 2010 at 10:36 PM, Paul Isambert <zappathustra at free.fr> wrote:
> Hello all,
>
> I'm sure I must have missed something in the manual. I'm totally unable to find
> a way to say something like \write5{whatever} in a lua way. The texio.write
> function writes only to the terminal or log, and my attempts at hooking lua
> functions such as <file>:write() with <file> defined in a find_write_file
> callback are unsuccessful, since it works iff I don't also write to the file
> with TeX's \write.
>
> So, to produce an intelligible question: how do you write to an external file
> with in \directlua, or what is the lua equivalent of \write?
Perhaps
fd = io.open("mfyfile","wb")
fd:write(values)
fd:close()

?

-- 
luigi


More information about the luatex mailing list