Am 04.10.2013 um 10:47 schrieb Procházka Lukáš Ing. - Pontex s. r. o. <l...@pontex.cz>:
> 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 ___________________________________________________________________________________ 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 ___________________________________________________________________________________