Page MenuHomePhabricator

\operatorname{sn} rendered with no space before and after, and too much space between characters in Client Side MathJax mode
Closed, ResolvedPublicBUG REPORT

Assigned To
Authored By
SalixAlba
Sep 27 2024, 10:51 AM
Referenced Files
F57651936: Screenshot 2024-10-28 at 08.11.05.png
Mon, Oct 28, 7:14 AM
F57651046: image.png
Mon, Oct 28, 12:08 AM
F57650788: image.png
Sun, Oct 27, 9:47 PM
F57561968: image.png
Sep 27 2024, 10:51 AM
F57561964: image.png
Sep 27 2024, 10:51 AM

Description

NOTE Fix T375861 first, as this might change the situation.

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

  • Set math rendering mode to Client Side MathJax
  • Enter the formula `<math>a\operatorname{snap}b</math>`

What happens?:

Rendered as

image.png (65×192 px, 3 KB)

What should have happened instead?:

Rendered with more space before the operator and less space between the character in the operator

image.png (69×200 px, 3 KB)

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

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

Event Timeline

What settings do you use in MathJax. For Chromium on Mac it works with MathJax SVG rendering.

Screenshot 2024-10-28 at 08.11.05.png (1×3 px, 948 KB)

I need to understand why it breaks for you. I would assume if the same MathML is generated as the internal MathML before, the SVG would also look like to one before.

The above is MathML rendering, just using the standard preference option.

WIth Client-Side MathJax things render fine.

The MathML mode gives

<math class="mwe-math-element" xmlns="http://www.w3.org/1998/Math/MathML">
  <mrow data-mjx-texclass="ORD">
    <mstyle displaystyle="true" scriptlevel="0">
      <mi>a</mi>
      <mi data-mjx-texclass="OP" mathvariant="normal">snap</mi>
      <mo>⁡</mo>
      <mi>b</mi>
    </mstyle>
  </mrow>
</math>

Similar in structure to the MathJax:

<mjx-math class="mwe-math-element MJX-TEX" aria-hidden="true">
 <mjx-texatom texclass="ORD">
  <mjx-mstyle>
    <mjx-mi class="mjx-i">
      <mjx-c class="mjx-c1D44E TEX-I"></mjx-c>
    </mjx-mi>
    <mjx-mi class="mjx-n" space="2">
      <mjx-c class="mjx-c73"></mjx-c><mjx-c class="mjx-c6E"></mjx-c>
      <mjx-c class="mjx-c61"></mjx-c><mjx-c class="mjx-c70"></mjx-c>
    </mjx-mi>
    <mjx-mo class="mjx-n">
       <mjx-c class="mjx-c2061"></mjx-c>
    </mjx-mo>
    <mjx-mi class="mjx-i" space="2">
      <mjx-c class="mjx-c1D44F TEX-I"></mjx-c>
    </mjx-mi>
   </mjx-mstyle>
 </mjx-texatom>
</mjx-math>

Apart from the \u2061 invisable character being removed it seems to have a similar structure.

The MathML renders fine for me with Firefox on Windows, so it looks like Windows Chrome rendering problem. This bug also seem to impact other functions, there are similar results for a\sin b.

ok. So it renders fine with ClientSide MathJax (this ticket). The chrome problem would be rather T375861 I think.