On Thu, Nov 27, 2008 at 1:03 PM, Hans Hagen <[EMAIL PROTECTED]> wrote:

> 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
___________________________________________________________________________________
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