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
-----------------------------------------------------------------
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to