commit c7596ec4b21748b0589a33e204a4adc390d9560b
Author: Georg Baum <[email protected]>
Date:   Sat Feb 22 19:18:16 2014 +0100

    Fix bug #8784 (mathml export for scripts)
    
    For displaystyle scripts we need to use munder, mover or munderover.

diff --git a/src/mathed/InsetMathScript.cpp b/src/mathed/InsetMathScript.cpp
index f60b090..080ccf2 100644
--- a/src/mathed/InsetMathScript.cpp
+++ b/src/mathed/InsetMathScript.cpp
@@ -623,21 +623,18 @@ void InsetMathScript::mathematica(MathematicaStream & os) 
const
 }
 
 
-// FIXME XHTML
-// It may be worth trying to output munder, mover, and munderover
-// in certain cases, e.g., for display formulas. But then we would
-// need to know if we're in a display formula.
 void InsetMathScript::mathmlize(MathStream & os) const
 {
        bool d = hasDown() && down().size();
        bool u = hasUp() && up().size();
+       bool l = hasLimits();
 
        if (u && d)
-               os << MTag("msubsup");
+               os << MTag(l ? "munderover" : "msubsup");
        else if (u)
-               os << MTag("msup");
+               os << MTag(l ? "mover" : "msup");
        else if (d)
-               os << MTag("msub");
+               os << MTag(l ? "munder" : "msub");
 
        if (nuc().size())
                os << MTag("mrow") << nuc() << ETag("mrow");
@@ -647,11 +644,11 @@ void InsetMathScript::mathmlize(MathStream & os) const
        if (u && d)
                os << MTag("mrow") << down() << ETag("mrow") 
                   << MTag("mrow") << up() << ETag("mrow") 
-                  << ETag("msubsup");
+                  << ETag(l ? "munderover" : "msubsup");
        else if (u)
-               os << MTag("mrow") << up() << ETag("mrow") << ETag("msup");
+               os << MTag("mrow") << up() << ETag("mrow") << ETag(l ? "mover" 
: "msup");
        else if (d)
-               os << MTag("mrow") << down() << ETag("mrow") << ETag("msub");
+               os << MTag("mrow") << down() << ETag("mrow") << ETag(l ? 
"munder" : "msub");
 }
 
 
diff --git a/status.20x b/status.20x
index 21bf4da..c5f5c80 100644
--- a/status.20x
+++ b/status.20x
@@ -112,6 +112,8 @@ What's new
 
 * LYXHTML
 
+- Fix mathml output of display style scripts (bug 8784).
+
 
 
 * TEX2LYX

Reply via email to