2 * \file InsetMathMatrix.cpp
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"
20 InsetMathMatrix::InsetMathMatrix(InsetMathGrid
const & p
)
25 Inset
* InsetMathMatrix::clone() const
27 return new InsetMathMatrix(*this);
31 void InsetMathMatrix::write(WriteStream
& os
) const
33 InsetMathGrid::write(os
);
37 void InsetMathMatrix::normalize(NormalStream
& os
) const
39 InsetMathGrid::normalize(os
);
43 void InsetMathMatrix::maple(MapleStream
& os
) const
45 os
<< "matrix(" << int(nrows()) << ',' << int(ncols()) << ",[";
46 for (idx_type idx
= 0; idx
< nargs(); ++idx
) {
55 void InsetMathMatrix::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 InsetMathMatrix::mathematica(MathematicaStream
& os
) const
76 for (row_type row
= 0; row
< nrows(); ++row
) {
80 for (col_type col
= 0; col
< ncols(); ++col
) {
83 os
<< cell(index(row
, col
));
91 void InsetMathMatrix::mathmlize(MathStream
& os
) const
93 InsetMathGrid::mathmlize(os
);
97 void InsetMathMatrix::octave(OctaveStream
& os
) const
100 for (row_type row
= 0; row
< nrows(); ++row
) {
104 for (col_type col
= 0; col
< ncols(); ++col
)
105 os
<< cell(index(row
, col
)) << ' ';