4 Oct
2013
4 Oct
'13
10:55 a.m.
Am 04.10.2013 um 10:47 schrieb Procházka Lukáš Ing. - Pontex s. r. o.
Hello all,
how to call \let from within Lua?
I'd need to "\let\T=4" using Lua.
The following code doesn't work (not so surprisingly):
---- \startluacode a = 4 \stopluacode
\expandafter\let\expandafter\T=\cldcontext{a}
\starttext Test \T. \stoptext ----
What's the correct way?
You need more \expandafter because \cldcontext needs two expansion steps: \expandafter\expandafter\expandafter\let\expandafter\expandafter\expandafter\T\expandafter\expandafter\expandafter=\cldcontext{a} but I wonder why you don use \def or \edef: \edef\T{\cldcontext{a}} Wolfgang