From 05336422a4d708adebef1fbd861b74086befbe5a Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Wed, 16 Dec 2009 16:43:26 +0000 Subject: [PATCH] Fix matrix output, at least a bit. A little more work needs to be done here, though. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32548 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/InsetMathMatrix.cpp | 17 ++++++++++++++++- src/mathed/InsetMathMatrix.h | 2 +- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/mathed/InsetMathMatrix.cpp b/src/mathed/InsetMathMatrix.cpp index b4cecfa6c3..0460a9443f 100644 --- a/src/mathed/InsetMathMatrix.cpp +++ b/src/mathed/InsetMathMatrix.cpp @@ -88,9 +88,24 @@ void InsetMathMatrix::mathematica(MathematicaStream & os) const } +// FIXME XHTML +// We need more information here, so we can output the correct +// delimiters, which will not always be "[". To do this, we need +// to make some changes to InsetMathMatrix, adding a member to +// record the type of delimiter, and then make the extractMatrices +// routine in MathExtern give us this information. void InsetMathMatrix::mathmlize(MathStream & os) const { - InsetMathGrid::mathmlize(os); + os << "["; + os << MTag("mtable"); + for (row_type row = 0; row < nrows(); ++row) { + os << MTag("mtr"); + for (col_type col = 0; col < ncols(); ++col) + os << MTag("mtd") << cell(index(row, col)) << ETag("mtd"); + os << ETag("mtr"); + } + os << ETag("mtable"); + os << "]"; } diff --git a/src/mathed/InsetMathMatrix.h b/src/mathed/InsetMathMatrix.h index 570b39b081..971c30129e 100644 --- a/src/mathed/InsetMathMatrix.h +++ b/src/mathed/InsetMathMatrix.h @@ -18,7 +18,7 @@ namespace lyx { -// "shortcut" for DelimInset("(",ArrayInset,")") +// "shortcut" for DelimInset("(",ArrayInset,")") used by MathExtern class InsetMathMatrix : public InsetMathGrid { public: -- 2.39.2