Page MenuHomePhabricator

Not enough space around min and max in native MathML mode
Open, MediumPublicBUG REPORT

Assigned To
None
Authored By
DavidEppstein
Mar 17 2025, 11:45 PM
Referenced Files
F65755728: image.png
Aug 15 2025, 11:57 AM
F65755678: image.png
Aug 15 2025, 11:49 AM
F65755625: image.png
Aug 15 2025, 11:43 AM
F58855970: Screenshot 2025-03-17 at 4.44.27 PM.png
Mar 17 2025, 11:45 PM

Description

In a formula with consecutive min and max operators such as the ones in https://en.wikipedia.org/wiki/Minimax_theorem and https://en.wikipedia.org/wiki/Yao%27s_principle, the native MathML rendering (as viewed on Firefox/MacOS) {F58855970}provides no space between these operators (and the subscripted limits under them) and the next operator, so that an expression like min max E ... from the Yao's principle link looks instead like minmaxE (and the subscripted limits are also jammed together in the same way). The spacing of these subexpressions looks ok in svg and the experimental client-side MathJax rendering.

<math>\max_{D} \min_{A} \mathbb{E}</math>

image.png (186×212 px, 8 KB)

See https://www.mediawiki.org/wiki/Extension:Math/Native_MathML/Reported_Cases#New_cases_as_of_Aug_2025

Event Timeline

Original example

<math display=block>
\max_{D\in \mathcal{D}} \min_{A\in\mathcal{A}} \mathbb{E}_{x\sim D}[c(A,x)]=\min_{R\in \mathcal{R}} \max_{x\in\mathcal{X}} \mathbb{E}[c(R,x)].
</math>

From https://en.wikipedia.org/w/index.php?title=Yao%27s_principle renders fine.

image.png (183×319 px, 20 KB)

This is due to the length of text below. If you shorten that text space between operators disappears.

A similar problem occurs in T386318 with <math>\sin \cos^2</math>

image.png (168×231 px, 6 KB)