]> git.lyx.org Git - features.git/commitdiff
MathML for InsetMathBig.
authorRichard Heck <rgheck@comcast.net>
Thu, 31 Dec 2009 04:16:45 +0000 (04:16 +0000)
committerRichard Heck <rgheck@comcast.net>
Thu, 31 Dec 2009 04:16:45 +0000 (04:16 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32685 a592a061-630c-0410-9148-cb99ea01b6c8

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

index b9750e3043f8f9620246863b0551286a2e5d862c..21beba0e914557ef0e0c4984663bc6afbb2ddce2 100644 (file)
@@ -54,8 +54,6 @@ Math
   isues, and not all the insets work. Here are the ones I know still need work:
        - AMSArray
        - Array
-       - Big: Not sure if we can actually do anything here. Probably they should
-               just be treated as delimiters.
        - BoldSymbol: Should be easy.
        - Box
        - Cases
index a707ab10e416147a8a57b35018173cc9fc39e011..128cade0d6258939a9111d3802233712ffe42a67 100644 (file)
@@ -102,6 +102,54 @@ void InsetMathBig::normalize(NormalStream & os) const
 }
 
 
+docstring InsetMathBig::mathmlize(MathStream & os) const
+{
+       os << "<mo form='prefix' fence='true' stretchy='true' symmetric='true'>";
+       if (delim_ == "(" || delim_ == ")"
+                       || delim_ == "[" || delim_ == "]"
+                       || delim_ == "|" || delim_ == "/")
+               os << delim_;
+       else if (delim_ == "\\{" || delim_ == "\\lbrace")
+               os << "{";
+       else if (delim_ == "\\}" || delim_ == "\\rbrace")
+               os << "}";
+       else if (delim_ == "\\slash")
+               os << "/";
+       else if (delim_ == "\\|" || delim_ == "\\vert")
+               os << "|";
+       else if (delim_ == "\\Vert")
+               os << "&par;";
+       else if (delim_ == "\\\\" || delim_ == "\\backslash")
+               os <<" \\";
+       else if (delim_ == "\\langle")
+               os << "&lt;";
+       else if (delim_ == "\\rangle")
+               os << "&gt;";
+       else if (delim_ == "\\lceil")
+               os << "&lceil;";
+       else if (delim_ == "\\rceil")
+               os << "&rceil;";
+       else if (delim_ == "\\lfloor")
+               os << "&lfloor;";
+       else if (delim_ == "\\rfloor")
+               os << "&rfloor;";
+       else if (delim_ == "\\downarrow")
+               os << "&darr;";
+       else if (delim_ == "\\uparrow")
+               os << "&uarr;";
+       else if (delim_ == "\\Downarrow")
+               os << "&dArr;";
+       else if (delim_ == "\\Uparrow")
+               os << "&uArr;";
+       else if (delim_ == "\\updownarrow")
+               os << "&varr;";
+       else if (delim_ == "\\Updownarrow")
+               os << "&vArr;";
+       os << "</mo>";
+       return docstring();;
+}
+
+
 void InsetMathBig::infoize2(odocstream & os) const
 {
        os << name_;
index 58880dc867afcf1fffa9058233f56e9bee0eae03..8049b9460a57716c8e0ff31886fd9ec518ba4503 100644 (file)
@@ -35,6 +35,8 @@ public:
        ///
        void normalize(NormalStream & os) const;
        ///
+       docstring mathmlize(MathStream &) const;
+       ///
        void infoize2(odocstream & os) const;
        ///
        static bool isBigInsetDelim(docstring const &);