]> git.lyx.org Git - features.git/commitdiff
Get MathML output for XHTML working a bit.
authorRichard Heck <rgheck@comcast.net>
Sat, 14 Nov 2009 15:25:32 +0000 (15:25 +0000)
committerRichard Heck <rgheck@comcast.net>
Sat, 14 Nov 2009 15:25:32 +0000 (15:25 +0000)
Turns out MathML is already here, for the most part, so this will
not be too bad at all.

Anyone else think that is very cool?!

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31979 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/InsetMathHull.cpp
src/mathed/InsetMathHull.h

index d68e3bc74257015ae7fa05653b43e122df3624bd..b89d5be5b84079c85fbd6e81299a01a70dd644b0 100644 (file)
@@ -1735,6 +1735,19 @@ int InsetMathHull::docbook(odocstream & os, OutputParams const & runparams) cons
 }
 
 
+docstring InsetMathHull::xhtml(odocstream & os, OutputParams const &) const
+{
+       if (getType() == hullSimple)
+               os << "<math xmlns=\"&mathml;\">";
+       else 
+               os << "<math display=\"block\" xmlns=\"&mathml;\">";
+       MathStream ms(os);
+       InsetMathGrid::mathmlize(ms);
+       os << "</math>";
+       return docstring();
+}
+
+
 void InsetMathHull::tocString(odocstream & os) const
 {
        plaintext(os, OutputParams(0));
index 4cdb1b4f88ad1d53194230d4900faa54fb8cecbe..db4ea41770013ef8bccdead9057d36f83463c563 100644 (file)
@@ -122,6 +122,8 @@ public:
        int plaintext(odocstream &, OutputParams const &) const;
        ///
        int docbook(odocstream &, OutputParams const &) const;
+       ///
+       docstring xhtml(odocstream &, OutputParams const &) const;
        /// the string that is passed to the TOC
        void tocString(odocstream &) const;