Bug 146204 - Support of `mfrac` attribute `bevelled` in MathML
Summary: Support of `mfrac` attribute `bevelled` in MathML
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
7.2.2.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: MathML
  Show dependency treegraph
 
Reported: 2021-12-13 12:18 UTC by Pavel Lobashov
Modified: 2022-07-30 18:31 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
bevelled.odt (17.32 KB, application/vnd.oasis.opendocument.text)
2021-12-13 12:18 UTC, Pavel Lobashov
Details
Screenshot showing the problem (3.54 KB, image/png)
2022-05-06 14:48 UTC, Rafael Lima
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Lobashov 2021-12-13 12:18:26 UTC
Created attachment 176896 [details]
bevelled.odt

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 problem with rendering MathML formula with `mfrac` attribute `bevelled`

See attached document:

It has two objects:

Object 2/content.xml with:

<math xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
<mfrac>
<mrow>
<mn>1</mn>
</mrow>
<mrow>
<mn>2</mn>
</mrow>
</mfrac>
</semantics>
</math>

And 

Object 3/content.xml with:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<semantics>
<mfrac bevelled="true">
<mrow>
<mn>1</mn>
</mrow>
<mrow>
<mn>2</mn>
</mrow>
</mfrac>
</semantics>
</math>

So this formula differs that the first one has no `bevelled` (and this is false by default) and second one has bevelled="true")

But on render both those formulas looks like the same

According to https://www.w3.org/TR/MathML3/chapter3.html
this attribute used for display formulas like this:

> Specifies whether the fraction should be displayed in a beveled style (the numerator slightly raised, the denominator slightly lowered and both separated by a slash), rather than "build up" vertically

I don't know if this worked at all in the previous build of LibreOffice, so I'm marking this as enhancement 

My Eniroment:
Kubuntu 20.04
LibreOffice flatpak 7.2.3.2
Comment 1 Caolán McNamara 2021-12-13 13:09:47 UTC
https://cgit.freedesktop.org/libreoffice/core/commit/?id=3b3ec32358aebd81ef5385f48dbf3ee4c93649e8 has a TODO which might be relevant
Comment 2 Rafael Lima 2022-05-06 14:48:40 UTC
Created attachment 179976 [details]
Screenshot showing the problem

Indeed both formulas are still rendered the same. See attached screenshot.

Following Caolan's pointer, the TODO is still there, so no support for mfrac bevelled="true" yet.

I'm setting this to NEW.

System info used to take the screenshot:
Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 4351a6ca782e1d2081ba819338ebbf6a2d2ee2b2
CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: CL
Comment 3 Rafael Lima 2022-05-06 14:50:24 UTC
Updated code pointer is:
https://opengrok.libreoffice.org/xref/core/starmath/source/mathml/mathmlimport.cxx?r=9c111cc4#895

It currently reads:
// TODO/LATER: convert <mfrac bevelled="true"> into "wideslash{}{}"