]> git.lyx.org Git - features.git/blobdiff - src/mathed/MathExtern.cpp
Fix broken Apple speller interface
[features.git] / src / mathed / MathExtern.cpp
index 527543a33b8b4aeeb9ea69cfd399ebaee380b753..daf171981f3fdb07bfee3b4a7f0006dfbae183b1 100644 (file)
@@ -1594,15 +1594,18 @@ void mathmlize(MathData const & dat, MathMLStream & ms)
 {
        MathData ar = dat;
        extractStructure(ar, MATHML);
-       if (ar.empty())
-               ms << CTag("mrow");
-       else if (ar.size() == 1)
+       if (ar.empty()) {
+               if (!ms.inText())
+                       ms << CTag("mrow");
+       } else if (ar.size() == 1) {
                ms << ar.front();
-       else {
-               ms << MTag("mrow");
+       } else {
+               if (!ms.inText())
+                       ms << MTag("mrow");
                for (MathData::const_iterator it = ar.begin(); it != ar.end(); ++it)
                        (*it)->mathmlize(ms);
-               ms << ETag("mrow");
+               if (!ms.inText())
+                       ms << ETag("mrow");
        }
 }