]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_matrixinset.C
small up/down tweaking
[lyx.git] / src / mathed / math_matrixinset.C
index 1f43e5a9b09aa7134c7cd51d08ca570d9de5e278..4cfedd59b45f5d462e0aed310ce4c9179cdb58b4 100644 (file)
@@ -8,8 +8,8 @@
 #include "Lsstream.h"
 
 
-MathMatrixInset::MathMatrixInset(MathArrayInset const & p)
-       : MathArrayInset(p)
+MathMatrixInset::MathMatrixInset(MathGridInset const & p)
+       : MathGridInset(p)
 {}
 
 
@@ -21,13 +21,13 @@ MathInset * MathMatrixInset::clone() const
 
 void MathMatrixInset::write(WriteStream & os) const
 {
-       MathArrayInset::write(os);
+       MathGridInset::write(os);
 }
 
 
 void MathMatrixInset::normalize(NormalStream & os) const
 {
-       MathArrayInset::normalize(os);
+       MathGridInset::normalize(os);
 }
 
 
@@ -43,6 +43,24 @@ void MathMatrixInset::maplize(MapleStream & os) const
 }
 
 
+void MathMatrixInset::maximize(MaximaStream & os) const
+{
+       os << "matrix(";
+       for (row_type row = 0; row < nrows(); ++row) {
+               if (row)
+                       os << ',';
+               os << '[';
+               for (col_type col = 0; col < ncols(); ++col) {
+                       if (col)
+                               os << ',';
+                       os << cell(index(row, col));
+               }
+               os << ']';
+       }
+       os << ')';
+}
+
+
 void MathMatrixInset::mathmlize(MathMLStream & os) const
 {
        MathGridInset::mathmlize(os);
@@ -56,7 +74,7 @@ void MathMatrixInset::octavize(OctaveStream & os) const
                if (row)
                        os << ';';
                os << '[';
-               for (col_type col = 0; col < ncols(); ++col) 
+               for (col_type col = 0; col < ncols(); ++col)
                        os << cell(index(row, col)) << ' ';
                os << ']';
        }