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 = {{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:l...@pontex.cz]
Pontex s. r. o.      [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

Attachment: t-Tabulate.mkiv
Description: Binary data

Attachment: t-Tabulate.pdf
Description: Adobe PDF document

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to