[Dev-luatex] Can \directlua be nested?
taco at elvenkind.com
Thu Jan 31 13:51:08 CET 2008
Jonathan Sauer wrote:
>>> can \directlua be nested, i.e.
>>> to call Lua function 'foo'?
>> \directlua is never called recursively, even though it
>> sometimes looks like it is. The example above is
>> syntactically wrong, but this works (ignoring \catcode issues):
> I'm not sure why: In your example, the second \directlua is
> expanded while the first \directlua expands its argument,
> just like in my example. You would have to surround it with
> \unexpanded or \detokenize (and \luaescapestring because of
> the backslash) to pass it unmodified to tex.print.
Yes, that's what I meant.
My assumption was that everything is catcode 11 or 12 or some other
harmless value. \directlua does indeed read the entire braced
argument at once.
More information about the dev-luatex