#include "Lsstream.h"
-MathMatrixInset::MathMatrixInset(MathArrayInset const & p)
- : MathArrayInset(p)
+MathMatrixInset::MathMatrixInset(MathGridInset const & p)
+ : MathGridInset(p)
{}
void MathMatrixInset::write(WriteStream & os) const
{
- MathArrayInset::write(os);
+ MathGridInset::write(os);
}
void MathMatrixInset::normalize(NormalStream & os) const
{
- MathArrayInset::normalize(os);
+ MathGridInset::normalize(os);
}
}
+void MathMatrixInset::maximize(MaximaStream & os) const
+{
+ os << "matrix(";
+ for (row_type row = 0; row < nrows(); ++row) {
+ if (row)
+ os << ',';
+ os << '[';
+ for (col_type col = 0; col < ncols(); ++col) {
+ if (col)
+ os << ',';
+ os << cell(index(row, col));
+ }
+ os << ']';
+ }
+ os << ')';
+}
+
+
void MathMatrixInset::mathmlize(MathMLStream & os) const
{
MathGridInset::mathmlize(os);
if (row)
os << ';';
os << '[';
- for (col_type col = 0; col < ncols(); ++col)
+ for (col_type col = 0; col < ncols(); ++col)
os << cell(index(row, col)) << ' ';
os << ']';
}