]> git.lyx.org Git - lyx.git/commitdiff
Wrap text in <mtext>, not <mrow>.
authorRichard Heck <rgheck@comcast.net>
Thu, 31 Dec 2009 18:53:40 +0000 (18:53 +0000)
committerRichard Heck <rgheck@comcast.net>
Thu, 31 Dec 2009 18:53:40 +0000 (18:53 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32705 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/MathExtern.cpp

index f9b9f42af2d9a1af304fc4c0e07fbef13adf3903..2e43c117198d115d48596256589fcb045034cea6 100644 (file)
@@ -1417,18 +1417,20 @@ void mathmlize(MathData const & dat, MathStream & os)
 {
        MathData ar = dat;
        extractStructure(ar, MATHML);
-       if (ar.size() == 0)
-               os << "<mrow/>";
-       else if (ar.size() == 1)
+       if (ar.size() == 0) {
+               if (!os.inText())
+                       os << "<mrow/>";
+       } else if (ar.size() == 1)
                os << ar.front();
        else {
-               os << MTag("mrow");
+               os << (os.inText() ? MTag("mtext") : MTag("mrow"));
                for (MathData::const_iterator it = ar.begin(); it != ar.end(); ++it)
                        (*it)->mathmlize(os);
-               os << ETag("mrow");
+               os << (os.inText() ? ETag("mtext") : ETag("mrow"));
        }
 }
 
+
 // convert this inset somehow to a number
 bool extractNumber(MathData const & ar, int & i)
 {