2 * \file math_matrixinset.C
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS.
13 #include "math_matrixinset.h"
14 #include "math_mathmlstream.h"
19 MathMatrixInset::MathMatrixInset(MathGridInset const & p)
24 auto_ptr<InsetBase> MathMatrixInset::clone() const
26 return auto_ptr<InsetBase>(new MathMatrixInset(*this));
30 void MathMatrixInset::write(WriteStream & os) const
32 MathGridInset::write(os);
36 void MathMatrixInset::normalize(NormalStream & os) const
38 MathGridInset::normalize(os);
42 void MathMatrixInset::maple(MapleStream & os) const
44 os << "matrix(" << int(nrows()) << ',' << int(ncols()) << ",[";
45 for (idx_type idx = 0; idx < nargs(); ++idx) {
54 void MathMatrixInset::maxima(MaximaStream & os) const
57 for (row_type row = 0; row < nrows(); ++row) {
61 for (col_type col = 0; col < ncols(); ++col) {
64 os << cell(index(row, col));
72 void MathMatrixInset::mathmlize(MathMLStream & os) const
74 MathGridInset::mathmlize(os);
78 void MathMatrixInset::octave(OctaveStream & os) const
81 for (row_type row = 0; row < nrows(); ++row) {
85 for (col_type col = 0; col < ncols(); ++col)
86 os << cell(index(row, col)) << ' ';