]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathSubstack.cpp
Substack support for XHTML.
[lyx.git] / src / mathed / InsetMathSubstack.cpp
index fccdf7b3c3aacedeaeaad18141d0819d69159e02..56d253e3b27e2b13e6c6ad25b8368babed0a2b4e 100644 (file)
@@ -128,15 +128,31 @@ void InsetMathSubstack::maple(MapleStream & os) const
 }
 
 
+void InsetMathSubstack::mathmlize(MathStream & os) const
+{
+       int movers = 0;
+       row_type const numrows = nrows();
+       for (row_type row = 0; row < nrows(); ++row) {
+               if (row < numrows - 1) {
+                       movers ++;
+                       os << MTag("munder");
+               }
+               os << MTag("mrow") << cell(index(row, 0)) << ETag("mrow");
+       }
+       for (int i = 1; i <= movers; ++i)
+               os << ETag("munder");
+}
+
+
 void InsetMathSubstack::htmlize(HtmlStream & os) const
 {
        os << MTag("span", "class='substack'");
-       for (row_type row = 0; row < nrows(); ++row) 
+       for (row_type row = 0; row < nrows(); ++row)
                os << MTag("span") << cell(index(row, 0)) << ETag("span");
        os << ETag("span");
 }
 
-       
+
 void InsetMathSubstack::validate(LaTeXFeatures & features) const
 {
        if (features.runparams().isLaTeX())
@@ -146,7 +162,7 @@ void InsetMathSubstack::validate(LaTeXFeatures & features) const
                        "span.substack{display: inline-block; vertical-align: middle; text-align:center; font-size: 75%;}\n"
                        "span.substack span{display: block;}\n"
                        "</style>");
-       
+
        InsetMathGrid::validate(features);
 }