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

Manuel Pégourié-Gonnard mpg at elzevir.fr
Tue Nov 16 18:06:26 CET 2010

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.

You could use process_input_buffer to transcode the individual lines of the main
file (as luainputenc does), but it doesn't have the nice feature of being


More information about the luatex mailing list