[Previously posted at
http://sourceforge.net/projects/mathjax/forums/forum/948700/topic/3900289]
gongyiliao
2010-10-17 10:06:30 PDT
I found that in the last MathJax. if you type
\mathcal D
it will generate
<mi mathvariant="-tex-caligraphic">D</mi>
If you type
\mathcal D
it will generate
<mi mathvariant="script">D</mi>
It seems nothing wrong with the Tex-MathML converter part of MathJax,
but the CSS part.
Both of above two MathML entities are displayed with "MathJax_Script"
font, but, in fact,
\mathcal D
should be displayed with "MathJax_Caligraphic" but not
"MathJax_Script".
----------
dpvc
2010-10-17 15:41:43 PDT
If you are getting matvariant="-tex-caligraphic" then you are not
using the most up-to-date version of mathjax. That is an error, as
mathvariant="-tex-caligraphic" is not legal MathML, and that error has
been corrected.
Unfortunately, MathML does not have separate mathvariants for what TeX
uses as \mathcal and \mathsrc. There is only mathvariant="script".
Similarly, there are no standard unicode points for the \mathcal font
(only a script font) in the math alphabets in unicode plane 1. So the
NativeMML output processor maps both \mathcal and \mathscr to
mathvariant="script" as the best compromise available option.
The HTML-CSS output processor properly distinguishes between these,
and uses MathJax_Caligraphic for \mathcal and MathJax_Script for
\mathscr, but the native MathML processor doesn't have the ability to
do that since the underlying MathML doesn't have separate variants for
that. The MathML output does not specify the fonts directly. (When
Firefox is used, the NativeMML output jax will provide some CSS to
cause Firefox to use the MathJax fonts for the mathvariants, because
Firefox's MathML implementation doesn't currently implement
mathvariant. That is a temporary fix that likely will be removed in a
future release of MathJax. MathJax's TeX fonts are not intended to be
used in the Native MathML output in general.)
It would be a good idea, however, to add something like class="tex-
caligraphic" to the <mi> that come from \mathcal so that CSS could be
used to force the use of a different font. That is something that
could be done.
Davide
----------
gongyiliao
2010-10-22 18:01:00 PDT
For mathml fonts problem, I think the best solution is convert mathscr
and mathcal symbols (Latin) to corresponding glyphs defined in Unicode
standard.
The mathscr symbols do have the corresponding Unicode glyphs: U+1D49C
to U+1D4CF;
and mathcal: U+1D4D0 to U+1D503.
----------
dpvc
2010-10-23 06:06:58 PDT
That would work except for one thing: U+1D4D0 to U+1D503 is actually
bold mathscr not mathcal (see theunicode math alphabet glyph chart).
To my knowledge there is no mathcal glyphs defined in unicode. The
STIX fonts have them in the user-defined area, but this is non-
standard.
Davide