Page MenuHomePhabricator

\cancel{y} the strike is not visable in native mathml mode in Chrome
Closed, ResolvedPublic5 Estimated Story PointsBUG REPORT

Assigned To
Authored By
SalixAlba
Oct 9 2024, 5:44 PM
Referenced Files
F57689350: Screenshot 2024-11-08 at 14.19.09.png
Nov 8 2024, 1:19 PM
F57610674: Screenshot 2024-10-13 at 09.31.46.png
Oct 13 2024, 7:32 AM
F57610670: image.png
Oct 13 2024, 7:28 AM
F57601577: image.png
Oct 9 2024, 5:55 PM
F57601559: image.png
Oct 9 2024, 5:55 PM
F57601544: image.png
Oct 9 2024, 5:44 PM
F57601540: image.png
Oct 9 2024, 5:44 PM

Description

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

  • Set math rendering mode to mathml
  • enter the formula \cancel{y}

What happens?:

Rendered as

image.png (78×41 px, 959 B)

What should have happened instead?:

A strike should be visible: SVG

image.png (88×54 px, 1 KB)

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

See https://en.wikipedia.beta.wmflabs.org/wiki/T376829

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

Chrome.

Event Timeline

It is visible in Firefox

image.png (67×29 px, 1 KB)

but there are problems with the strike being too small and not being distinct enough from the y. Vanilla MathJax is like the SVG and LaTeX is like

image.png (126×93 px, 2 KB)

We generate the following MathML

<menclose notation="updiagonalstrike"><mi>y</mi></menclose>

Unfortunately, displaying this is not possible with the current MathML Core spec. https://github.com/w3c/mathml/issues/216

@NSoiffer suggested using this polyfill: https://w3c.github.io/mathml-polyfills/menclose/menclose.js. However, if we rely on JS, it is probably easier to switch to MathJax rendering in Chrome when cancel occurs.

Physikerwelt set the point value for this task to 5.

There seems to be a way to fix this. https://github.com/w3c/mathml-core/issues/245#issuecomment-2410676518

It's a bit complicated as one has to remove menclose completely.

Physikerwelt renamed this task from \cancel{y} the strike is not visable in native mathml mode to \cancel{y} the strike is not visable in native mathml mode in Chrome.Nov 2 2024, 6:04 PM

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

[mediawiki/extensions/Math@master] Remove menclose in cancel rendering

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

Change #1086359 merged by jenkins-bot:

[mediawiki/extensions/Math@master] Remove menclose in cancel rendering

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

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

[mediawiki/extensions/Math@REL1_43] Remove menclose in cancel rendering

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

Change #1089248 merged by jenkins-bot:

[mediawiki/extensions/Math@REL1_43] Remove menclose in cancel rendering

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