File:
[LON-CAPA] /
loncom /
html /
adm /
jsMath /
jsMath-fallback-mac-mozilla.js
Revision
1.1:
download - view:
text,
annotated -
select for diffs
Fri Feb 25 04:57:49 2005 UTC (19 years, 5 months ago) by
albertel
Branches:
MAIN
CVS tags:
version_2_0_X,
version_2_0_2,
version_2_0_1,
version_2_0_0,
version_1_99_3,
version_1_99_2,
version_1_99_1_tmcc,
version_1_99_1,
version_1_99_0_tmcc,
version_1_99_0,
HEAD
- adding jsMath to repository
1: /*
2: * jsMath-fallback-mac-mozzilla.js
3: *
4: * Part of the jsMath package for mathematics on the web.
5: *
6: * This file makes changes needed by Mozilla-based browsers on the Mac
7: * for when the TeX fonts are not available.
8: *
9: * ---------------------------------------------------------------------
10: *
11: * jsMath is free software; you can redistribute it and/or modify
12: * it under the terms of the GNU General Public License as published by
13: * the Free Software Foundation; either version 2 of the License, or
14: * (at your option) any later version.
15: *
16: * jsMath is distributed in the hope that it will be useful,
17: * but WITHOUT ANY WARRANTY; without even the implied warranty of
18: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19: * GNU General Public License for more details.
20: *
21: * You should have received a copy of the GNU General Public License
22: * along with jsMath; if not, write to the Free Software
23: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24: */
25:
26:
27:
28: /********************************************************************
29: *
30: * Fix the default non-TeX-font characters to work with Mozilla
31: *
32: */
33:
34: jsMath.UpdateTeXfonts({
35: cmmi10: {
36: // '41': // leftharpoondown
37: // '43': // rightharpoondown
38: '44': {c: '<SPAN STYLE="position:relative; top:.15em; margin-right:-.1em; margin-left:-.2em">˓</SPAN>'},
39: '45': {c: '<SPAN STYLE="position:relative; top:.15em; margin-right:-.1em; margin-left:-.2em">˒</SPAN>'},
40: '47': {c: '<SPAN STYLE="font-size:60%">◁</SPAN>'},
41: // '92': // natural
42: '126': {c: '<SPAN STYLE="position:relative; left: .3em; top: -.7em; font-size: 50%">→</SPAN>'}
43: },
44:
45: cmsy10: {
46: '0': {c: '–', tclass: 'normal'},
47: '11': {c: '<SPAN STYLE="font-size: 70%">◯</SPAN><SPAN STYLE="position:relative; margin-left:-.5em; top:.1em; margin-right:.3em">/</SPAN>', tclass: 'normal'},
48: '42': {c: '⥣'}, '43': {c: '⥥'},
49: '48': {c: '<SPAN STYLE="font-size: 133%; margin-right: -.75em; position: relative; top:.4em">′</SPAN>', tclass: 'normal'},
50: '93': {c: '∪<SPAN STYLE="font-size: 50%; margin-left:-1.3em; position: relative; top:-.3em; margin-right:.6em">+</SPAN>'},
51: '104': {c: '<SPAN STYLE="position:relative; top:.15em; margin-left:-.6em">〈</SPAN>'},
52: '105': {c: '<SPAN STYLE="position:relative; top:.15em; margin-right:-.6em">〉</SPAN>'},
53: '109': {c: '⥣<SPAN STYLE="position:relative; top:.1em; margin-left:-1em">⥥</SPAN>'}
54: //, '116': // sqcup
55: // '117': // sqcap
56: // '118': // sqsubseteq
57: // '119': // sqsupseteq
58: },
59:
60: cmex10: {
61: '10': {c: '<SPAN STYLE="position:relative; top:.1em; margin-left:-.6em">〈</SPAN>'},
62: '11': {c: '<SPAN STYLE="position:relative; top:.1em; margin-right:-.6em">〉</SPAN>'},
63: '14': {c: '/'}, '15': {c: '\\'},
64: '28': {c: '<SPAN STYLE="position:relative; top:.1em; margin-left:-.6em">〈</SPAN>'},
65: '29': {c: '<SPAN STYLE="position:relative; top:.1em; margin-right:-.6em">〉</SPAN>'},
66: '30': {c: '/'}, '31': {c: '\\'},
67: '42': {c: '<SPAN STYLE="position:relative; top:.1em; margin-left:-.6em">〈</SPAN>'},
68: '43': {c: '<SPAN STYLE="position:relative; top:.1em; margin-right:-.6em">〉</SPAN>'},
69: '44': {c: '/'}, '45': {c: '\\'},
70: '46': {c: '/'}, '47': {c: '\\'},
71: '68': {c: '<SPAN STYLE="position:relative; top:.1em; margin-left:-.6em">〈</SPAN>'},
72: '69': {c: '<SPAN STYLE="position:relative; top:.1em; margin-right:-.6em">〉</SPAN>'},
73: // '70': // sqcup
74: // '71': // big sqcup
75: '72': {ic: .194}, '73': {ic: .444},
76: '82': {tclass: 'bigop1cx', ic: .15}, '90': {tclass: 'bigop2cx', ic:.6},
77: '85': {c: '∪<SPAN STYLE="font-size: 50%; margin-left:-1.3em; position: relative; top:-.3em; margin-right:.6em">+</SPAN>'},
78: '93': {c: '∪<SPAN STYLE="font-size: 50%; margin-left:-1.3em; position: relative; top:-.3em; margin-right:.6em">+</SPAN>'}
79: }
80:
81: });
82:
83: jsMath.UpdateStyles({
84: '.symbol': 'font-family: Osaka',
85: '.arrow1': 'font-family: Osaka; position: relative; top: .125em; margin: -1px',
86: '.arrow2': 'font-family: AppleGothic; font-size: 100%; position:relative; top: .11em; margin:-1px',
87: '.bigop1': 'font-family: AppleGothic; font-size: 110%; position:relative; top: .9em; margin:-.05em',
88: '.bigop1b': 'font-family: Osaka; font-size: 140%; position: relative; top: .8em; margin:-.1em',
89: '.bigop1c': 'font-family: AppleGothic; font-size: 125%; position:relative; top: .85em; margin:-.3em',
90: '.bigop1cx':'font-family: Apple Chancery; font-size: 125%; position:relative; top: .7em; margin:-.1em',
91: '.bigop2': 'font-family: AppleGothic; font-size: 175%; position:relative; top: .85em; margin:-.1em',
92: '.bigop2b': 'font-family: Osaka; font-size: 200%; position: relative; top: .75em; margin:-.15em',
93: '.bigop2c': 'font-family: AppleGothic; font-size: 300%; position:relative; top: .75em; margin:-.35em',
94: '.bigop2cx':'font-family: Apple Chancery; font-size: 250%; position:relative; top: .7em; margin-left:-.1em; margin-right:-.2em',
95: '.delim1b': 'font-family: Times; font-size: 150%; position:relative; top:.8em; margin:.01em',
96: '.delim2b': 'font-family: Times; font-size: 210%; position:relative; top:.8em; margin:.01em',
97: '.delim3b': 'font-family: Times; font-size: 300%; position:relative; top:.75em; margin:.01em',
98: '.delim4b': 'font-family: Times; font-size: 400%; position:relative; top:.725em; margin:.01em',
99: });
100:
101:
102: /*
103: * replace \not and \joinrel with better dimensions
104: */
105:
106: jsMath.Macro('not','\\mathrel{\\rlap{\\kern 3mu/}}');
107: jsMath.Macro('joinrel','\\mathrel{\\kern-3mu}');
108:
109:
110: /*
111: * Reinstall the styles
112: */
113:
114: jsMath.InitStyles();
115:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>