[LyX/master] MathML: InsetMathHull now distinguishes between hull types to present display/inline math and adjust the alignment of the cells
Thibaut Cuvelier
tcuvelier at lyx.org
Tue May 25 01:44:58 UTC 2021
commit 2805452229904bef2f022a50b70c6671990666b7
Author: Thibaut Cuvelier <tcuvelier at lyx.org>
Date: Tue May 25 03:56:24 2021 +0200
MathML: InsetMathHull now distinguishes between hull types to present display/inline math and adjust the alignment of the cells
By lynx: https://www.lyx.org/trac/attachment/ticket/12221/0004-mathml-display-changes.patch
---
src/mathed/InsetMathHull.cpp | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp
index b880895..fb52049 100644
--- a/src/mathed/InsetMathHull.cpp
+++ b/src/mathed/InsetMathHull.cpp
@@ -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.
More information about the lyx-cvs
mailing list