Re: [NTG-context] using variable for subscript in math+lua

2012-10-26 Thread Jeong Dal
Thanks to all who gave a nice solutions. To write a big matrix of unknowns A=(a_{ij}) is not a frequent case. In math, there are many occasions to write matrices which need some typing work like \NC 2 \NC 3 \NC 4 \NR So if we have a function which write a matrix when the data is given as a

Re: [NTG-context] using variable for subscript in math+lua

2012-10-25 Thread Hans Hagen
On 25-10-2012 03:02, Philipp Gesang wrote: context.NC(string.format(schema, i, j)) context.NC(schema, i, j) - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH

Re: [NTG-context] using variable for subscript in math+lua

2012-10-25 Thread Philipp Gesang
···date: 2012-10-25, Thursday···from: Hans Hagen··· On 25-10-2012 03:02, Philipp Gesang wrote: context.NC(string.format(schema, i, j)) context.NC(schema, i, j) Right, but then if you encounter this the first time you won’t know what to google. Regards Philipp pgpVIf0TmiH7I.pgp

Re: [NTG-context] using variable for subscript in math+lua

2012-10-25 Thread Hans Hagen
On 25-10-2012 10:01, Philipp Gesang wrote: ···date: 2012-10-25, Thursday···from: Hans Hagen··· On 25-10-2012 03:02, Philipp Gesang wrote: context.NC(string.format(schema, i, j)) context.NC(schema, i, j) Right, but then if you encounter this the first time you won’t know what to

Re: [NTG-context] using variable for subscript in math+lua (and math+MetaFun)

2012-10-25 Thread Jeong Dal
Dear Gesang and Hans, Your solution is working nicely. I may use lua to simplify my other work. I'd like to ask you one more thing. I tried to write a matrix using MetaFun to add some graphics as following: label(btex $a_{11}$ etex, ( , )); label(btex $a_{12}$ etex, ( , )); label(btex

Re: [NTG-context] using variable for subscript in math+lua (and math+MetaFun)

2012-10-25 Thread Hans Hagen
On 25-10-2012 13:59, Jeong Dal wrote: Dear Gesang and Hans, Your solution is working nicely. I may use lua to simplify my other work. I'd like to ask you one more thing. I tried to write a matrix using MetaFun to add some graphics as following: label(btex $a_{11}$ etex, ( , ));

Re: [NTG-context] using variable for subscript in math+lua (and math+MetaFun)

2012-10-25 Thread Jeong Dal
Dear Hans, The structure of your code is very interesting. MP code) inside ConTeXt) inside Lua) inside ConTeXt) again! It is really useful. Thank you. Best regards, Dalyoung play with code like this \starttext \startluacode context.startMPcode() for i=1,10 do

Re: [NTG-context] using variable for subscript in math+lua

2012-10-25 Thread Otared Kavian
Hi Philipp, Thanks to you, Dalyoung and Hans for the nice example using luacode. I was wonedring how would you modify your code in order to be able to change the name of the matrix if necessary. For instance, how to modify your code in such a way that upon saying

Re: [NTG-context] using variable for subscript in math+lua

2012-10-25 Thread Hans Hagen
On 25-10-2012 20:02, Otared Kavian wrote: Hi Philipp, Thanks to you, Dalyoung and Hans for the nice example using luacode. I was wonedring how would you modify your code in order to be able to change the name of the matrix if necessary. For instance, how to modify your code in such a way that

Re: [NTG-context] using variable for subscript in math+lua

2012-10-25 Thread Procházka Lukáš
On Thu, 25 Oct 2012 20:02:22 +0200, Otared Kavian ota...@gmail.com wrote: Hi Philipp, Thanks to you, Dalyoung and Hans for the nice example using luacode. I was wonedring how would you modify your code in order to be able to change the name of the matrix if necessary. For instance, how to

Re: [NTG-context] using variable for subscript in math+lua

2012-10-25 Thread Philipp Gesang
···date: 2012-10-25, Thursday···from: Otared Kavian··· Hi Philipp, Thanks to you, Dalyoung and Hans for the nice example using luacode. I was wonedring how would you modify your code in order to be able to change the name of the matrix if necessary. For instance, how to modify your code in

[NTG-context] using variable for subscript in math+lua

2012-10-24 Thread Jeong Dal
Dear Hans, Lucas, Wolfgang, Aditya Now, I write a matrix using \startluacode by the helps of you. Also, I can do some operations in matrices which reduced my typing job. In this code, I have to give all the entries of a matrix as a table. It is good to use in many cases. I have one more

Re: [NTG-context] using variable for subscript in math+lua

2012-10-24 Thread Philipp Gesang
···date: 2012-10-25, Thursday···from: Jeong Dal··· Dear Hans, Lucas, Wolfgang, Aditya Now, I write a matrix using \startluacode by the helps of you. Also, I can do some operations in matrices which reduced my typing job. In this code, I have to give all the entries of a matrix as a table.