Page MenuHomePhabricator

\boldsymbol{\alpha} gives a Math Output error in Client Side MathJax mode
Closed, ResolvedPublicBUG REPORT

Description

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

  • Set user preference to Client Side MathJax mode
  • Enter the expression <math>\boldsymbol{\alpha}</math> or any other Greek letter
  • Save the file.

What happens?:

Math Output error is displayed, red text on yellow background

What should have happened instead?:

A bold Greek letter is displayed

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

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

Chrome 128

Details

Event Timeline

Looks like it is converted to <mi mathvariant="bold-italic-italic">&#x3B1;</mi>. At a fist glance it seems that there should not be italic in the mathvariant. According to the latest MathML standard mathvariant is only used to set and the corresponding unicode char 𝜶 should be used instead.

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

[mediawiki/extensions/Math@master] Fix heuristic that adds bold-italic

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

It seems that it is sufficient to covert <mi mathvariant="bold-italic-italic">&#x3B1;</mi> to <mi mathvariant="bold-italic">&#x3B1;</mi>. Now the output looks fine with MahtJax

Screenshot 2024-09-20 at 08-56-33 localhost.png (55×51 px, 617 B)

For sake of good form the test should really include other symbols,

\boldsymbol{\alpha \beta \gamma \delta \epsilon \zeta \eta \theta}
\boldsymbol{\iota \kappa \lambda \mu \nu \xi \omicron \pi}
\boldsymbol{\rho \sigma \tau \upsilon \phi \chi \psi \omega}
\boldsymbol{\varepsilon\digamma\varkappa\varpi}
\boldsymbol{\varrho\varsigma\vartheta\varphi}

all currently fail, some of the varients might cause problems.

Yes, it's all running the same code.

Screenshot 2024-09-20 at 09-54-44 localhost.png (69×401 px, 7 KB)

Change #1074320 merged by jenkins-bot:

[mediawiki/extensions/Math@master] Fix heuristic that adds bold-italic

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

This should be fixed with the next deployment.