luigi scarso wrote:
Correction:
-- works as comments in luacode % is used to format strings
It's a bit different: code below is ok, and TeX comment is seen "before" lua comment . Only Hello! is print on pdf
%%%%%%%%%%%%%%%%%% \def\Foo{% \startluacode -- this is a lua comment %% this is a TeX comment \stopluacode }
sure, since you use a \def which then stores catcodes as they are in tex mode \startluacode function document.luigishouldknowbetter(whatever) for i=1,100 do print(whatever) -- this is a lua comment end end \stopluacode \def\Foo {\ctxlua{document.luigishouldknowbetter("Hello world!")}} ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------