]> git.lyx.org Git - features.git/commitdiff
InsetMathCancel: add MathML output
authorUwe Stöhr <uwestoehr@web.de>
Mon, 6 Feb 2012 17:35:29 +0000 (17:35 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Mon, 6 Feb 2012 17:35:29 +0000 (17:35 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40710 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/InsetMathCancel.cpp
src/mathed/InsetMathCancel.h

index 13d5606bef75fe005abf58bd4e91bfe45020ebaf..545e6f5d20019bb4ec2252c8eea0219a2314b4eb 100644 (file)
@@ -125,6 +125,27 @@ void InsetMathCancel::infoize(odocstream & os) const
        }
 }
 
+
+void InsetMathCancel::mathmlize(MathStream & os) const
+{
+       switch (kind_) {
+       case cancel:
+               os << MTag("menclose", "notation='updiagonalstrike'") << cell(0) << ETag("menclose"); 
+               break;
+       case bcancel:
+               os << MTag("menclose", "notation='downdiagonalstrike'") << cell(0) << ETag("menclose"); 
+               break;
+       case xcancel:
+               os << MTag("menclose", "notation='updiagonalstrike'")
+                  << MTag("menclose", "notation='downdiagonalstrike'")
+                  << cell(0)
+                  << ETag("menclose")
+                  << ETag("menclose"); 
+               break;
+       }
+}
+
+
 void InsetMathCancel::validate(LaTeXFeatures & features) const
 {
        InsetMathNest::validate(features);
index b9ca16215cf39ccbcf10afe17d531bb79cd45908..1ee4062d24ec6aa3fad69909ff26835cb24e6bf7 100644 (file)
@@ -39,8 +39,8 @@ public:
        void infoize(odocstream & os) const;
        ///
        InsetCode lyxCode() const { return MATH_CANCEL_CODE; }
-       /// Nothing for now
-       void mathmlize(MathStream &) const {}
+       ///
+       void mathmlize(MathStream &) const;
        /// Nothing for HTML
        void htmlize(HtmlStream &) const {}
        ///