]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMath.cpp
Use master buffer's setting for math output type.
[lyx.git] / src / mathed / InsetMath.cpp
index 51b4deee709e484cf55c3411e111ba0a83d18461..a4e310fc6ec42e09068c48a1caeaf6f4b9797341 100644 (file)
@@ -27,6 +27,12 @@ using namespace std;
 
 namespace lyx {
 
+docstring InsetMath::name() const
+{
+       return from_utf8("Unknown");
+}
+
+
 MathData & InsetMath::cell(idx_type)
 {
        static MathData dummyCell(&buffer());
@@ -78,7 +84,8 @@ void InsetMath::write(WriteStream & os) const
 }
 
 
-int InsetMath::plaintext(odocstream &, OutputParams const &) const
+int InsetMath::plaintext(odocstringstream &, 
+        OutputParams const &, size_t) const
 {
        // all math plain text output shall take place in InsetMathHull
        LASSERT(false, /**/);
@@ -122,8 +129,21 @@ void InsetMath::mathematica(MathematicaStream & os) const
 
 void InsetMath::mathmlize(MathStream & os) const
 {
+       os << "<!-- " << from_utf8(insetName(lyxCode())) << " -->";
+       os << MTag("mi");
+       NormalStream ns(os.os());
+       normalize(ns);
+       os << ETag("mi");
+}
+
+
+void InsetMath::htmlize(HtmlStream & os) const
+{
+       os << "<!-- " << from_utf8(insetName(lyxCode())) << " -->";
+       os << MTag("span", "style='color: red;'");
        NormalStream ns(os.os());
        normalize(ns);
+       os << ETag("span");
 }