bb no longer functional

12 views
Skip to first unread message

Marc Grober

unread,
Dec 3, 2008, 2:34:15 PM12/3/08
to asci...@googlegroups.com
I just noticed that I may also be suffering some display
issues.... On XP with the MIT and STIX beta fonts
installed I am no longer getting any results from bb or bbb;
the former seems to produce no results and the latter a chop.

David

unread,
Dec 3, 2008, 10:05:07 PM12/3/08
to ASCIIMath
If I remember from when I first played with FF3 with the STIX fonts,
bbb works for R and C and a couple other common letters, but not for
the rest. I can't remember if this was because of the fonts, or
because ASCIIMathML uses character lists mapped to the MIT fonts,
which are not equivalent to the unicode values which the STIX font
uses. I think I tried changing to the unicode values, but it still
didn't work. All I remember is that I couldn't figure out a good way
to make it work, so I gave up :)

Wikipedia hints at why C and R might work while others don't:
"In Unicode, a few of the more common blackboard bold characters (C,
H, N, P, Q, R and Z) are encoded in the Basic Multilingual Plane (BMP)
in the Letterlike Symbols (2100–214F) area, named DOUBLE-STRUCK
CAPITAL C etc. The rest, however, are encoded outside the BMP, from U
+1D538 to U+1D550 (uppercase, excluding those encoded in the BMP), U
+1D552 to U+1D56B (lowercase) and U+1D7D8 to U+1D7E1 (digits). Being
outside the BMP, these are relatively new and not widely supported."

-David L
>  smime.p7s
> 4KViewDownload

Paulo Soares

unread,
Dec 4, 2008, 12:15:15 PM12/4/08
to ASCIIMath
I've also been looking into this problem and I found this wiki that
supports MathML:

http://xbeta.org/wiki/show/itex+sizes+and+styles

In the test case all characters are shown with the STIX fonts in
Firefox. Does anyone know how they do it?

--
Paulo Soares
>  smime.p7s
> 4KExibirDownload

frouze

unread,
Dec 4, 2008, 1:04:02 PM12/4/08
to ASCIIMath
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>&#55349;&#56632;</mo>
<mo>&#55349;&#56633;</mo>
<mo>&#8450;</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
&#55349; is an invalid one. He's not able to consider &#55349;&#56632;
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>&#1D538;</mo>
<mo>&#1D539;</mo>
<mo>&#8450;</mo>
</mrow>
</mstyle>
</mstyle>
</math>

But it don't work for the moment. I tried to replace "\uD835\uDD38"
into "&#1D538;" in the LMbbb table described in my solution 2, but
it's parsed by the XML DOM and the result is <mo>&amp;#1D538;</mo>
instead of <mo>&#1D538;</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.

frouze

unread,
Dec 4, 2008, 1:30:36 PM12/4/08
to ASCIIMath
Hi Paulo,

I just have tested the wiki page you talked about. it's not well
displayed under MSIE. The solution AsciiMathML modified like i
discribe in my previous message does. So the code behind the wiki
intégrate directly the good unicode entities (in 1D400-145FF) without
distonction between browsers like AsciiMathMl does.

Franck

Paulo Soares

unread,
Dec 4, 2008, 4:50:35 PM12/4/08
to ASCIIMath
Hi Franck,

from what I read somewhere, the authors of that wiki don't care much
about MSIE (as I don't).
I've tried your second solution with good results. However, mathbf
does not yet produce bold characters.

Regarding the problem you've talked about, did you tried this:

<math xmlns="http://www.w3.org/1998/Math/MathML">
<mstyle fontfamily="serif">
<mstyle mathvariant="double-struck">
<mrow>
<mo>&#x1D538;</mo>
<mo>&#x1D539;</mo>
<mo>&#8450;</mo>
</mrow>
</mstyle>
</mstyle>
</math>

It worked well in Linux Ubuntu + firefox 3 + Stix fonts.
If you manage to improve your solution please let me know.

Cheers,
--
Paulo Soares

frouze

unread,
Dec 5, 2008, 2:26:28 AM12/5/08
to ASCIIMath
Hi Paulo

Yes you'r right, mathbf has no effect over any of the 1Dxxx
characters. thoses characters also exists in bold style as you can see
here :
http://www.unicode.org/charts/PDF/U1D400.pdf

but it would probably be more difficult to swap from one unicode
character to another just with mathbf.


about my problem, i already have manually tested <mo>&#x1D538;</mo>
instead of <mo>>&#55349;&#56632;</mo> but i don't have found the way
to produce tihis code with the js. when i put "&#x1D538;" in the LMbbb
array and use the string contenation, it produces the following string
<mo>&amp;#x1D538;</mo>. The '&' seem's to be interpreted by the XML
DOM and encoded in "&amp;" If you know how to produce strictly le
<mo>&#x1D538;</mo> string it would be very nice for me.

Franck

David

unread,
Dec 5, 2008, 12:21:46 PM12/5/08
to ASCIIMath
Hi frouze

Thanks for your work on this. I tried your second solution, and it
worked great in IE and FF3. In FF2 w/ MIT fonts, the non-special
characters like A and B did not display double-struck, they displayed
like a plain A and B.

For what it's worth, here's my screenshots: http://www.imathas.com/mathbbtest.gif

-David L

PS If you ever get an ASCIIMathML to OpenOffice conversion working, I
would be very interested in it :)

