Page MenuHomePhabricator

\mathop does not produce an operator: limits are placed as sub/superscripts
Closed, ResolvedPublicBUG REPORT

Description

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

  • Preference setting: MathML with SVG image (client side MathJax rendering)
  • Markup: <math>\mathop{X}_a^x</math>
  • Compare with: <math>\sum_a^x</math> in display style, and with the server-side SVG rendering of the same \mathop markup

What happens?:
\mathop does not work: should turn the content into an operator in the style of \sum
Aside: as a feature request, it would be nice if all of the Wikipedia LaTeX renderers supported some command(s) along the lines of those provided by the scalerel package. There are several relatively common notations which are currently impossible to show correctly in Wikipedia because of the inability to resize symbols.

Screenshot 2026-09-28 at 15.51.33.png (1,506×540 px, 40 KB)

What should have happened instead?:

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

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

Event Timeline

MSantos triaged this task as High priority.Sep 28 2026, 6:58 PM

Aside: as a feature request, it would be nice if all of the Wikipedia LaTeX renderers supported some command(s) along the lines of those provided by the scalerel package. There are several relatively common notations which are currently impossible to show correctly in Wikipedia because of the inability to resize symbols.

Can we look into that after we get rid of restbase? I would rather treat that as a seperate ticket.

Adding commands such as those found in the scalerel package is definitely intended as a separate feature request, not part of a bug report.

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

[mediawiki/extensions/Math@master] WIP: Place \mathop limits like TeX

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

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

[mediawiki/extensions/Math@master] Add reference cases for operator limits

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

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

[mediawiki/extensions/Math@master] Never move the limits of operators

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

Change #1353161 merged by jenkins-bot:

[mediawiki/extensions/Math@master] Add reference cases for operator limits

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

Change #1353271 merged by jenkins-bot:

[mediawiki/extensions/Math@master] Never move the limits of operators

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

I think it's now ready for review. There are quite a few changes https://meta.wiki.beta.math.wmflabs.org/w/index.php?title=Special:MathDebug&action=visualDiff&ref=a9cf8619845965032bd3af3a7dca36b594282eb4&base=99d6135b2451792afc00149dfc5897ed6a8d45c3
It's not fully TeX as we are missing \operatorname*. Production (Restbase/Mathoid) and native MathML both render \operatorname* as \operatorname{*}. Supporting it in native mode can only be done after the Mathoid/Restbase mode was switched off.

Documentation: section 2.19 "Group op_limits" (page 32) of the PDF, zipped by Gerrit: https://gerrit.wikimedia.org/r/changes/1351445/revisions/a9cf8619845965032bd3af3a7dca36b594282eb4/files/doc%2Fmain.pdf/download

Change #1351445 merged by jenkins-bot:

[mediawiki/extensions/Math@master] Place \mathop limits like TeX

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