This is following up a user query at

http://tex.stackexchange.com/q/335994/

The following (plain) luatex logs

[par]
[par]
[]
[]

that is the input \UNDEFINED is scanned (and removed) as a token but
given the name as empty string not "UNDEFINED" .

It isn't exactly clear from the manual that this would be the case, is
that intentional? (and if so is there any way to get "UNDEFINED"
without scanning letter by letter and checking catcodes "by hand" ?

David

\directlua{texio.write_nl("[" .. token.scan_csname() .. "]")}\par
\directlua{texio.write_nl("[" .. token.get_next().csname .. "]")}\par
\directlua{texio.write_nl("[" .. token.scan_csname() .. "]")}\UNDEFINED
\directlua{texio.write_nl("[" .. token.get_next().csname .. "]")}\UNDEFINED


\bye

Reply via email to