Re: [NTG-context] printing tab in lua: print('a\tb') fails

2008-11-27 Thread luigi scarso
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 comm

Re: [NTG-context] printing tab in lua: print('a\tb') fails

2008-11-27 Thread 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{% > \startluacod

Re: [NTG-context] printing tab in lua: print('a\tb') fails

2008-11-27 Thread luigi scarso
> > > 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

Re: [NTG-context] printing tab in lua: print('a\tb') fails

2008-11-27 Thread Wolfgang Schuster
On Thu, Nov 27, 2008 at 10:02 AM, Wolfgang Schuster <[EMAIL PROTECTED]> wrote: > On Thu, Nov 27, 2008 at 9:42 AM, luigi scarso <[EMAIL PROTECTED]> wrote: >> >> >>> >>> OK, I will use external files next time. In this quick-and-dirty >>> approach I just added string.format since it was easier than >

Re: [NTG-context] printing tab in lua: print('a\tb') fails

2008-11-27 Thread Hans Hagen
Mojca Miklavec wrote: > I thought that \startluacode should be behaving the same way as > verbatim environments where commands inside verbatim have no > influence, but apparently I was wrong. no, more like MPcode where one can mix things if the luacode would not expand macros, then we'd need rat

Re: [NTG-context] printing tab in lua: print('a\tb') fails

2008-11-27 Thread luigi scarso
On Thu, Nov 27, 2008 at 10:02 AM, Wolfgang Schuster < [EMAIL PROTECTED]> wrote: > On Thu, Nov 27, 2008 at 9:42 AM, luigi scarso <[EMAIL PROTECTED]> > wrote: > > > > > >> > >> OK, I will use external files next time. In this quick-and-dirty > >> approach I just added string.format since it was easi

Re: [NTG-context] printing tab in lua: print('a\tb') fails

2008-11-27 Thread Wolfgang Schuster
On Thu, Nov 27, 2008 at 9:42 AM, luigi scarso <[EMAIL PROTECTED]> wrote: > > >> >> OK, I will use external files next time. In this quick-and-dirty >> approach I just added string.format since it was easier than >> restructuring everything. >> >> I thought that \startluacode should be behaving the

Re: [NTG-context] printing tab in lua: print('a\tb') fails

2008-11-27 Thread Wolfgang Schuster
On Thu, Nov 27, 2008 at 9:29 AM, Mojca Miklavec <[EMAIL PROTECTED]> wrote: > On Wed, Nov 26, 2008 at 8:28 PM, Wolfgang Schuster wrote: >> >> Am 26.11.2008 um 20:07 schrieb Mojca Miklavec: >> >>> Hello, >>> >>> Here's a tiny question. The following command complains about >>> undefined control seque

Re: [NTG-context] printing tab in lua: print('a\tb') fails

2008-11-27 Thread luigi scarso
> OK, I will use external files next time. In this quick-and-dirty > approach I just added string.format since it was easier than > restructuring everything. > > I thought that \startluacode should be behaving the same way as > verbatim environments where commands inside verbatim have no > influenc

Re: [NTG-context] printing tab in lua: print('a\tb') fails

2008-11-27 Thread Mojca Miklavec
On Wed, Nov 26, 2008 at 8:28 PM, Wolfgang Schuster wrote: > > 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') But then

Re: [NTG-context] printing tab in lua: print('a\tb') fails

2008-11-27 Thread Hans Hagen
Mojca Miklavec wrote: > Hello, > > Here's a tiny question. The following command complains about > undefined control sequence. > > \starttext > \startluacode > print('a\tb') print('a\\tb') > \stopluacode > hello > \stoptext --

Re: [NTG-context] printing tab in lua: print('a\tb') fails

2008-11-26 Thread Wolfgang Schuster
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.f

[NTG-context] printing tab in lua: print('a\tb') fails

2008-11-26 Thread Mojca Miklavec
Hello, Here's a tiny question. The following command complains about undefined control sequence. \starttext \startluacode print('a\tb') \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 t