]> git.lyx.org Git - features.git/commitdiff
MathML: InsetMathHull now distinguishes between hull types to present display/inline...
authorThibaut Cuvelier <tcuvelier@lyx.org>
Tue, 25 May 2021 01:56:24 +0000 (03:56 +0200)
committerThibaut Cuvelier <tcuvelier@lyx.org>
Tue, 25 May 2021 01:56:24 +0000 (03:56 +0200)
By lynx: https://www.lyx.org/trac/attachment/ticket/12221/0004-mathml-display-changes.patch

src/mathed/InsetMathHull.cpp

index b8808959dee466f49cc03263e7e7f9dc9758a3ff..fb52049f2ec00f84074c4c9b7b10ab2db996af59 100644 (file)
@@ -2530,8 +2530,15 @@ void InsetMathHull::mathmlize(MathMLStream & ms) const
        bool const havenumbers = haveNumbers();
        bool const havetable = havenumbers || nrows() > 1 || ncols() > 1;
 
-       if (havetable)
-               ms << MTag("mtable");
+    if (havetable) {
+        if (getType() == hullSimple)
+            ms << MTag("mtable");
+        else if (getType() >= hullAlign && getType() <= hullXXAlignAt)
+            ms << MTag("mtable", "displaystyle='true' columnalign='right left'");
+        else
+            ms << MTag("mtable", "displaystyle='true'");
+    }
+
        char const * const celltag = havetable ? "mtd" : "mrow";
        // FIXME There does not seem to be wide support at the moment
        // for mlabeledtr, so we have to use just mtr for now.