Page MenuHomePhabricator

Too much space around \operatorname in MathML
Closed, ResolvedPublicBUG REPORT

Assigned To
Authored By
Dexxor
Feb 12 2026, 8:44 PM
Referenced Files
F93864431: Screenshot 2026-07-15 at 22.10.41.png
Jul 15 2026, 9:14 PM
F71957624: image.png
Feb 12 2026, 8:44 PM
F71957360: image.png
Feb 12 2026, 8:44 PM
F71957355: image.png
Feb 12 2026, 8:44 PM

Description

Enable "MathML (experimental; no images)" in Special:Preferences → Apperance → Math. Then preview a page with the contents <math>K = \operatorname{ker}(A)</math>.

This renders with too much space before and after "ker" in Firefox and Chrome:

image.png (407×190 px, 11 KB)

Server-side SVG and client-side MathJax look good:

image.png (391×115 px, 8 KB)

Here's a real-world example, where the spacing is particularly bad:

image.png (1,118×69 px, 18 KB)

To fix this, I suggest using an <mi> element for \operatorname{ker} instead of <mo> since we already use <mi> for special functions like \sin. Temml.org also uses <mi> for \operatorname{ker}.

Details

Event Timeline

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

[mediawiki/extensions/Math@master] Output mi elements for \operatorname

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

The testcase Difference at index 31: dy/dx, \operatorname{d}\!y/\operatorname suggests that others have already considered that the space after d would be too large.

Change #1311411 merged by jenkins-bot:

[mediawiki/extensions/Math@master] Output mi elements for \operatorname

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