Am 26.11.2008 um 20:07 schrieb Mojca Miklavec:

> Hello,
>
> Here's a tiny question. The following command complains about
> undefined control sequence.
>
> \starttext
> \startluacode
> print('a\tb')

print('a\t b')

> \stopluacode
> hello
> \stoptext
>
> There is a workaround:
>    print(string.format('a\t%s', 'b'))
> but I find it weird. Even if the line above gets commented out with
> two dashes it still complains.
>
> I understand approximately why this happens, but is that intended?
> Should I be using something else than \startluacode in the plethora of
> different lua triggering commands?

\start/stopluacode is defined as \startluacode#1\stopluacode
(simplified) and you should take care of TeXs parsing rules.

If you want Lua comments and format command (\n, \t ...) use
a external file for your Lua code.

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

Reply via email to