]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathDelim.cpp
typo
[lyx.git] / src / mathed / InsetMathDelim.cpp
index 809e8a0c13ef53160ee0ac28cbd0c51466af680b..e2bd5ac406ffab0125689d1ad0b8768a332fdf3e 100644 (file)
@@ -74,7 +74,7 @@ void InsetMathDelim::validate(LaTeXFeatures & features) const
 }
 
 
-void InsetMathDelim::write(WriteStream & os) const
+void InsetMathDelim::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os);
        os << "\\left" << convertDelimToLatexName(left_) << cell(0)
@@ -93,7 +93,7 @@ void InsetMathDelim::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        Changer dummy = mi.base.changeEnsureMath();
        Dimension dim0;
-       cell(0).metrics(mi, dim0);
+       cell(0).metrics(mi, dim0, false);
        Dimension t = theFontMetrics(mi.base.font).dimension('I');
        int h0 = (t.asc + t.des) / 2;
        int a0 = max(dim0.asc, t.asc)   - h0;
@@ -170,7 +170,7 @@ void InsetMathDelim::mathematica(MathematicaStream & os) const
 {
        if (isAbs()) {
                if (cell(0).size() == 1 && cell(0).front()->asMatrixInset())
-                       os << "Det" << cell(0) << ']';
+                       os << "Det[" << cell(0) << ']';
                else
                        os << "Abs[" << cell(0) << ']';
        }
@@ -179,23 +179,27 @@ void InsetMathDelim::mathematica(MathematicaStream & os) const
 }
 
 
-void InsetMathDelim::mathmlize(MathStream & os) const
+void InsetMathDelim::mathmlize(MathMLStream & ms) const
 {
-       os << "<mo form='prefix' fence='true' stretchy='true' symmetric='true'>"
-          << convertDelimToXMLEscape(left_)
-          << "</mo>\n"
+       ms << MTag("mrow")
+          << MTagInline("mo", "form='prefix' fence='true' stretchy='true' symmetric='true'>")
+          << convertDelimToXMLEscape(left_, ms.xmlMode())
+          << ETagInline("mo")
+          << "\n"
           << cell(0)
-          << "\n<mo form='postfix' fence='true' stretchy='true' symmetric='true'>"
-          << convertDelimToXMLEscape(right_)
-          << "</mo>\n";
+          << "\n"
+          << MTagInline("mo", "form='postfix' fence='true' stretchy='true' symmetric='true'>")
+          << convertDelimToXMLEscape(right_, ms.xmlMode())
+          << ETagInline("mo")
+          << ETag("mrow");
 }
 
 
 void InsetMathDelim::htmlize(HtmlStream & os) const
 {
-       os << convertDelimToXMLEscape(left_)
+       os << convertDelimToXMLEscape(left_, false)
           << cell(0)
-          << convertDelimToXMLEscape(right_);
+          << convertDelimToXMLEscape(right_, false);
 }