[luatex] \input from Lua.

Taco Hoekwater taco at elvenkind.com
Sun Jan 30 09:20:32 CET 2011


On 01/29/2011 11:45 AM, Paul Isambert wrote:
> Hello all,
>
> Is there a way to make TeX read a file from the Lua interface? The best
> I can do is to issue:
>
> tex.print("\\input{" .. file .. "}")
>
> or something similar. But that is most inconvenient, and anyway it
> doesn't work in an initialization script. (What I do in such a script is
> register a function in "process_input_buffer" that returns the first
> line prefixed with the desired \input statements, and then unregisters
> itself at once. But that's horrible, it looks like a dirty trick!)

Agreed, but currently there is no way to input a TeX file from lua.
(if there was, its internals would be a lot like your tex.print
statement above).

Best wishes,
Taco


More information about the luatex mailing list