On Wed, 17 Oct 2012 10:34:22 +0200, 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 ( )?
... See the new sample attached. ---- printMatrix = function(tab) context.startmatrix{left = "\\left(\\,", right = "\\,\\right)"} for _, r in ipairs(tab) do for _, c in ipairs(r) do context.NC(c) end context.NR() end context.stopmatrix() end ---- Best regards, Lukas
Thank you again.
Best regards,
Dalyoung
-- Ing. Lukáš Procházka [mailto:LPr@pontex.cz] Pontex s. r. o. [mailto:pontex@pontex.cz] [http://www.pontex.cz] Bezová 1658 147 14 Praha 4 Tel: +420 244 062 238 Fax: +420 244 461 038