[Dev-luatex] [lltx] The explanation of \directlua in the manual

Patrick Gundlach patrick at gundla.ch
Mon Oct 17 17:14:31 CEST 2011


Am 11.10.2011 um 13:53 schrieb Javier Múgica de Rivera:


> Note that the expansion of \directlua is a sequence of characters, not
> of tokens, contrary to all TeX commands. So formally speaking its
> expansion is null, but places material on a pseudo-file to be
> immediately read by TeX, as etex's \scantokens.
> 
> For a description of print functions look at section 4.13.10.

Is that really true? When you assign catcodes (catcode tables) to the print functions, TeX's behavior is different from scantokens. I have never used scantokens, so I am not 100% sure. Take for example:

tex.print(-2, "\\def\\foo{abc}") 

will not define \foo. While you have referenced the section with the print commands, I think that the description is misleading.

Patrick




More information about the dev-luatex mailing list