Closed blefloch closed 3 years ago
These are defined by \luadef
(or \protected\luadef
and so on). From the meaning we can extract the number #1
, then get lua.get_functions_table()[#1]
on the Lua side, patch it with something that gives control back to unravel.
\directlua
{
lua.get_functions_table()[#1](#1)
unravel.main_loop()
}
... rest of the input stream, like we do for macros.
where unravel.main_loop()
inserts the right \__unravel_...
command.
LuaTeX has "new" ways of accessing Lua, through expandable luacalls. This is for instance used in
\file_size:n
. Currently breaks in unravel.