Annotation of loncom/html/adm/jsMath/jsMath-mozilla.js, revision 1.2
1.1 albertel 1: /*
2: * jsMath-mozilla.js
3: *
4: * Part of the jsMath package for mathematics on the web.
5: *
6: * This file makes changes needed for use with Mozilla-based
7: * browsers on any platform
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: * Mozilla has its own character mapping mechanism for accessing
31: * the TeX fonts, so we replace the values in our internal
32: * font map to point to these
33: */
34:
1.2 ! albertel 35: jsMath.Update.TeXfontCodes({
1.1 albertel 36: cmr10: [
37: 'Γ', 'Δ', 'Θ', 'Λ',
38: 'Ξ', 'Π', 'Σ', 'Υ',
39: 'Φ', 'Ψ', 'Ω', 'ff',
40: 'fi', 'fl', 'ffi', 'ffl',
41:
42: 'ı', '', '̀', '́',
43: '̌', '̆', '̅', '̊',
44: '̧', 'ß', 'æ', 'œ',
45: 'ø', 'Æ', 'Œ', 'Ø',
46:
47: '̷', '!', '”', '#',
48: '$', '%', '&', ''',
49: '(', ')', '*', '+',
50: ',', '-', '.', '/',
51:
52: '0', '1', '2', '3', '4', '5', '6', '7',
53: '8', '9', ':', ';', '¡', '=', '¿', '?',
54:
55: '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
56: 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
57:
58: 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
59: 'X', 'Y', 'Z', '[', '“', ']', '̂', '̇',
60:
61: '‘', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
62: 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
63:
64: 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
65: 'x', 'y', 'z', '–', '—', '̋', '̃', '̈'
66: ],
67:
68: cmmi10: [
69: 'Γ', 'Δ', 'Θ', 'Λ',
70: 'Ξ', 'Π', 'Σ', 'Υ',
71: 'Φ', 'Ψ', 'Ω', 'α',
72: 'β', 'γ', 'δ', 'ε',
73:
74: 'ζ', 'η', 'θ', 'ι',
75: 'κ', 'λ', 'μ', 'ν',
76: 'ξ', 'π', 'ρ', 'σ',
77: 'τ', 'υ', 'φ', 'χ',
78:
79: 'ψ', 'ω', 'ɛ', 'ϑ',
80: 'ϖ', 'ϱ', 'ς', 'ϕ',
81: '↼', '↽', '⇀', '⇁',
82: '', '', '▹', '◃',
83:
84: '0', '1', '2', '3', '4', '5', '6', '7',
85: '8', '9', '.', ',', '<', '/', '>', '⋆',
86:
87: '∂', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
88: 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
89:
90: 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
91: 'X', 'Y', 'Z', '♭', '♮', '♯', '⌣', '⌢',
92:
93: 'ℓ', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
94: 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
95:
96: 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
97: 'x', 'y', 'z', 'ı', '', '℘', '⃗', '̑'
98: ],
99:
100: cmsy10: [
101: '−', '·', '×', '⋆',
102: '÷', '⋄', '±', '∓',
103: '⊕', '⊖', '⊗', '⊘',
104: '⊙', '○', '∘', '∙',
105:
106: '≃', '≍', '⊆', '⊇',
107: '≤', '≥', '≼', '≽',
108: '∼', '≅', '⊂', '⊃',
109: '≪', '≫', '≺', '≻',
110:
111: '←', '→', '↑', '↓',
112: '↔', '↗', '↘', '≂',
113: '⇐', '⇒', '⇑', '⇓',
114: '⇔', '↖', '↙', '∝',
115:
116: '′', '∞', '∈', '∋',
117: '△', '▽', '̸', '',
118: '∀', '∃', '¬', '∅',
119: 'ℜ', 'ℑ', '⊤', '⊥',
120:
121: 'ℵ', '', 'ℬ', '',
122: '', 'ℰ', 'ℱ', '',
123: 'ℋ', 'ℐ', '', '',
124: 'ℒ', 'ℳ', '', '',
125:
126: '', '', 'ℛ', '',
127: '', '', '', '',
128: '', '', '', '∪',
129: '∩', '⊎', '∧', '∨',
130:
131: '⊢', '⊣', '⌊', '⌋',
132: '⌈', '⌉', '{', '}',
133: '〈', '〉', '∣', '∥',
134: '↕', '⇕', '∖', '≀',
135:
136: '√', '∐', '∇', '∫',
137: '⊔', '⊓', '⊑', '⊒',
138: '§', '†', '‡', '¶',
139: '♣', '♢', '♡', '♠'
140: ],
141:
142: cmex10: [
143: '', '', '', '',
144: '', '', '', '',
145: '', '', '', '',
146: '', '', '', '',
147:
148: '', '', '', '',
149: '', '', '', '',
150: '', '', '', '',
151: '', '', '', '',
152:
153: '', '', '', '',
154: '', '', '', '',
155: '', '', '', '',
156: '', '', '', '',
157:
158: '', '', '', '',
159: '', '', '', '',
160: '', '', '', '',
161: '', '', '', '',
162:
163: '', '', '', '',
164: '', '', '', '',
165: '', '', '', '',
166: '', '', '', '',
167:
168: '', '', '', '',
169: '', '', '', '',
170: '', '', '', '',
171: '', '', '', '',
172:
173: '', '', '', '',
174: '', '', '', '',
175: '', '', '', '',
176: '', '', '', '',
177:
178: '', '', '', '',
179: '', '', '', '',
180: '', '', '', '',
181: '', '', '', ''
182: ]
183: });
184:
185:
186: /*
187: * Adjust a few other characters as well
188: */
189:
1.2 ! albertel 190: jsMath.Update.TeXfonts({
1.1 albertel 191: cmr10: {'20': {c: 'ˇ', tclass: 'normal', w: .3}},
192: cmmi10: {
193: '20': {c: '<I>&kappa</I>', tclass: 'normal'},
194: '58': {c: '.', tclass: 'normal'},
195: '59': {c: ',', tclass: 'normal'},
196: '61': {c: '/', tclass: 'cmr10'}
197: },
198: cmsy10: {
199: '3': {c: '*', tclass: 'normal'},
200: '16': {c: '≍'},
201: '17': {c: '≡', tclass: 'normal'},
202: '25': {c: '≈', tclass: 'normal'},
203: '39': {c: '≃'},
204: '20': {c: '≤', tclass: 'normal'}
205: },
206: cmex10: {'20': {c: '<SPAN STYLE="font-size: 80%"></SPAN>'}},
207: cmti10: {'10': {c: '<I>Ω</I>', tclass: 'normal'}},
208: cmbx10: {'10': {c: '<B>Ω</B>', tclass: 'normal'}}
209: });
210:
211:
212:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>