Page MenuHomePhabricator

native: Improve rendering for \limits and \nolimits
Closed, ResolvedPublic

Assigned To
Authored By
Physikerwelt
Dec 29 2024, 11:11 AM
Referenced Files
F71428951: Screenshot 2026-01-03 at 16.10.03.png
Jan 3 2026, 3:15 PM
F71428901: Screenshot 2026-01-03 at 16.04.34.png
Jan 3 2026, 3:15 PM
F58079316: image.png
Dec 29 2024, 12:18 PM
F58079311: image.png
Dec 29 2024, 12:18 PM
F58078935: image.png
Dec 29 2024, 11:11 AM

Description

It is still unclear if \limits \nolimits works as expected in native MathML rendering. I suggest creating a comprehensive test suite and then adjust the behaviour.

test cases

\begin{align}
\int \limits_x ABC \\
\int \nolimits_x ABC \\
\operatorname{sn} \limits_x \\
\operatorname{sn} \nolimits_x \\
\operatorname{\int} \limits_x \\
\displaystyle \sum \nolimits_n \\
\displaystyle \sum \nolimits^n \\
\operatorname{\Sigma} \limits_x \\
\Sigma\limits_x %throws a warning
\end{align}

image.png (1×1 px, 114 KB)

questions

  • How do displaystyle and limits interact?
  • Which commands are allowed before limits?
  • Should limits be ignored if used at a place where it is not allowed?

Event Timeline

Hello,

I will add some examples, where I see errors.

  1. <math forcemathmode="native">\displaystyle \int\nolimits_0^\infty f(x) dx</math>:
    image.png (96×788 px, 13 KB)

Here the limits of the integral should be on the right.

  1. <math forcemathmode="native">\iiint_{V_\mathrm{Kart}} f(x, y, z) \,\mathrm dx \mathrm dy \mathrm dz = \iiint_{V_\mathrm{Kug}} \tilde f(r, \theta, \varphi) \cdot r^2 \sin\theta \,\mathrm{d}r \mathrm{d}\theta \mathrm{d}\varphi </math>:
    image.png (64×652 px, 12 KB)

Here the limits of the integral should be on the right.

Hello @Physikerwelt ,
thanks for solving T382669.
As I mentioned in this ticket where are also some issues with the limits of a integrals. Shall I open a seperat ticket for this issue?

I have created https://en.wikipedia.beta.wmcloud.org/wiki/T382813

Screenshot 2026-01-03 at 16.04.34.png (838×1 px, 91 KB)

On overleaf, the second example looks like that

Screenshot 2026-01-03 at 16.10.03.png (838×1 px, 44 KB)

For testing, it would be good to use more minimal examples.

Does the first example look good already?

We can use either this ticket or create a new one. Whatever you prefer.

Hello @Physikerwelt,

I have created the ticket T413713.

Yes the integral with upper und lower border looks correct.

The remaining work is tracked in T413713