Thanx Wolfgang. In ConTeXt this solution works well. Exist any similar solution in pure LuaTeX? I need solve one problem in pure LuaTeX. But solutions in Context I will also throw - thanx. Jaroslav Dne 5.12.2011 21:33, Wolfgang Schuster napsal(a):
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