[Dev-luatex] process_input_buffer-callback and tex.sprint

Jonathan Sauer Jonathan.Sauer at silverstroke.com
Tue May 6 10:04:13 CEST 2008


take the following PlainTeX file:


	callback.register("process_input_buffer", function(line)
		callback.register("process_input_buffer", nil)
		tex.sprint(" world!")
		return line



Using the svn trunk as of friday afternoon, this results in a PDF file
containing the world "Hello". " world!" is missing for some reason.
There is no warning in the log file.

Does tex.sprint not work in a callback (or at least in the
"process_input_buffer" callback)? Is this the same limitation as noted
in the manual:

	tex.print() and tex.sprint() do not work if \directlua is used
	an otp file (in the output of an expression rule)

(Above example is actually slightly less contrived than it seems,
because when using tex.sprint, it is possible to specify a catcode
table, whereas the callback cannot influence the catcodes of the
returned line in any way.)


More information about the dev-luatex mailing list