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_parser.h"
15 #include "math_mathmlstream.h"
21 MathMatrixInset::MathMatrixInset(MathGridInset const & p)
26 auto_ptr<InsetBase> MathMatrixInset::clone() const
28 return auto_ptr<InsetBase>(new MathMatrixInset(*this));
32 void MathMatrixInset::write(WriteStream & os) const
34 MathGridInset::write(os);
38 void MathMatrixInset::normalize(NormalStream & os) const
40 MathGridInset::normalize(os);
44 void MathMatrixInset::maple(MapleStream & os) const
46 os << "matrix(" << int(nrows()) << ',' << int(ncols()) << ",[";
47 for (idx_type idx = 0; idx < nargs(); ++idx) {
56 void MathMatrixInset::maxima(MaximaStream & os) const
59 for (row_type row = 0; row < nrows(); ++row) {
63 for (col_type col = 0; col < ncols(); ++col) {
66 os << cell(index(row, col));
74 void MathMatrixInset::mathmlize(MathMLStream & os) const
76 MathGridInset::mathmlize(os);
80 void MathMatrixInset::octave(OctaveStream & os) const
83 for (row_type row = 0; row < nrows(); ++row) {
87 for (col_type col = 0; col < ncols(); ++col)
88 os << cell(index(row, col)) << ' ';