Re: [NTG-context] problems with \hbox inside lua

2010-12-23 Thread Peter Münster
On Thu, Dec 23 2010, luigi scarso wrote: > > PS: I still don't know the reason why my example fails > catcode , I suppose Indeed. The %-sign starts a comment in TeX. \starttext \startluacode tex.print("\\hbox{ %s }", "a string") \stopluacode \stoptext is nearly the same as \starttext \hbox{ %

Re: [NTG-context] problems with \hbox inside lua

2010-12-23 Thread luigi scarso
On Thu, Dec 23, 2010 at 6:06 PM, Mojca Miklavec wrote: > PS: I still don't know the reason why my example fails catcode , I suppose -- luigi ___ If your question is of interest to others as well, please add an entry

Re: [NTG-context] problems with \hbox inside lua

2010-12-23 Thread Mojca Miklavec
On Thu, Dec 23, 2010 at 18:06, Mojca Miklavec wrote: > > But then I have another question: how can I use \HL and \VL? The > following code doesn't create any line at all: I'm sorry. I was compiling the wrong file. Mojca

Re: [NTG-context] problems with \hbox inside lua

2010-12-23 Thread Mojca Miklavec
On Thu, Dec 23, 2010 at 15:52, Hans Hagen wrote: > > cleaner: > > function draw_table(unicode_start,n_columns) >    context.start() >    context.definedfont { "Serif at 20pt" } >    context.starttabulate { string.format("*{%s}{|w(1.5em)}|",n_columns+1) } Great, thanks! (I wanted to create a proper

Re: [NTG-context] problems with \hbox inside lua

2010-12-23 Thread Hans Hagen
On 23-12-2010 2:36, luigi scarso wrote: On Thu, Dec 23, 2010 at 2:09 PM, Peter Münster wrote: On Thu, Dec 23 2010, Mojca Miklavec wrote: tex.print('\\hbox to 1.5em{\\hss %s \\hss}', tex.print() does not handle the %s. context() does. So just replace tex.print() by context(). Righ

Re: [NTG-context] problems with \hbox inside lua

2010-12-23 Thread luigi scarso
On Thu, Dec 23, 2010 at 2:09 PM, Peter Münster wrote: > On Thu, Dec 23 2010, Mojca Miklavec wrote: > >>       tex.print('\\hbox to 1.5em{\\hss %s \\hss}', > > tex.print() does not handle the %s.   context() does. > > So just replace tex.print() by context(). Right, this also works \starttext \sta

Re: [NTG-context] problems with \hbox inside lua

2010-12-23 Thread Peter Münster
On Thu, Dec 23 2010, Mojca Miklavec wrote: > tex.print('\\hbox to 1.5em{\\hss %s \\hss}', tex.print() does not handle the %s. context() does. So just replace tex.print() by context(). Peter -- Contact information: http://pmrb.free.fr/contact/ __

Re: [NTG-context] problems with \hbox inside lua

2010-12-23 Thread luigi scarso
On Thu, Dec 23, 2010 at 1:57 PM, Mojca Miklavec wrote: > Dear list, > > I cannot figure out what I am doing wrong here. If I remove \hbox, it > works fine, but I would like to draw a table. > > \starttext > \startluacode > function draw_table(unicode_start,n_columns) >  for i=0,0xF do >    tex.pri

[NTG-context] problems with \hbox inside lua

2010-12-23 Thread Mojca Miklavec
Dear list, I cannot figure out what I am doing wrong here. If I remove \hbox, it works fine, but I would like to draw a table. \starttext \startluacode function draw_table(unicode_start,n_columns) for i=0,0xF do tex.print('\\dontleavehmode\\definedfont[Serif at 20pt]\\kern0pt') for j=0,