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_data.h"
15 #include "math_mathmlstream.h"
20 MathMatrixInset::MathMatrixInset(MathGridInset const & p)
25 auto_ptr<InsetBase> MathMatrixInset::doClone() const
27 return auto_ptr<InsetBase>(new MathMatrixInset(*this));
31 void MathMatrixInset::write(WriteStream & os) const
33 MathGridInset::write(os);
37 void MathMatrixInset::normalize(NormalStream & os) const
39 MathGridInset::normalize(os);
43 void MathMatrixInset::maple(MapleStream & os) const
45 os << "matrix(" << int(nrows()) << ',' << int(ncols()) << ",[";
46 for (idx_type idx = 0; idx < nargs(); ++idx) {
55 void MathMatrixInset::maxima(MaximaStream & os) const
58 for (row_type row = 0; row < nrows(); ++row) {
62 for (col_type col = 0; col < ncols(); ++col) {
65 os << cell(index(row, col));
73 void MathMatrixInset::mathmlize(MathMLStream & os) const
75 MathGridInset::mathmlize(os);
79 void MathMatrixInset::octave(OctaveStream & os) const
82 for (row_type row = 0; row < nrows(); ++row) {
86 for (col_type col = 0; col < ncols(); ++col)
87 os << cell(index(row, col)) << ' ';