Page MenuHomePhabricator

Minus signs not displaying in Math formulas (on certain zoom levels in Chrome browsers)
Closed, InvalidPublic

Description

Several pages containing math formulas are NOT displaying negative/minus signs. Note space is made in the displayed formula for the minus sign, however the symbol itself does not show. Occurs on both Google chrome and Microsoft Edge.

Examples:

This clearly seems to be quite a widespread phenomena for pages that contain math formulas.

Event Timeline

Tedjh20 created this task.Dec 2 2020, 12:02 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 2 2020, 12:02 PM
Tedjh20 updated the task description. (Show Details)Dec 2 2020, 12:03 PM
Tedjh20 updated the task description. (Show Details)Dec 2 2020, 12:13 PM
Tedjh20 updated the task description. (Show Details)

Hi @Tedjh20, thanks for taking the time to report this and welcome to Wikimedia Phabricator! Cannot reproduce in Firefox 83.
Which exact browser and browser version do you use?
On https://en.wikipedia.org/wiki/Special:Preferences#mw-prefsection-rendering , what is your setting in the "Math" section?

Could you provide a screenshot of how https://wikimedia.org/api/rest_v1/media/math/render/svg/6a35bbf4a7fbba678f1a96b3f2e1127d900143c7 is rendered?

Tedjh20 added a comment.EditedDec 2 2020, 2:19 PM

Hi @Tedjh20, thanks for taking the time to report this and welcome to Wikimedia Phabricator! Cannot reproduce in Firefox 83.
Which exact browser and browser version do you use?
On https://en.wikipedia.org/wiki/Special:Preferences#mw-prefsection-rendering , what is your setting in the "Math" section?

Could you provide a screenshot of how https://wikimedia.org/api/rest_v1/media/math/render/svg/6a35bbf4a7fbba678f1a96b3f2e1127d900143c7 is rendered?

Hi @Aklapper! I just tried on latest version of Firefox and it does indeed work on there. However my default browser is Google Chrome, and I'm using the latest version: Version 87.0.4280.66 (Official Build) (64-bit). I don't normally use Edge, I assume I have the latest version of that as well, and testing on that browser also shows the display issues.

My setting in the Math section is: MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools).

Here is a screenshot of the link you sent:


So that does appear to be working ok!

However here is a screenshot of what I see at https://en.wikipedia.org/wiki/Brauer_group#Severi%E2%80%93Brauer_varieties,

Also, I have tried deleting all my wiki-related cookies, this didn't help.

I cannot reproduce the problem in Chromium 87.0.4280.66 on https://en.wikipedia.org/wiki/Brauer_group#Severi%E2%80%93Brauer_varieties on Fedora 33 either.

I am wondering if this might be a font issue (whatever font your browser is using to display the text in that SVG file)...

You're right, it is a font issue. Changing my font size from 16 to 17 fixed the bugs I noted, although other minus signs (in exponents) then disappeared in the process. It seems that the larger the font size, or the more zoomed you are into your browser, the fewer math display issues there are. So before I was using font size 16, zoom 100%, if you want to try reproducing the issue.

I suppose this is a solution - simply increase the default font size of browser. But there must be a lot of people using Chrome or Edge with the same issue I was having, and it seems nonobvious that font size is the culprit, so won't be able to resolve the issue. Additionally this "solution" is quite unstable, since 17 isn't always large enough, and zooming out will always cause display issues. Would be good if there could be a more robust fix that works for all font sizes/browser zooms.

Aklapper renamed this task from Minus signs not displaying in math formulas to Minus signs not displaying in Math formulas (on certain zoom levels in Chrome browsers).Dec 2 2020, 6:30 PM
Aklapper added a subscriber: Theklan.
Daimona added a subscriber: Daimona.Dec 4 2020, 2:40 PM

Hello. I’ve come across a couple of new editors trying to add spaces around negative signs in LaTeX. They were using Chrome. The complaint is that the negative signs aren’t rendering without increasing the zoom level on the browser. Sure enough, I’ve had to increase the zoom level on my browser to see some negative signs. LaTeX used to render reliably at 110% (Maybe lower, but I’ve used 110% for years). Now I need to go to above 125% in some cases. Has the LaTeX engine made some new assumptions about display resolution. My monitor is 1920 x 1080. Maybe it is time for an upgrade. I am using Microsoft Edge.

