![](https://secure.gravatar.com/avatar/27c34cb91f1e92bd850fe60b3d9ef336.jpg?s=120&d=mm&r=g)
17 Oct
2012
17 Oct
'12
11:18 a.m.
Am 17.10.2012 um 10:34 schrieb 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 (\,},right={\,\right)}}") for _, r in ipairs(t) do for _, c in ipairs(r) do NC() context(c) end NR() end context.stopmatrix() \stopluacode \stopformula
But I couldn't put "( )" before and after matrix. If I use context.startmatrix("{left={\left (\,},right={\,\right)}}") then it wrote "left…" as text before the matrix.
How to enclose matrix with ( )?
context.startmatrix{left="\\left(\\,",right="\\,\\right)"} Wolfgang