[luatex] Changing catcodes in \directlua

Steve Hafner steve.b.hafner at gmail.com
Tue Jul 6 05:01:52 CEST 2010


I'm using luatex beta-0.40.6 in texlive2009.

If file.tex contains the the following two lines

\directlua{\begingroup\catcode`\\=12 tex.print("$\alpha$")\endgroup}
\bye

then

luatex file.tex

gives

! Argument of \\ has an extra }.

But I expected that the argument of \directlua would expand to

tex.print("$\alpha$")

and that $\alpha$ would be sent to the tex stream.

So how do I change catcodes in \directlua?


More information about the luatex mailing list