@Constant314 yes. The prices for 4k displays are down and the picture is much nicer;-) Seriously, we did not change the rendering and I guess the SVG images did not change, I suspect the change is due to a change in the way how chromium which is the basis for edge and chrome renders the SVG images. While this is an important problem to be fixed, in the meantime you can try https://chrome.google.com/webstore/detail/math-anywhere/gebhifiddmaaeecbaiemfpejghjdjmhc as suggested in https://www.mediawiki.org/wiki/Extension:Math. Also, note that MathML is on its way into chrome https://www.chromestatus.com/feature/5240822173794304, this will ultimately allow the same experience as with the native MathML extension https://addons.mozilla.org/en-US/firefox/addon/native-mathml/ in Firefox.

Thanks for the reply. It's a minor inconvenience at worst.

Johnrdoe added a subscriber: Johnrdoe.EditedDec 13 2020, 8:46 PM

@Physikerwelt @Aklapper , I also wanted to report this bug, because it's not the first time if come across something like this. Some time ago, the + (plus) symbols were missing the bottom line, like the alternative plus symbol (https://en.wikipedia.org/wiki/Plus_and_minus_signs#Alternative_plus_sign).

I looked if this was still the case, which it kind of is:

Weirdly enough, the shadow that appears when dragging the equation does not have the visual bug. This is also the case for the - (minus) symbol:

I'm using version 87.0.4280.88 64bit of chrome. Like said before, it's a minor inconvenience, but I wanted to give some extra info in case it helps.

A couple of more use cases: I checked the Wikipedia App running on iPhone and on an Android Tablet. The App does not appear to have this issue. Neither does Safari running on an iPhone when I access the mobile site.

Heidji added a subscriber: Heidji.Jan 1 2021, 4:31 PM

To me it's more than a minor inconvenience, since I had lost a whole day wondering why the wiki article on the Poisson Distribution shows that the exponential is positive while it had a (-) sign before its exponent.

Aklapper closed this task as Invalid.Jan 1 2021, 5:22 PM

Please contact the Chrome/Chromium developers (or use another browser).
In my understanding, there is nothing we can do/fix on our side hence closing this ticket.
See also T269222#6681319.

Kipod added a subscriber: Kipod.EditedJan 1 2021, 9:52 PM

Please contact the Chrome/Chromium developers (or use another browser).
In my understanding, there is nothing we can do/fix on our side hence closing this ticket.
See also T269222#6681319.

there is something we can do.

the chrome bug is for SVG rendering. previous versions of chrome did not have this issue, and it was reported, so we can hope that at some future version the bug will be fixed.

in the meantime, one thing we can do is to change the default for math display to PNG.
this is a step backward, that can be reversed once the chrome bug is fixed, and it will let all readers view the formulas correctly.

a bit more ambitious thing we could do is to figure out how not to generate SVG which invokes this elusive bug, and modify the latex => svg machinery to create more "innocent" SVG.

i don't think this task should be closed.

peace

This task is closed as per https://www.mediawiki.org/wiki/Bug_management/Bug_report_life_cycle because the real problem to fix cannot be fixed by Wikimedia.

@Kipod: Regarding potential temporary workarounds, please feel free to file a new task requesting...something™, however sharing some food for thoughts:
Would changing the default for math display to PNG be done for all and any anonymous users? Or those anonymous users that we think might be using a Chrome based browser (if we assumed that user agent information is still reliable)? What to do for non-anonymous users? Would we ignore their personal preference (that sounds rude) and show them PNG files though they asked not to show PNG files, so we will just get more bug reports ("My preferences say MathML with SVG or PNG fallback and my browser is new enough, why do I get PNG files? It's a bug!")? Or would we change their personal preferences under Special:Preferences 🡒 Appearance 🡒 Math without asking them (that sounds rude too)? When and how would we stop working around? If we went for the latter, would we change preferences of people yet again?
Workarounds sometimes aren't that easy. :)

Izno added a subscriber: Izno.Jan 2 2021, 5:59 AM

I believe the upstream is https://bugs.chromium.org/p/chromium/issues/detail?id=1159852 , which looks like it will be fixed for most Chromium users soon.