12

The MathJax rendering for mathcal is not working correctly on my computer. Instead of a cursive-style letter for \mathcal, MathJax renders a square. However, other MathJax rendering is unaffected.

  • macOS v13.1 (Ventura. 22C65)
  • Chrome version 108.0.5359.98 (official build) (arm64)

Is this a bug? Are there steps I can take to get math typesetting to display correctly on Stack Exchange?

Example image of bug

2
  • 6
    FYI, basically the same issue was asked about almost a month ago on the Mathematics meta site at Why using \mathcal command produce a square?. Note that The Amplitwist's comment there starts with "This bug started appearing only after I updated to macOS Ventura, so I suppose it has something to do with that." Since your OS is MacOS, perhaps this is related to what's happening on your machine. Dec 17, 2022 at 23:13
  • 4
    This is a problem caused by MathJax not accessing/not having access to the required glyph in the right font. This is a bug I think (as it also arose for me when I updated to macOS Ventura) but it can be circumvented by right-clicking on the math, and selecting Math Settings > Math Renderer > Common HTML (instead of HTML-CSS).
    – postylem
    Jan 2 at 19:01

2 Answers 2

14

The user postylem's comment completely fixed this problem for me.

This is a problem caused by MathJax not accessing/not having access to the required glyph in the right font. This is a bug I think (as it also arose for me when I updated to macOS Ventura) but it can be circumvented by right-clicking on the math, and selecting Math Settings > Math Renderer > Common HTML (instead of HTML-CSS).

8

The HTML-CSS renderer in MathJax v2 tries to detect whether there are local copies of the MathJax or STIX fonts and will use those in place of web-based fonts if they are available (to reduce the amount of information that a user must download over the network). Apple has shipped the STIX1 fonts as part of Mac OS and iOS for a number years, but in Ventura, they have switched to the STIX2 fonts. These are packaged differently (the STIX1 fonts came in 29 separate fonts, but STIX2 combines these into 5, one each for regular, bold, italic, and bold-italic, plus a math font). In order to try to keep things backward compatible, Apple still allows access to the STIX1 fonts by (what appears to be) mapping the original 29 fonts into the new 5 fonts. This is largely effective, but not completely. In particular, the calligraphic characters are not part of the Unicode standard, and so STIX includes them in the Private Use Are (PUA) of their fonts. Unfortunately, the location in the PUA Changed between STIX1 and STIX2, and Apple mapping from the old fonts to the new ones doesn't take that into account.

The upshot is, when MathJax asks the local system whether STIXGeneral-Regular (the old STIX1 font) is available, Ventura says "yes" and MathJax believes that the 29 original fonts are there, and tries to use them in the layout that the original fonts actually have. But in Ventura, the calligraphic characters are not in the same location, so you get the missing character symbol instead.

This issue only affects the HTML-CSS output, since it is the only one that uses local STIX fonts. So if you switch to the CommonHTML or SVG output (using the MathJax contextual menu if you are a user, or changing the configuration file if you manage the website), or configuring MathJax to not look for local STIX fonts, then that should show these characters as they should be. Also, version 3, and the upcoming version 4, doesn't use local STIX fonts, and so updating to a current version of MathJax would also resolve the issue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .