Page MenuHomePhabricator

Error {super,sub}script at the begin of an formula are ignored
Closed, ResolvedPublic

Description

The expressions:

<math>^{super}X</math>
<math>_{sub}X</math>

are not formatted correctly in the "native" rendering:

$wgDefaultUserOptions['math'] = 'native'

"^" and "_" at the beginning of the in "<math>"-tags included expressions are ignored wrongly.

In LaTeX and https://mathoid-beta.wmflabs.org it works correctly.

Best Regards, Wolf Müller

Event Timeline

Physikerwelt moved this task from Inbox to Ready to implement on the Math board.
Physikerwelt subscribed.

I can reproduce that for super, but not for sub.

Screenshot 2025-09-02 at 13.20.09.png (1×3 px, 346 KB)

It's a side effect of a missing \displaystyle implementation. If one uses {}^x works.

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

[mediawiki/extensions/Math@master] Return empty mrow instead of space for style attributes

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

It's somehow related to the way displaystyle was rendered, but not exactly T382669.

Physikerwelt moved this task from Ready to implement to Code Review on the Math board.

Change #1184205 merged by jenkins-bot:

[mediawiki/extensions/Math@master] Return empty mrow instead of space for style attributes

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