]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathDelim.cpp
Cache icons of dynamic menu buttons
[lyx.git] / src / mathed / InsetMathDelim.cpp
index 95b533b4c75a29456b0ed8c70099c70da3477dec..e97e12c04e217ab935d1b6951c0936d106e9b0a8 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)
@@ -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,30 +179,27 @@ void InsetMathDelim::mathematica(MathematicaStream & os) const
 }
 
 
-void InsetMathDelim::mathmlize(MathStream & ms) const
+void InsetMathDelim::mathmlize(MathMLStream & ms) const
 {
-       ms << "<" << from_ascii(ms.namespacedTag("mo")) << " form='prefix' fence='true' stretchy='true' symmetric='true'>"
-          << "<" << from_ascii(ms.namespacedTag("mrow")) << ">"
-          << convertDelimToXMLEscape(left_)
-          << "</" << from_ascii(ms.namespacedTag("mrow")) << ">"
+       ms << "<" << from_ascii(ms.namespacedTag("mrow")) << ">" << "\n"
+          << "<" << from_ascii(ms.namespacedTag("mo")) << " form='prefix' fence='true' stretchy='true' symmetric='true'>"
+          << convertDelimToXMLEscape(left_, ms.xmlMode())
           << "</" << from_ascii(ms.namespacedTag("mo")) << ">"
           << "\n"
           << cell(0)
           << "\n"
           << "<" << from_ascii(ms.namespacedTag("mo")) << " form='postfix' fence='true' stretchy='true' symmetric='true'>"
-          << "<" << from_ascii(ms.namespacedTag("mrow")) << ">"
-          << convertDelimToXMLEscape(right_)
-          << "</" << from_ascii(ms.namespacedTag("mrow")) << ">"
-          << "</" << from_ascii(ms.namespacedTag("mo")) << ">"
-          << "\n";
+          << convertDelimToXMLEscape(right_, ms.xmlMode())
+          << "</" << from_ascii(ms.namespacedTag("mo")) << ">" << "\n"
+          << "</" << from_ascii(ms.namespacedTag("mrow")) << ">" << "\n";
 }
 
 
 void InsetMathDelim::htmlize(HtmlStream & os) const
 {
-       os << convertDelimToXMLEscape(left_)
+       os << convertDelimToXMLEscape(left_, false)
           << cell(0)
-          << convertDelimToXMLEscape(right_);
+          << convertDelimToXMLEscape(right_, false);
 }