Page MenuHomePhabricator

\sum_condition puts condition in the in wrong position in MathML and client-side MathJax modes
Closed, ResolvedPublicBUG REPORT

Assigned To
Authored By
SalixAlba
Sep 27 2024, 5:03 PM
Referenced Files
F57654472: image.png
Oct 29 2024, 2:54 AM
F57654466: image.png
Oct 29 2024, 2:54 AM
F57650748: Screenshot 2024-10-27 at 22-28-26 localhost.png
Oct 27 2024, 9:29 PM
F57645979: image.png
Oct 26 2024, 2:55 PM
F57611118: image.png
Oct 13 2024, 1:34 PM
F57562760: image.png
Sep 27 2024, 5:03 PM
F57562758: image.png
Sep 27 2024, 5:03 PM
F57562753: image.png
Sep 27 2024, 5:03 PM

Description

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

  • Set math formatting mode to MathML or Client side MathJax mode
  • Enter the expression <math>\displaystyle\sum_{n\in\mathbb{Z}}</math>

What happens?:

Displayed as

image.png (114×121 px, 2 KB)

Client side MathJax

image.png (131×138 px, 2 KB)

MathML

What should have happened instead?:

Condition should be directly below the Sigma sign

image.png (107×83 px, 3 KB)

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

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

Chrome 129.

Event Timeline

Same with \displaystyle\prod_{n\in\mathbb{Z}}

Is this only a problem for \sum and \prod, or are there further symbols that should use under instead of sub in display style mode?

@SalixAlba should we start with those two, or is there a more complete list?

We get the same for

\bigcup_{n>k} J \quad \biguplus_{n>k} L \quad \bigcap_{n>k} N
\bigoplus_{n>k} W \quad \bigotimes_{n>k} V \quad \bigodot_{n>k} F
\bigvee_{n>k} V \quad \bigwedge_{n>k} W \quad \bigsqcup_{n>k} S

image.png (382×475 px, 20 KB)

\coprod_{n>k} RR is another case

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

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

[mediawiki/extensions/Math@master] Use munder instead of msub for large operators

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

Change #1079665 merged by jenkins-bot:

[mediawiki/extensions/Math@master] Use munder instead of msub for large operators

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

The following operators from the amsopn package should also have limits typeset below them in \displaystyle:

  • \min, \max, \sup, \inf
  • \injlim, \varinjlim, \lim, \varliminf, \liminf, \limsup, \varlimsup, \projlim, \varprojlim
  • \det, \gcd, \Pr

For your convenience, here's the list again, ready for pasting into LaTeX:

\min_x
\max_x
\sup_x
\inf_x
\injlim_x
\varinjlim_x
\lim_x
\varliminf_x
\liminf_x
\limsup_x
\varlimsup_x
\projlim_x
\varprojlim_x
\det_x
\gcd_x
\Pr_x

Currently failing for

\bigvee_{n>k} V \quad \bigwedge_{n>k} W \quad \bigsqcup_{n>k} S

With conditions by rhs

\int_{n>k} U \quad \oint_{n>k} T \quad \iint_{n>k} S

Conditions should be by RHS.

All the cases Dexxor mentioned fail. There is a related bug with \varliminf_x \varlimsup_x with too small lines above and below.

image.png (421×331 px, 25 KB)

Examples in section 8 of https://www.mediawiki.org/wiki/Extension:Math/Native_MathML/Reported_Cases

@SalixAlba @Dexxor thank you.

All the cases Dexxor mentioned fail. There is a related bug with \varliminf_x \varlimsup_x with too small lines above and below.

Do we already have a phabricator ticket for that?

@Andreg-p I invite you to review

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Math/+/1083469

that looks like that

Screenshot 2024-10-27 at 22-28-26 localhost.png (1×168 px, 32 KB)

for the input given by @Dexxor and some additional new lines.

<math display=block>
\begin{align}
\min_x\\
\max_x\\
\sup_x\\
\inf_x\\
\injlim_x\\
\varinjlim_x\\
\lim_x\\
\varliminf_x\\
\liminf_x\\
\limsup_x\\
\varlimsup_x\\
\projlim_x\\
\varprojlim_x\\
\det_x\\
\gcd_x\\
\Pr_x\\
\end{align}
</math>
Physikerwelt changed the task status from Open to In Progress.Oct 27 2024, 9:30 PM
Physikerwelt moved this task from Ready to implement to Code Review on the Math board.

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

[mediawiki/extensions/Math@master] Add more operators that render limit below

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

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

[mediawiki/extensions/Math@REL1_43] Add more operators that render limit below

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

Change #1083469 merged by jenkins-bot:

[mediawiki/extensions/Math@master] Add more operators that render limit below

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

Change #1083889 merged by jenkins-bot:

[mediawiki/extensions/Math@REL1_43] Add more operators that render limit below

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