]> git.lyx.org Git - features.git/commitdiff
Fix a few MathML things: the default output and the output of limits.
authorRichard Heck <rgheck@comcast.net>
Wed, 16 Dec 2009 14:53:23 +0000 (14:53 +0000)
committerRichard Heck <rgheck@comcast.net>
Wed, 16 Dec 2009 14:53:23 +0000 (14:53 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32542 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/InsetMath.cpp
src/mathed/InsetMathHull.cpp
src/mathed/InsetMathLim.cpp

index 51b4deee709e484cf55c3411e111ba0a83d18461..0a9772c6769c3e7c1a243b6170aba64c49a13644 100644 (file)
@@ -122,8 +122,10 @@ void InsetMath::mathematica(MathematicaStream & os) const
 
 void InsetMath::mathmlize(MathStream & os) const
 {
+       os << MTag("mi");
        NormalStream ns(os.os());
        normalize(ns);
+       os << ETag("mi");
 }
 
 
index 02f9bfeedb107f071cc788074d55ed0471c6f6f8..588e218f7ca233575684d9689981f9860a503ec2 100644 (file)
@@ -1768,9 +1768,10 @@ int InsetMathHull::docbook(odocstream & os, OutputParams const & runparams) cons
 docstring InsetMathHull::xhtml(XHTMLStream & xs, OutputParams const &) const
 {
        if (getType() == hullSimple)
-               xs << StartTag("math", "xmlns=\"http://www.w3.org/1998/Math/MathML\"");
+               xs << StartTag("math", "xmlns=\"http://www.w3.org/1998/Math/MathML\"", true);
        else 
-               xs << StartTag("math", "display=\"block\" xmlns=\"http://www.w3.org/1998/Math/MathML\"");
+               xs << StartTag("math", 
+                       "display=\"block\" xmlns=\"http://www.w3.org/1998/Math/MathML\"", true);
        MathStream ms(xs.os());
        InsetMathGrid::mathmlize(ms);
        xs << EndTag("math");
index 892cded83ddf9d34dd0b322381364f490b4022a2..718d923b195c1914d67568a06a1252720e12108e 100644 (file)
@@ -73,7 +73,11 @@ void InsetMathLim::mathematica(MathematicaStream & os) const
 
 void InsetMathLim::mathmlize(MathStream & os) const
 {
-       os << "lim(" << cell(0) << ',' << cell(1) << ',' << cell(2) << ')';
+       // FIXME XHTML We need a form of MTag that takes attributes.
+       os << "<munder>"
+          << "<mo form='prefix'>" << "lim" << "</mo>"
+          << "<mrow>" << cell(1) << "<mo>&rarr;</mo>" << cell(2) << "</mrow></munder>"
+          << "<mfenced open='(' close=')'>" << cell(0) << "</mfenced>"; 
 }