Page MenuHomePhabricator

\nolimits will be ignored on sums in displaystyle
Closed, ResolvedPublicBUG REPORT

Description

I am using Ubuntu 24.04 with the latest Chrome version.

The latex code <math>\sum\nolimits_{n=1}^{\infty}</math> is displayed incorrectly in native MathMl. The operator \nolimits is ignored.

Look at the third formular in the picture

image.png (614×737 px, 94 KB)

Details

Related Changes in Gerrit:

Event Timeline

Physikerwelt triaged this task as Medium priority.

This is related to T375349 thus I will work on this on top of the patch for T375349 to avoid regressions.

@Christian1985 I see that case 3 is incorrect. Anything else?

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

[mediawiki/extensions/Math@master] Fix rendering of integral

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

Hallo @Physikerwelt ,

yes only the case three with the code

<math forcemathmode="native">\frac{1}{\pi} \sum\nolimits_{n=1}^{\infty} \frac{\sin (2\pi nx )}{n}=\frac{1}{2}-x,\; 0<x<1</math>

is incorrect.

@Christian1985 thank you for the quick response. I have created a fix that does not alter anything else, but the resulting code appears to be difficult to understand. I would like to refactor the code to make it easier to understand where the limits are placed. However, this might create problems elsewhere. An additional challenge is that the way the resulting MathML code is displayed is not trivial. I think, therefore, we should create an image/PDF with the reference rendering. I have therefore started documenting in standard LaTeX https://github.com/wikimedia/mediawiki-extensions-Math/blob/master/doc/main.pdf . However a section on \lim \limits \nolimits and its intersection with several operators is missing. Do you think it would be valuable to extend on this reference rendering document?

Hello @Physikerwelt ,
I'm afraid I don't understand. What purpose is the document intended to serve? Is it purely for documentation, or is it for unit testing?

Change #1217852 merged by jenkins-bot:

[mediawiki/extensions/Math@master] Fix rendering of integral

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

Hello @Physikerwelt ,
I'm afraid I don't understand. What purpose is the document intended to serve? Is it purely for documentation, or is it for unit testing?

It's for documentation and to provide a better understanding of the desired output. Often, it's not entirely clear what is expected. Having a PDF would help.