On Thu, Nov 27, 2008 at 1:03 PM, Hans Hagen
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!")}}
Exactly. In my opinion, this is better than my example, because I don't like to mix things (and also for namespace document). -- luigi