[Dev-luatex] register a callback on macro expansion?

Jjgod Jiang gzjjgod at gmail.com
Tue Feb 20 12:33:52 CET 2007


Hi,

2007/2/20, Hans Hagen <pragma at wxs.nl>:
> this is state independent, so state 1 should work; indeed the slunicode lib is there as is lfs

I've tried with

\directlua 0 {
    function hello(str)
        tex.print(str)
    end
}

\def\hello#1{\directlua 0 {hello("#1")}}

\hello{hi}
\bye

But only got:

! LuaTeX error [string "luas[0]"]:1: attempt to index global 'tex' (a nil value
).
\hello #1->\directlua 0 {hello("#1")}

l.9 \hello{hi}

- jjgod.


More information about the dev-luatex mailing list