Page MenuHomePhabricator

Too much space around operators when used in limits in MathML mode
Open, LowPublic3 Estimated Story PointsBUG REPORT

Assigned To
None
Authored By
SalixAlba
Oct 12 2024, 9:15 AM
Referenced Files
F57711202: image.png
Nov 16 2024, 8:20 PM
F57711123: Screenshot 2024-11-16 at 20.44.02.png
Nov 16 2024, 7:46 PM
F57711118: Screenshot 2024-11-16 at 20.40.46.png
Nov 16 2024, 7:42 PM
F57607949: image.png
Oct 12 2024, 9:15 AM
F57607947: image.png
Oct 12 2024, 9:15 AM
F57607940: image.png
Oct 12 2024, 9:15 AM
F57607937: image.png
Oct 12 2024, 9:15 AM

Description

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

  • Set math mode to MathML
  • Enter the formula \lim_{n\to +\infty}\left(1+\frac 1n\right)^n

What happens?:

Rendered as

image.png (141×282 px, 6 KB)

with a lot of space around the -> and the +.

What should have happened instead?:

Rendered in SVG mode as

image.png (152×330 px, 9 KB)

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

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

When rendered on a normal line it is appropriate to have more space, so \text{let}\ {n \to +\infty} renders as

image.png (86×240 px, 2 KB)

in MathML and

image.png (96×252 px, 4 KB)

in SVG with more space around the arrow, but none between the + and \infty.

Event Timeline

That's how it looks with MathJax

Screenshot 2024-11-16 at 20.40.46.png (254×219 px, 16 KB)

so the MathML can not be terribly wrong.

Physikerwelt moved this task from Inbox to Needs clarification on the Math board.

Temml

Screenshot 2024-11-16 at 20.44.02.png (770×823 px, 141 KB)

they are able to infer that + is a prefix. This is also the same problem that we see on a normal line.

This means we would need to develop a mechanism to discover prefix + operators. I need to look deeper into the code to understand how much work this would be.

Physikerwelt set the point value for this task to 3.Nov 16 2024, 8:20 PM

I feel the bug is that only the thing with {n \to +\infty} is a bug. Putting more space in the limit seems like a perfectly fine design decision in MathML to me.

See the minimal example

<math>-1</math>

<math>\to -1</math>

rendered as

image.png (85×85 px, 2 KB)

There is too much space between - and 1 in the second example. This is something that could be worth fixing. However, I don't know if that is a browser bug, or a bug in the MathML generation.

Physikerwelt lowered the priority of this task from Medium to Low.
Physikerwelt subscribed.
  NODES
Bugs 2
Note 1