Page MenuHomePhabricator

\int_a^b limits in incorrect position in MathML mode.
Open, MediumPublicBUG REPORT

Assigned To
Authored By
SalixAlba
Sep 22 2024, 6:00 PM
Referenced Files
F70624598: Screenshot 2025-11-24 at 21.00.51.png
Mon, Nov 24, 8:04 PM
F57594726: image.png
Oct 7 2024, 12:44 PM
F57564826: image.png
Sep 28 2024, 8:54 AM
F57564820: image.png
Sep 28 2024, 8:54 AM
F57530471: image.png
Sep 22 2024, 6:00 PM
F57530468: image.png
Sep 22 2024, 6:00 PM
F57530466: image.png
Sep 22 2024, 6:00 PM

Description

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

  • Set math render mode to MathML
  • Set font to Cambria math
  • Enter the expressions
\int\limits_{1}^{3}\frac{e^3/x}{x^2}\, dx

and

\int_{1}^{3}\frac{e^3/x}{x^2}\, dx

What happens?:

Both are rendered with limits directly above the integral sign.

image.png (217×192 px, 9 KB)

What should have happened instead?:

In the second case, limits should appear just to the right of the top/bottom of the integral sign.

SVG mode

image.png (297×257 px, 17 KB)

Client-Side MathJax

image.png (342×269 px, 14 KB)

LaTeX

image.png (226×189 px, 7 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

SalixAlba renamed this task from \int_a^b limits in incorrect position in MathML mode. to \int\limits_a^b limits in incorrect position in MathML mode..Sep 22 2024, 6:31 PM
Physikerwelt moved this task from Inbox to Needs clarification on the Math board.
Physikerwelt subscribed.

Thank you. I think I can fix that.

@Dginev I tried to get the correct reference rending from LaTeXML. However, I got the same behavior as I'm getting from our native implementation

Screenshot 2024-09-26 at 22-58-45 In-browser HTML5 Editor of LaTeX Fragments.png (164×768 px, 12 KB)

I see that LaTeXML sets movable limits explicitly for the int to false. However, if I use \nolimits instead of \limits, it renders as desired in this ticket.

SalixAlba renamed this task from \int\limits_a^b limits in incorrect position in MathML mode. to \int_a^b limits in incorrect position in MathML mode..Sep 27 2024, 8:57 PM

I've changed the title as the problem is with the \int_a^b form and not the \int\limits_a^b form.

@SalixAlba, I want to be sure that I fix the right thing.

image.png (67×926 px, 15 KB)

image.png (70×948 px, 10 KB)

I would make this \int and \sum look like the one in SVG mode.

I guess this is related to the (stupid) change in user input. Internally, whatever the user enters is wrapped into {\displaystyle YOUR INPUT }. I am unsure if the community still wants this. To me, this inline-displaystyle rendering seemed confusing for users who already know (La)TeX.

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

[mediawiki/extensions/Math@master] Only use Munderover for displaystyle formulae

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

Physikerwelt changed the task status from Open to In Progress.Oct 1 2024, 8:58 PM

Change #1077031 merged by jenkins-bot:

[mediawiki/extensions/Math@master] Only use Munderover for displaystyle formulae

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

@SalixAlba, I want to be sure that I fix the right thing.

image.png (67×926 px, 15 KB)

This is fixed.

image.png (34×925 px, 13 KB)
(https://en.wikipedia.beta.wmflabs.org/wiki/T375349)

image.png (70×948 px, 10 KB)

This is T375907 (which is unfortunately not fixed yet)

This bug should be reopened, it was only fixed for \textstyle, not \displaystyle (the default).

@Tercer I think it's better to file a new bug.

In addition to what was said above T375907 looks good now:

Screenshot 2025-11-24 at 21.00.51.png (166×728 px, 17 KB)

Actually, something else has been fixed here (arg).
So {\displaystyle \int_{1}^{3}\frac{e^3/x}{x^2}\, dx} renders with moverunder but it should use msubsup