]> git.lyx.org Git - lyx.git/commitdiff
MathML for XArrow.
authorRichard Heck <rgheck@comcast.net>
Thu, 31 Dec 2009 22:02:19 +0000 (22:02 +0000)
committerRichard Heck <rgheck@comcast.net>
Thu, 31 Dec 2009 22:02:19 +0000 (22:02 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32721 a592a061-630c-0410-9148-cb99ea01b6c8

development/HTML/HTML.notes
src/mathed/InsetMathXArrow.cpp
src/mathed/InsetMathXArrow.h

index f833550eaf07ce37bbd6760e4ecafdc5cf02bc4d..1f484b7f3f3665823e0a34ee0f246826d5a3aed5 100644 (file)
@@ -69,7 +69,6 @@ Math
                Probably do something with <mover>, again.
        - Tabular: This is more or less a text-like table in math. Probably output it
                as a table, but set the font.
-       - XArrow: Contents above and below an arrow. Use...?
        - XYMatrix: Not sure how this differs from ordinary ones.
 
 
index d9579ba5cf5996ec452626d4e4103746076dded5..54d73563817641a4580d5d899dfe06c99bd1c17a 100644 (file)
@@ -76,6 +76,16 @@ void InsetMathXArrow::normalize(NormalStream & os) const
 }
 
 
+void InsetMathXArrow::mathmlize(MathStream & ms) const
+{
+       char const * const arrow = name_ == "xleftarrow" 
+                       ? "&larr;" : "&rarr;";
+       ms << "<munderover accent='false' accentunder='false'>"
+          << arrow << cell(1) << cell(0)
+          << "</munderover>";
+}
+
+
 void InsetMathXArrow::validate(LaTeXFeatures & features) const
 {
        features.require("amsmath");
index 469bec1d0baa1e6af51d86d6ea7005126f249876..ac6eaae0f920f3c74ffc0f383a66765332defa22 100644 (file)
@@ -32,6 +32,8 @@ public:
        ///
        void normalize(NormalStream & os) const;
        ///
+       void mathmlize(MathStream &) const;
+       ///
        void validate(LaTeXFeatures & features) const;
        ///
        InsetCode lyxCode() const { return MATH_XARROW_CODE; }