Open kasperpeulen opened 10 years ago
Thanks. I think this is due to the fonts not having appropriate glyphs (which is odd for Latin Modern at least), so this was missed when those fonts were added in 2.3.
I'm guessing MathJax should default to mathvariant="script"
in that case (given that Unicode identifies calligraphic and script). When we implement font fallbacks, we can load another font or do something smarter.
Is there any update on this? \mathcal
does not work with Gyre-Pagella
and Gyre-Termes
either
The source of the problem is that, while TeX has two forms of "script" characters, \mathcal
and \mathscr
, Unicode only has one script form in the Math Alphanumeric Symbols block, and MathML (the format used internally by MathJax) only has one script variant. Because the STIX fonts put the \mathscr
characters in the Math Alphanumeric Symbols script positions, it put the \mathcal
characters in the Private Use Area, which was really the only alternative. The Asana web font also is organized that way, but the other web fonts like LatinModern and Gyre-Pagella only include one script form each. In these cases, the script form was mapped to \mathscr
rather than \mathcal
(to correspond to MathML's script math variant, since MathML doesn't have a calligraphic variant). For LatinModern and Neo-Euler, the script form more closely resembles the TeX calligraphic font than the script font, so perhaps it would have been better to use \mathcal
in those cases, but of consistency , we always used \mathscr
.
So you could use \mathscr
instead of \mathcal
if you are using those fonts. Alternatively, you could redefine \mathcal
via \def\mathcal{\mathscr}
or its equivalent in the MathJax macros configuration in order to make \mathcal
produce the script form.
In MathJax version 3, it will be easier to mix fonts to add missing characters, but that isn't the case for MathJax version 2. It is unlikely that additional work will be done on the version 2 fonts before version 3 is released.
Thanks for the explanation. For now, mapping \mathcal
to \mathscr
works and that is good enough for me.
Related: #3045
For both webfonts (Latin-Modern and Neo-Euler) \mathcal doesn't seem to work. It just shows a regular A. While \mathscr looks exactly like how \mathcal shoud look.