Page MenuHomePhabricator

Prime symbol after \operatorname not rendered as superscript
Closed, ResolvedPublicBUG REPORT

Description

Enable "MathML (experimental; no images)" in Special:Preferences → Apperance → Math. Then preview a page with the contents <math>a' \operatorname{a}'</math>
I expect that both prime symbols are superscripts, but the second one is too far down.

The probelem is due to an extraneous <mo></mo> MathML element between \operatorname{a} and the prime symbol. With "Client side MathJax rendering" you get <merror data-mjx-message="Wrong number of children for msup node">.

Firefox rendering:

img.png (182×372 px, 8 KB)

Event Timeline

Physikerwelt triaged this task as High priority.

In the browser console, you see with native rendering: Invalid markup: Incorrect number of children for <msup/> tag. and the corresponding mml is

<msup>
	<mi data-mjx-texclass="OP" mathvariant="normal">a</mi>
	<mo>⁡</mo>
	<mo>′</mo>
</msup>

in contrast mathoid generates

<msup>
      <mi mathvariant="normal">a</mi>
      <mo>′</mo>
    </msup>

To fix this we still need a test where the operator is applied to something.

If one applies a` on x one gets with mathoid

<mrow>
      <msup>
        <mi mathvariant="normal">a</mi>
        <mo>′</mo>
      </msup>
      <mo>⁡<!-- ⁡ --></mo>
      <mi>x</mi>
    </mrow>

Change #1116515 had a related patch set uploaded (by Physikerwelt; author: Physikerwelt):

[mediawiki/extensions/Math@master] Fix rendering of \operatorname{a}'

https://gerrit.wikimedia.org/r/1116515

Change #1116515 merged by jenkins-bot:

[mediawiki/extensions/Math@master] Fix rendering of \operatorname{a}'

https://gerrit.wikimedia.org/r/1116515

Change #1130228 had a related patch set uploaded (by Krinkle; author: Physikerwelt):

[mediawiki/extensions/Math@REL1_43] Fix rendering of \operatorname{a}'

https://gerrit.wikimedia.org/r/1130228

Change #1130228 merged by jenkins-bot:

[mediawiki/extensions/Math@REL1_43] Fix rendering of \operatorname{a}'

https://gerrit.wikimedia.org/r/1130228