I confirm that the problem comes from AsciiMathML. I just have working
on it yesturday. AsciiMathml uses a character list in MIT fonts. Just
have have a look to the following pdf file :
http://www.unicode.org/charts/PDF/UE000.pdf
some characters are still working because they are in the Letterlike
Symbols (2100–214F) block and the other one are in
1D400-1D5FF block.
for \mathcal : 1D49C-1D4CF (A-Z and a-z)
for \mathbb : 1D538-1D56B (A-Z and a-z)
for \mathfrak : 1D56C-1D59F (A-Z and a-z)
I have successfully tested 2 solutions that produces the same mathml
from AsciiMathML.
In the first solution :
Add the following function :
function fixedFromCharCode (codePt) {
if (codePt > 0xFFFF) {
codePt -= 0x10000;
return String.fromCharCode(0xD800 + (codePt >> 10), 0xDC00 +
(codePt & 0x3FF));
}
else {
return String.fromCharCode(codePt);
}
}
This one is able to encode an Unicode character after FFFF
Modify the 6 variables AMcal, AMfrk, AMbbb, LMcal, LMfrk and LMBBB to
replace all codes from EE00-F8FF range to the appropriate code in the
list above (ie: 0xEF8C -> 0x1D538)
Change the 2x2 lines which uses the "codes" variable from the
following js code in comment to this one uncommented :
/* if (st.charCodeAt(j)>64 && st.charCodeAt(j)
<91) newst = newst +
String.fromCharCode(symbol.codes[st.charCodeAt
(j)-65]);*/
if (st.charCodeAt(j)>64 && st.charCodeAt(j)
<91) newst = newst +
fixedFromCharCode(symbol.codes[st.charCodeAt(j)-65]);
second solution : (I have coded this one)
replace the 6 variables AMcal, AMfrk, AMbbb, LMcal, LMfrk with a
string for each character like this :
var LMcal =
["\uD835\uDC9C","\u212C","\uD835\uDC9E","\uD835\uDC9F","\u2130","\u2131","\uD835\uDCA2","\u210B","\u2110","\uD835\uDCA5","\uD835\uDCA6","\u2112","\u2133","\uD835\uDCA9","\uD835\uDCAA","\uD835\uDCAB",
"\uD835\uDCAC","\u211B","\uD835\uDCAE","\uD835\uDCAF","\uD835\uDCB0","\uD835\uDCB1","\uD835\uDCB2","\uD835\uDCB3","\uD835\uDCB4","\uD835\uDCB5",
"\uD835\uDCB6","\uD835\uDCB7","\uD835\uDCB8","\uD835\uDCB9","\u212F","\uD835\uDCBB","\u210A","\uD835\uDCBD","\uD835\uDCBE","\uD835\uDCBF","\uD835\uDCC0","\uD835\uDCC1","\uD835\uDCC2","\uD835\uDCC3",
"\u2134","\uD835\uDCC5","\uD835\uDCC6","\uD835\uDCC7","\uD835\uDCC8","\uD835\uDCC9","\uD835\uDCCA","\uD835\uDCCB","\uD835\uDCCC","\uD835\uDCCD","\uD835\uDCCE","\uD835\uDCCF"];
var LMfrk =
["\uD835\uDD04","\uD835\uDD05","\u212D","\uD835\uDD07","\uD835\uDD08","\uD835\uDD09","\uD835\uDD0A","\u210C","\u2111","\uD835\uDD0D","\uD835\uDD0E","\uD835\uDD0F","\uD835\uDD10","\uD835\uDD11",
"\uD835\uDD12","\uD835\uDD13","\uD835\uDD14","\u211C","\uD835\uDD16","\uD835\uDD17","\uD835\uDD18","\uD835\uDD19","\uD835\uDD1A","\uD835\uDD1B","\uD835\uDD1C","\u2128",
"\uD835\uDD1E","\uD835\uDD1F","\uD835\uDD20","\uD835\uDD21","\uD835\uDD22","\uD835\uDD23","\uD835\uDD24","\uD835\uDD25","\uD835\uDD26","\uD835\uDD27","\uD835\uDD28","\uD835\uDD29","\uD835\uDD2A",
"\uD835\uDD2B","\uD835\uDD2C","\uD835\uDD2D","\uD835\uDD2E","\uD835\uDD2F","\uD835\uDD30","\uD835\uDD31","\uD835\uDD32","\uD835\uDD33","\uD835\uDD34","\uD835\uDD35","\uD835\uDD36","\uD835\uDD37"];
var LMbbb =
["\uD835\uDD38","\uD835\uDD39","\u2102","\uD835\uDD3B","\uD835\uDD3C","\uD835\uDD3D","\uD835\uDD3E","\u210D","\uD835\uDD40","\uD835\uDD41","\uD835\uDD42","\uD835\uDD43","\uD835\uDD44",
"\u2115","\uD835\uDD46","\u2119","\u211A","\u211D","\uD835\uDD4A","\uD835\uDD4B","\uD835\uDD4C","\uD835\uDD4D","\uD835\uDD4E","\uD835\uDD4F","\uD835\uDD50","\u2124",
"\uD835\uDD52","\uD835\uDD53","\uD835\uDD54","\uD835\uDD55","\uD835\uDD56","\uD835\uDD57","\uD835\uDD58","\uD835\uDD59","\uD835\uDD5A","\uD835\uDD5B","\uD835\uDD5C","\uD835\uDD5D",
"\uD835\uDD5E","\uD835\uDD5F","\uD835\uDD60","\uD835\uDD61","\uD835\uDD62","\uD835\uDD63","\uD835\uDD64","\uD835\uDD65","\uD835\uDD66","\uD835\uDD67","\uD835\uDD68","\uD835\uDD69","\uD835\uDD6A","\uD835\uDD6B"];
And modify the 2x2 lines that uses the "codes" variable into :
if (st.charCodeAt(j)>64 &&
st.charCodeAt(j)<91) newst = newst +
symbol.codes[st.charCodeAt(j)-65];
else if (st.charCodeAt(j)>96 &&
st.charCodeAt(j)<123) newst = newst +
symbol.codes[st.charCodeAt(j)-71];
(Here I have added lowercase characters)
These 2 solutions produces the same mathml in fireefox and don't
affect IE.
Ie: for $\mathbb{ABC}$ the mathml produced is :
<math xmlns="
http://www.w3.org/1998/Math/MathML">
<mstyle fontfamily="serif">
<mstyle mathvariant="double-struck">
<mrow>
<mo>��</mo>
<mo>��</mo>
<mo>ℂ</mo>
</mrow>
</mstyle>
</mstyle>
</math>
I have successfully tested this mathml on
Windows + firefox 2
Windows + firefox 3 + Stix fonts
MACOS X+ firefox 3 + Stix fonts
Linux Suse + firefox 3 + Stix fonts
I just have a problem with this mathml. I have downloaded an xsl that
translate mathml into latex an, i'm working on modifying this xsl to
produce a mathml file that OpenOffice can open correctly. And when you
open such a mathml fine into an xml Editor like Oxygen or if you try
to run an xsl over the mathml, it tells you that the character
� is an invalid one. He's not able to consider ��
like a unique character.
In fact I would like to produce the following mathml instead
<math xmlns="
http://www.w3.org/1998/Math/MathML">
<mstyle fontfamily="serif">
<mstyle mathvariant="double-struck">
<mrow>
<mo>D538;</mo>
<mo>D539;</mo>
<mo>ℂ</mo>
</mrow>
</mstyle>
</mstyle>
</math>
But it don't work for the moment. I tried to replace "\uD835\uDD38"
into "D538;" in the LMbbb table described in my solution 2, but
it's parsed by the XML DOM and the result is <mo>&#1D538;</mo>
instead of <mo>D538;</mo>
If you have an idea it would be a good solution.
Franck
PS: i sent this message by email 2 hours ago but it seems not to be
arrived to the google group.