frouze

unread,
Dec 6, 2008, 2:55:58 PM12/6/08
to ASCIIMath
Hi David,

It"s strange. I alos have a PC with FF2 and MIT fonts and every
character is well displaied. It could be interesting to know what is
the difference between our two configurations.

Franck

Marc Grober

unread,
Dec 6, 2008, 8:03:00 PM12/6/08
to asci...@googlegroups.com
This is what my FF 3.0.4 Mathfont family looks like now, with both stix
and MIT installed and this is the only place that the STIX fonts are
installed

font.mathfont-family;STIXNonUnicode, STIXSize1, STIXGeneral, Symbol,
DejaVu Sans, Cambria Math

Maybe reordering? I also see that there are only three of the STIX fonts
referenced.

> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google Groups "ASCIIMath" group.
> To post to this group, send email to asci...@googlegroups.com
> To unsubscribe from this group, send email to asciimath+...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/asciimath?hl=en
> -~----------~----~----~----~------~----~------~--~---
>
>

frouze

unread,
Dec 8, 2008, 3:04:29 AM12/8/08
to ASCIIMath
On one PC with only FF2 and MIT fonts i have

font.mathfont-family = CMSY10, CMEX10, Math1, Math2, Math4, MT Extra,
Symbol


On another PC with both FF2+MIT fonts and FF3+Stix fonts i have in
FF2

font.mathfont-family = CMSY10, CMEX10, Math1, Math2, Math4, MT Extra,
Symbol

and in ff3
font.mathfont-glyph-tables = STIXNonUnicode, STIXSize1, Standard
Symbol L, Symbol

and mathbb are well displaied in each PC and instance of FF.

Franck

David

unread,
Dec 8, 2008, 11:29:36 AM12/8/08
to ASCIIMath
I used my IE6 Virtual PC platform to ensure it was a clean install.
Installed the latest FF2 and use the font installer from the Mozilla
site. I do not have Mathplayer installed on this virtual machine.

I do not have any font.mathfont entry in the about:config page.
Looking in the installed fonts, all the fonts you listed below are on
the machine.

-David L

Marc Grober

unread,
Dec 8, 2008, 1:10:57 PM12/8/08
to asci...@googlegroups.com
This gets curiouser and curiouser.....

in my FF 3.0.4 with stix and mit fonts I deleted my
mathfont.family value and created (there wasn't one) and
copied over frank's glyph-table value (though was that
"Standard Symbol L" or "Standard, Symbol L" and then went to

http://www1.chapman.edu/~jipsen/mathml/asciimathsyntax.html
to test bbb and still get the chop for bbb, cc and fr....

zelhar

unread,
Dec 25, 2008, 3:07:31 PM12/25/08
to ASCIIMath
Greetings,

I use ff3 on Ubuntu, and I tried to fix this problem using method 2,
but it didn't work. I use ASCIImathML version 2.1 (oct 2008). There
are no vars LMcal,LMfrk, LMbbb, there are only AMcal, AMfrk, AMbbb, so
i added the three missing vars as mentioned.

I don't know to program in javascript so maybe I made some syntax
error? Here is the modification I did to the "codes variables":
AROUND LINE #690:
for (var j=0; j<st.length; j++)
/*The 2 IF bellow was replaced with the if and else
if*/
/*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 +
symbol.codes[st.charCodeAt(j)-65];
else if (st.charCodeAt(j)>96 && st.charCodeAt(j)<123)
newst = newst +
symbol.codes[st.charCodeAt(j)-71];
/*END OF EDIT*/
else newst = newst + st.charAt(j);


AND AGAIN, AROUND LINE #1820:
for (var j=0; j<st.length; j++)
/*The 2 IF bellow was replaced with the if and else
if*/
/*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 +
symbol.codes[st.charCodeAt(j)-65];
else if (st.charCodeAt(j)>96 && st.charCodeAt(j)<123)
newst = newst +
symbol.codes[st.charCodeAt(j)-71];
/*END OF EDIT*/
else newst = newst + st.charAt(j);
>  smime.p7s
> 4KViewDownload

zelhar

unread,
Dec 29, 2008, 7:17:25 AM12/29/08
to ASCIIMath
To which versions of ASCIIMathML.js does the fix apply? Moreover I
want to add that even when I change the mathfonts in the config file
to the old mathematica or tex fonts, cc,bbb type fonts are still not
displayed, any ideas why ? I also noticed that when I change the
normal fonts (that is the serif, sans-serif) fonts in my browser, the
fonts of the parameters of mathml formulas change accordingly, is that
supposed to be so ?

I am sorry if I posted irrelevant info,

~Happy Holidays to everyone.

zelhar

unread,
Dec 29, 2008, 8:08:38 AM12/29/08
to ASCIIMath
Last update: The fix WORKS, I changed the vars AMcal.... and have not
added any new ones.

frouze

unread,
Dec 29, 2008, 3:32:50 PM12/29/08
to ASCIIMath
The patch i made was on version "2.0.1 Sept 27, 2007". In fact i did
not noticed that Peter has modified it few month ago.

Franck
Reply all
Reply to author
Forward
0 new messages