https://bugs.documentfoundation.org/show_bug.cgi?id=146002
Bug ID: 146002
Summary: munderover/munder render both argument above if both
of them has style
Product: LibreOffice
Version: 7.2.2.2 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Formula Editor
Assignee: [email protected]
Reporter: [email protected]
Created attachment 176646
--> https://bugs.documentfoundation.org/attachment.cgi?id=176646&action=edit
munderover_bug.zip
Hello there. I'm writing this issue on behalf of ONLYOFFICE DocumentServer team
(https://github.com/ONLYOFFICE/DocumentServer)
During the development of our product, we think we found some problems with
rendering formulas with <munderover> and <munder> tag in MathML
We got a sample file, named `MUNDEROVER_without_style.odt` with this content in
`Object 1/content.xml` file:
```
<?xml version="1.0" encoding="UTF-8"?>
<math display="block" xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
<mrow>
<munderover>
<mo stretchy="false">∫</mo>
<mstyle mathcolor="red">
<mn>0</mn>
</mstyle>
<mn>1</mn>
</munderover>
<mstyle mathcolor="green">
<mi>a</mi>
</mstyle>
</mrow>
</semantics>
</math>
```
Opening this file in LibreOffice we got ∫ with two limits - 0 is underscript
and 1 is overscript
This files renders correctly (See left part of screenshot in attachment)
But as soon as we try to add color to overscript (making XML file like this,
only adding <mstyle mathcolor="blue"> around <mn>1</mn> - we got incorrect file
render (see right part of attached screenshot)
```
<?xml version="1.0" encoding="UTF-8"?>
<math display="block" xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
<mrow>
<munderover>
<mo stretchy="false">∫</mo>
<mstyle mathcolor="red">
<mn>0</mn>
</mstyle>
<mstyle mathcolor="blue">
<mn>1</mn>
</mstyle>
</munderover>
<mstyle mathcolor="green">
<mi>a</mi>
</mstyle>
</mrow>
</semantics>
</math>
```
In that case, LibreOffice renders this file with both 0 and 1 in overscript
We think it has something to do with the conversion of this formula to StarMath
The file without style has this StarMath style (copied from opened Libreoffice:
> { int csup 1 csub color red 0 color green a }
File with style has this StarMath:
> { int csup color blue 1 csub color red 0 color green a }
Seems that one pair of quotes is missing
If we change StarMath of second file to:
> { int csup {color blue 1} csub color red 0 color green a }
We got correct integral with both underscript and overscript and with the
correct color
My Eniroment:
Kubuntu 20.04
LibreOffice flatpak 7.2.3.2
--
You are receiving this mail because:
You are the assignee for the bug.