Re: [NTG-context] making tables with lua

2012-10-17 Thread Procházka Lukáš Ing . - Pontex s . r . o .
Hello, my experience is that the best way is to create the table first, then to call Lua function to typeset the table. You may choose whether the table will be typeset with 'tabulate' family functions or 'TABLE' family; I may recommend you the latter as it gives you much more control of the

Re: [NTG-context] making tables with lua

2012-10-17 Thread Hans Hagen
On 17-10-2012 03:13, Jeong Dal wrote: Dear all, I used code which generates the table as following: \startluacode local NC, NR, HL, VL = context.NC, context.NR, context.HL, context.VL context.starttabulate { |c|c|c|c|c|c|c|c|c|c| } HL() for i=1, 6, 1 do for j=1,10 ,1 do

Re: [NTG-context] making tables with lua

2012-10-17 Thread Jeong Dal
Dear Proch?zka Luk?? Ing and Hans, Thank you for the reply. It works fine. I modify your code to write a matrix and it also works too. \startformula \startluacode local NC, NR = context.NC, context.NR local t = {{1,0,3,4},{0,2,-2,5},{0,0,1,2}} context.startmatrix() --{left={\left

Re: [NTG-context] making tables with lua

2012-10-17 Thread Wolfgang Schuster
Am 17.10.2012 um 10:34 schrieb Jeong Dal hak...@me.com: Dear Proch?zka Luk?? Ing and Hans, Thank you for the reply. It works fine. I modify your code to write a matrix and it also works too. \startformula \startluacode local NC, NR = context.NC, context.NR local t =

Re: [NTG-context] making tables with lua

2012-10-17 Thread Procházka Lukáš Ing . - Pontex s . r . o .
On Wed, 17 Oct 2012 10:34:22 +0200, Jeong Dal hak...@me.com wrote: Dear Proch?zka Luk?? Ing and Hans, Thank you for the reply. It works fine. I modify your code to write a matrix and it also works too. \startformula \startluacode local NC, NR = context.NC, context.NR local t =

Re: [NTG-context] making tables with lua

2012-10-17 Thread Jeong Dal
Dear Wolfgang and Proch?zka Luk?? Ing, Thank you for the solution. It works nicely. It is so convenient to write many matrices. Best regards, Dalyoung ___ If your question is of interest to others as well, please

[NTG-context] making tables with lua

2012-10-16 Thread Jeong Dal
Dear all, I used code which generates the table as following: \startluacode local NC, NR, HL, VL = context.NC, context.NR, context.HL, context.VL context.starttabulate { |c|c|c|c|c|c|c|c|c|c| } HL() for i=1, 6, 1 do for j=1,10 ,1 do k= i % 3 if k==1 then