5 Dec
2011
5 Dec
'11
9:33 p.m.
Am 05.12.2011 um 21:22 schrieb Jaroslav Hajtmar:
Hello ConTeXist. Sorry for the beginner question, more for Lua(TeX) experts. Can somehow be achieved that the parameter of TeX macro get to luafunction unchanged? In the debug.txt file is the result obtained.
Thanx Jaroslav
\startluacode debug=io.open("debug.txt","w+")
function testfun(param)
Use the thirddata or userdata namespace for for functions.
debug:write(param) -- tex.print(param) end
\stopluacode
\def\testmac#1{\directlua{testfun('#1')}}
\unprotect \def\testmac#1{\ctxlua{testfun(\!!bs\detokenize{#1}\!!es)}} \protect Wolfgang