2 * \file InsetMathMatrix.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 "InsetMathMatrix.h"
15 #include "MathStream.h"
23 InsetMathMatrix::InsetMathMatrix(InsetMathGrid const & p)
28 auto_ptr<InsetBase> InsetMathMatrix::doClone() const
30 return auto_ptr<InsetBase>(new InsetMathMatrix(*this));
34 void InsetMathMatrix::write(WriteStream & os) const
36 InsetMathGrid::write(os);
40 void InsetMathMatrix::normalize(NormalStream & os) const
42 InsetMathGrid::normalize(os);
46 void InsetMathMatrix::maple(MapleStream & os) const
48 os << "matrix(" << int(nrows()) << ',' << int(ncols()) << ",[";
49 for (idx_type idx = 0; idx < nargs(); ++idx) {
58 void InsetMathMatrix::maxima(MaximaStream & os) const
61 for (row_type row = 0; row < nrows(); ++row) {
65 for (col_type col = 0; col < ncols(); ++col) {
68 os << cell(index(row, col));
76 void InsetMathMatrix::mathematica(MathematicaStream & os) const
79 for (row_type row = 0; row < nrows(); ++row) {
83 for (col_type col = 0; col < ncols(); ++col) {
86 os << cell(index(row, col));
94 void InsetMathMatrix::mathmlize(MathStream & os) const
96 InsetMathGrid::mathmlize(os);
100 void InsetMathMatrix::octave(OctaveStream & os) const
103 for (row_type row = 0; row < nrows(); ++row) {
107 for (col_type col = 0; col < ncols(); ++col)
108 os << cell(index(row, col)) << ' ';