Page MenuHomePhabricator

Too much space between fences and content in MathML formatting mode
Closed, ResolvedPublicBUG REPORT

Assigned To
Authored By
SalixAlba
Sep 22 2024, 9:38 AM
Referenced Files
F57529829: image.png
Sep 22 2024, 9:53 AM
F57529824: image.png
Sep 22 2024, 9:53 AM
F57529819: image.png
Sep 22 2024, 9:53 AM
F57529816: image.png
Sep 22 2024, 9:53 AM
F57529812: image.png
Sep 22 2024, 9:53 AM
F57529787: image.png
Sep 22 2024, 9:38 AM
F57529753: image.png
Sep 22 2024, 9:38 AM
F57529749: image.png
Sep 22 2024, 9:38 AM

Description

Steps to replicate the issue (include links if applicable):

  • Set math rendering options to MathML
  • Set chrome math font to Cambria Math
  • Enter the equation <math>\binom{n}{k/2}</math>

What happens?:

rendered as

image.png (240×284 px, 10 KB)

What should have happened instead?:

As rendered by LaTeX

image.png (95×112 px, 3 KB)

With much less horizontal space between brackets and content.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Chrome: 129

Adding borders around the <mo> and <mfrac> elements

image.png (217×350 px, 10 KB)

in the generate mathml

<mrow data-mjx-texclass="ORD">
 <mrow data-mjx-texclass="OPEN">
   <mo minsize="2.047em">(</mo>
 </mrow>
 <mfrac linethickness="0">
   <mrow data-mjx-texclass="ORD"><mi>n</mi></mrow>
   <mrow data-mjx-texclass="ORD"> 
     <mrow data-mjx-texclass="ORD"><mi>k</mi><mo>/</mo><mn>2</mn></mrow> 
   </mrow>
  </mfrac>
  <mrow data-mjx-texclass="CLOSE">
    <mo minsize="2.047em">)</mo>
  </mrow>
</mrow>

Shows the <mo> elements have bounding boxes bigger than the symbol.

There is also a 1px padding around the <mfrac> from the user agent style sheet.

mfrac {
  padding-inline-start: 1px;
  padding-inline-end: 1px;
}

Not sure there is anything we can do about this one. It might be a problem with the font's strechy operators.

Event Timeline

With DejaVu Math TeX Gyre

image.png (165×262 px, 8 KB)

Assana Math

image.png (195×192 px, 9 KB)

Latin Modern Math

image.png (189×268 px, 9 KB)

STIX 2

image.png (169×234 px, 9 KB)

XITS Math

image.png (189×217 px, 9 KB)

I am uncertain what to do here. Do you, by chance, know what the generated MathML should look like to improve the situation?

@SalixAlba, can you suggest an action here? To me, it does not look very severe; in some fonts, e.g., Assana, it looks even more narrow.

Physikerwelt claimed this task.