Jjgod Jiang wrote:
Hi,
I'm wondering if I can register a Lua function as callback on the expansion of a specific macro? I'm expecting something like this:
\def\hello#1{#1}
callback.register("macro.hello",lua_func_hello)
when using \hello{abc}, the lua_func_hello will get called and have access to the arguments of \hello (abc).
\def\hello#1{\directlua 0 {YourFunction("#1")}} Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------