搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

Math formulas not displaying correctly in some instances of Firefox (but not all)

  • 15 回覆
  • 1 有這個問題
  • 1 次檢視
  • 最近回覆由 Chris

more options

Recently if I browse pages with maths forumulas they do not display coorectly, instead the underlying Tex or LateX code is shown.

I have several computers and I use Firefox on all of them, but curiously this problem does not happen on all of them, some show formulae correctly.

The image attached shows an example at Wikipedia - Lagrange point . The upper portion is Chrome and displays correctly, the lower portion is Firefox where the formyuals do not display correctly.

This is only started recently. Previously I had no issues with formulas displaying on any pf my computers, for many years.

Recently if I browse pages with maths forumulas they do not display coorectly, instead the underlying Tex or LateX code is shown. I have several computers and I use Firefox on all of them, but curiously this problem does not happen on all of them, some show formulae correctly. The image attached shows an example at [https://en.wikipedia.org/wiki/Lagrange_point Wikipedia - Lagrange point] . The upper portion is Chrome and displays correctly, the lower portion is Firefox where the formyuals do not display correctly. This is only started recently. Previously I had no issues with formulas displaying on any pf my computers, for many years.

被選擇的解決方法

Are you logged in to Wikipedia as that could be a possible cause for seeing TeX code ? See Math:

從原來的回覆中察看解決方案 👍 1

所有回覆 (15)

more options

Not sure why the image didn't load, I'll upload it again here

more options

I have several versions of Firefox and had no problem.


[v56+] Type about:preferences#general<enter> in the address box. Under fonts and colors, press the Advanced button. Scroll to the bottom, turn on Allow Web Sites To Choose Their Own.

Make sure you haven't enabled a High Contrast theme in the OS settings.

  • We have seen reports that this can be caused by a problem with fonts like Roboto or Helvetica that

you have installed locally and that might be corrupted or are missing some variants. Also, make sure you allow pages to choose their own fonts and that you do not block remote (downloadable) fonts.

  • If you use uBlock Origin make sure not to "block remote fonts".
more options

Make sure you are not blocking content.

https://support.mozilla.org/en-US/kb/enhanced-tracking-protection-firefox-desktop also see https://blog.mozilla.org/security/2021/03/23/introducing-smartblock/

https://support.mozilla.org/en-US/kb/smartblock-enhanced-tracking-protection


Diagnose Firefox issues using Troubleshoot(Safe) Mode {web link}

A small dialog should appear. Click Start In Troubleshoot(Safe) Mode (not Refresh). Is the problem still there?


Many site issues can be caused by corrupt cookies or cache.

Warning ! ! This will log you out of sites you're logged in to. You may also lose any settings for that website.

more options

Websites like Wikipedia can display a formula as an automatically generated SVG image where the MathML code is available in the 'alt' attribute. In your case you seem to see the 'alt' attribute, so it looks that the image is blocked.

You can right-click and select "Inspect" to open the built-in Inspector with this element selected.

See also:


If you use extensions ("3-bar" menu button or Tools -> Add-ons -> Extensions) that can block content (Adblock Plus, NoScript, DuckDuckGo PE, Disconnect, Ghostery, Privacy Badger, uBlock Origin) always make sure such extensions do not block content.

more options

Thanks for all the helpful clues.

I opened the Inspector on a formula exhibiting the issue, but I'm not sure what to do next - see the image attached.

Here's a different page on Stack Exchange that exhibits the same issue for me. Look at the second comment by R B-J. Do you see proper formulae within the paragraph, or $ signs?

The only Add-On I have is LastPass, on all my Firefox instances. I keep them all up to date with latest Firefox

I'm considering deleting all my cookies and Firefox cache next.

TIA

由 Chris 於 修改

more options

You need to expand the 'dd' tag and its content to see the image. I've added a screenshot that shows the MathML image and the fallback SVG image next to each other, so you can see that Firefox supports both representations.

more options

OK making progress. See the HTML expansions on two computers attached, one working one not. The expansions are different but I'm short on expertise ... what does this all mean ? :-)

由 Chris 於 修改

more options

That is weird as you appear to be missing a lot code.

Are you using content blocking extensions that could be blocking content ?

If you use extensions ("3-bar" menu button or Tools -> Add-ons -> Extensions) that can block content (Adblock Plus, NoScript, DuckDuckGo PE, Disconnect, Ghostery, Privacy Badger, uBlock Origin) always make sure such extensions do not block content.

Firefox shows a purple shield instead of a gray shield at the left end of the location/address bar in case Enhanced Tracking Protection is blocking content. You can click shield icon for more detail and possibly disable the protection. You can check the Web Console for relevant-looking messages about blocked content.

more options

LastPass is my only active extension. I did use DuckDuckGo some time back and Tab Manager extension recently so they are still listed, but disabled.

I clicked on the shield at left of URL bar and saw "Enhanced Tracking Protection" was ON. I turned it off and refreshed the page, but no change.

more options

In the Inspector window press the Network tab and reload a page. Then filter out Images. Try to examine the list of images on this page.

more options

Here's the inspector after Network > Reload > Images. Not sure what I'm looking at here

I'm not sure this is about images. Tex or LaTex render mathematics fonts directly AFAIK, no images involved.

由 Chris 於 修改

more options

didn't load the inspector image for some reason ... try again

can't load the image, just circles forever. tried 3 times WTF.

more options

選擇的解決方法

Are you logged in to Wikipedia as that could be a possible cause for seeing TeX code ? See Math:

由 cor-el 於 修改

more options

You can try these steps in case of issues with webpages:

You can reload webpage(s) and bypass the cache to refresh possibly outdated or corrupted files.

  • hold down the Shift key and left-click the Reload button
  • press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
  • press "Command + Shift + R" (Mac)

Clear the Cache and remove the Cookies for websites that cause problems via the "3-bar" Firefox menu button (Settings).

"Remove the Cookies" for websites that cause problems:

  • Settings -> Privacy & Security
    Cookies and Site Data: "Manage Data"

"Clear the Cache":

  • Settings -> Privacy & Security
    Cookies and Site Data -> Clear Data -> [X] Cached Web Content -> Clear

Start Firefox in Troubleshoot Mode to check if one of the extensions ("3-bar" menu button or Tools -> Add-ons -> Extensions) or if hardware acceleration or userChrome.css is causing the problem.

  • switch to the DEFAULT theme: "3-bar" menu button or Tools -> Add-ons -> Themes
  • do NOT click the "Refresh Firefox" button on the Troubleshoot Mode start window
more options

Good suggestion @cor-el, many thanks. Indeed the issue only appears if I'm logged into Wikipedia. Now at least I have an easy workaround I'll go ask Wikipedia community from here on... thanks all for your assistance