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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to