Jonathan Sauer wrote:
Hello,
BTW: loadstring can be passed a chunk name. Is it be possible to do the same with \directlua? (to replace "[string "luas[0]"]" above) Something like \directlua callback chunk {...} you mean?
Yes. Maybe \directlua cname {My chunk name} {...} (since it is the name of the chunk, not specifically the name used in the callback/traceback).
This idea is very interesting. I have committed an experimental patch that extends \directlua syntax so that besides \directlua <number> <general text> it also allows a keyword prefix: \directlua name <general text> <number> <general text> This allows you to do stuff like this: \directlua name {\jobname-\the\inputlineno} 0 {error('test')} Because it is experimental, it only works for \directlua, not yet for \latelua. Best wishes, Taco