[luatex] questions about the "reader" in open_read_file callback

Taco Hoekwater taco at elvenkind.com
Wed Nov 17 10:38:27 CET 2010

On 11/16/2010 06:06 PM, Manuel Pégourié-Gonnard wrote:
> Le 16/11/2010 15:48, Ulrike Fischer a écrit :
>> 1. Does that mean that each file has its own "reader" instance? Or
>> is there some scoping involved?
> Each file *has* to have its own reader, since the reader needs to keep track of,
> eg, the current line of the file.


>> 2. Currently my code affects only files input later. How could I
>> change the processing of (only) the main document?
> I'm under the impression the only way to specify a reader for the main file is
> to install a function in the open_read_file callback before the main file is
> opened, which may be tricky.

Yes, it is a little tricky to set this up properly: you need to define
the callbacks in the lua startup script.

Best wishes,

More information about the luatex mailing list