2 * jsMath-BaKoMa-fonts.js
4 * Part of the jsMath package for mathematics on the web.
6 * This file makes changes needed to use the BaKoMa fonts and
9 * ---------------------------------------------------------------------
11 * Copyright 2004-2007 by Davide P. Cervone
13 * Licensed under the Apache License, Version 2.0 (the "License");
14 * you may not use this file except in compliance with the License.
15 * You may obtain a copy of the License at
17 * http://www.apache.org/licenses/LICENSE-2.0
19 * Unless required by applicable law or agreed to in writing, software
20 * distributed under the License is distributed on an "AS IS" BASIS,
21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 * See the License for the specific language governing permissions and
23 * limitations under the License.
28 /********************************************************************
30 * The BaKoMa fonts have a different encoding, so change the characters
31 * to correspond to the their encoding.
34 if (jsMath.browser == "Mozilla" && jsMath.platform != "mac") {
39 jsMath.Update.TeXfontCodes({
41 'Γ', 'Δ', 'Θ', 'Λ',
42 'Ξ', 'Π', 'Σ', 'Υ',
43 'Φ', 'Ψ', 'Ω', 'ff',
44 'fi', 'fl', 'ffi', 'ffl',
46 'ı', '', '̀', '́',
47 '̌', '̆', '̅', '̊',
48 '̧', 'ß', 'æ', 'œ',
49 'ø', 'Æ', 'Œ', 'Ø',
51 '̷', '!', '”', '#',
52 '$', '%', '&', ''',
53 '(', ')', '*', '+',
54 ',', '-', '.', '/',
56 '0', '1', '2', '3', '4', '5', '6', '7',
57 '8', '9', ':', ';', '¡', '=', '¿', '?',
59 '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
60 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
62 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
63 'X', 'Y', 'Z', '[', '“', ']', '̂', '̇',
65 '‘', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
66 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
68 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
69 'x', 'y', 'z', '–', '—', '̋', '̃', '̈'
73 'Γ', 'Δ', 'Θ', 'Λ',
74 'Ξ', 'Π', 'Σ', 'Υ',
75 'Φ', 'Ψ', 'Ω', 'α',
76 'β', 'γ', 'δ', 'ε',
78 'ζ', 'η', 'θ', 'ι',
79 'κ', 'λ', 'μ', 'ν',
80 'ξ', 'π', 'ρ', 'σ',
81 'τ', 'υ', 'φ', 'χ',
83 'ψ', 'ω', 'ɛ', 'ϑ',
84 'ϖ', 'ϱ', 'ς', 'ϕ',
85 '↼', '↽', '⇀', '⇁',
86 '', '', '▹', '◃',
88 '0', '1', '2', '3', '4', '5', '6', '7',
89 '8', '9', '.', ',', '<', '/', '>', '⋆',
91 '∂', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
92 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
94 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
95 'X', 'Y', 'Z', '♭', '♮', '♯', '⌣', '⌢',
97 'ℓ', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
98 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
100 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
101 'x', 'y', 'z', 'ı', '', '℘', '⃗', '̑'
105 '−', '·', '×', '⋆',
106 '÷', '⋄', '±', '∓',
107 '⊕', '⊖', '⊗', '⊘',
108 '⊙', '○', '∘', '∙',
110 '≃', '≍', '⊆', '⊇',
111 '≤', '≥', '≼', '≽',
112 '∼', '≅', '⊂', '⊃',
113 '≪', '≫', '≺', '≻',
115 '←', '→', '↑', '↓',
116 '↔', '↗', '↘', '≂',
117 '⇐', '⇒', '⇑', '⇓',
118 '⇔', '↖', '↙', '∝',
120 '′', '∞', '∈', '∋',
121 '△', '▽', '̸', '',
122 '∀', '∃', '¬', '∅',
123 'ℜ', 'ℑ', '⊤', '⊥',
125 'ℵ', '', 'ℬ', '',
126 '', 'ℰ', 'ℱ', '',
127 'ℋ', 'ℐ', '', '',
128 'ℒ', 'ℳ', '', '',
130 '', '', 'ℛ', '',
131 '', '', '', '',
132 '', '', '', '∪',
133 '∩', '⊎', '∧', '∨',
135 '⊢', '⊣', '⌊', '⌋',
136 '⌈', '⌉', '{', '}',
137 '〈', '〉', '∣', '∥',
138 '↕', '⇕', '∖', '≀',
140 '√', '∐', '∇', '∫',
141 '⊔', '⊓', '⊑', '⊒',
142 '§', '†', '‡', '¶',
143 '♣', '♢', '♡', '♠'
147 '', '', '', '',
148 '', '', '', '',
149 '', '', '', '',
150 '', '', '', '',
152 '', '', '', '',
153 '', '', '', '',
154 '', '', '', '',
155 '', '', '', '',
157 '', '', '', '',
158 '', '', '', '',
159 '', '', '', '',
160 '', '', '', '',
162 '', '', '', '',
163 '', '', '', '',
164 '', '', '', '',
165 '', '', '', '',
167 '', '', '', '',
168 '', '', '', '',
169 '', '', '', '',
170 '', '', '', '',
172 '', '', '', '',
173 '', '', '', '',
174 '', '', '', '',
175 '', '', '', '',
177 '', '', '', '',
178 '', '', '', '',
179 '', '', '', '',
180 '', '', '', '',
182 '', '', '', '',
183 '', '', '', '',
184 '', '', '', '',
185 '', '', '', ''
190 * Adjust a few other characters as well
193 jsMath.Update.TeXfonts({
194 cmr10: {'20': {c: 'ˇ', tclass: 'normal', w: .3}},
196 '20': {c: '<i>&kappa</i>', tclass: 'normal'},
197 '58': {c: '.', tclass: 'normal'},
198 '59': {c: ',', tclass: 'normal'},
199 '61': {c: '/', tclass: 'cmr10'}
202 '3': {c: '*', tclass: 'normal'},
203 '16': {c: '≍'},
204 '17': {c: '≡', tclass: 'normal'},
205 '25': {c: '≈', tclass: 'normal'},
206 '39': {c: '≃'},
207 '20': {c: '≤', tclass: 'normal'}
209 cmex10: {'20': {c: '<span style="font-size: 80%"></span>'}},
210 cmti10: {'10': {c: '<i>Ω</i>', tclass: 'normal'}},
211 cmbx10: {'10': {c: '<b>Ω</b>', tclass: 'normal'}}
216 jsMath.Font.BaKoMa = [
217 '¡', '¢', '£', '¤', '¥', '¦', '§', '¨',
218 '©', 'ª', '­', '®', '¯', '°', '±', '²',
220 '³', '´', 'µ', '¶', '∙', '¸', '¹', 'º',
221 '»', '¼', '½', '¾', '¿', 'À', 'Á', 'Â',
223 'Ã', '!', '"', '#', '$', '%', '&', '\'',
224 '(', ')', '*', '+', ',', '-', '.', '/',
226 '0', '1', '2', '3', '4', '5', '6', '7',
227 '8', '9', ':', ';', '<', '=', '>', '?',
229 '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
230 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
232 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
233 'X', 'Y', 'Z', '[', '\\', ']', '^', '_',
235 '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
236 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
238 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
239 'x', 'y', 'z', '{', '|', '}', '~', 'Ä'
242 jsMath.Update.TeXfontCodes({
243 cmr10: jsMath.Font.BaKoMa,
244 cmmi10: jsMath.Font.BaKoMa,
245 cmsy10: jsMath.Font.BaKoMa,
246 cmex10: jsMath.Font.BaKoMa,
247 cmti10: jsMath.Font.BaKoMa,
248 cmbx10: jsMath.Font.BaKoMa
254 switch (jsMath.browser) {
257 if (jsMath.platform == "pc") {
261 jsMath.Browser.msieFontBug = 1;
262 jsMath.Update.TeXfonts({
263 cmr10: {'10': {c: 'Ω', tclass: 'normal'}},
265 '10': {c: '<i>Ω</i>', tclass: 'normal'},
266 '126': {c: '~<span style="margin-left:.1em"></span>'}
269 '10': {c: '⊗', tclass: 'arial'},
270 '55': {c: '<span style="margin-right:-.54em">7</span>'}
272 cmex10: {'10': {c: '<span style="font-size: 67%">D</span>'}},
273 cmti10: {'10': {c: '<i>Ω</i>', tclass: 'normal'}},
274 cmbx10: {'10': {c: '<b>Ω</b>', tclass: 'normal'}}
280 jsMath.Update.TeXfonts({
283 '3': {c: '<font face="Symbol">L</font>', tclass: 'normal'},
284 '5': {c: '<font face="Symbol">P</font>', tclass: 'normal'},
285 '10': {c: '<font face="Symbol">W</font>', tclass: 'normal'},
286 '15': {c: 'ffl', tclass: 'normal'},
287 '16': {c: 'ı', tclass: 'normal'},
288 '20': {c: 'ˇ', tclass: 'normal'},
289 '22': {c: '¯', tclass: 'normal', w: .3},
290 '25': {c: 'ß', tclass: 'normal'},
291 '26': {c: 'æ', tclass: 'normal'},
292 '27': {c: 'œ', tclass: 'normal'}
296 '3': {c: '<font face="Symbol">L</font>', tclass: 'italic'},
297 '5': {c: '<font face="Symbol">P</font>', tclass: 'italic'},
298 '10': {c: '<font face="Symbol">W</font>', tclass: 'italic'},
299 '15': {c: '<font face="Symbol">e</font>', tclass: 'italic'},
300 '16': {c: '<font face="Symbol">z</font>', tclass: 'italic'},
301 '20': {c: '<font face="Symbol">k</font>', tclass: 'italic'},
302 '22': {c: '<font face="Symbol">m</font>', tclass: 'italic'},
303 '25': {c: '<font face="Symbol">p</font>', tclass: 'italic'},
304 '26': {c: '<font face="Symbol">r</font>', tclass: 'italic'},
305 '27': {c: '<font face="Symbol">s</font>', tclass: 'italic'}
309 '3': {c: '<span style="vertical-align:-.3em">*</span>', tclass: 'normal'},
310 '5': {c: 'Ή', tclass: 'normal'},
311 '10': {c: '⊗', tclass: 'normal'},
312 '15': {c: '•', tclass: 'normal'},
313 '16': {c: '≍', tclass: 'normal'},
314 '20': {c: '≤', tclass: 'normal'},
315 '22': {c: '≤', tclass: 'normal'},
316 '25': {c: '≈', tclass: 'normal'},
317 '26': {c: '<font face="Symbol">Ì</font>', tclass: 'normal'},
318 '27': {c: '<font face="Symbol">É</font>', tclass: 'normal'}
322 '3': {c: '<span style="font-size: 67%">i</span>'},
323 '5': {c: '<span style="font-size: 67%">k</span>'},
324 '10': {c: '<span style="font-size: 67%">D</span>'},
325 '15': {c: '<span style="font-size: 55%">Â</span>'},
326 '16': {c: '<span style="font-size: 83%">µ</span>'},
327 '20': {c: '<span style="font-size: 83%">"</span>'},
328 '22': {c: '<span style="font-size: 83%">$</span>'},
329 '25': {c: '<span style="font-size: 83%">\'</span>'},
330 '26': {c: '<span style="font-size: 83%">(</span>'},
331 '27': {c: '<span style="font-size: 83%">)</span>'}
335 '3': {c: '<font face="Symbol">L</font>', tclass: 'italic'},
336 '5': {c: '<font face="Symbol">P</font>', tclass: 'italic'},
337 '10': {c: '<font face="Symbol">W</font>', tclass: 'italic'},
338 '16': {c: 'ı', tclass: 'italic'},
339 '20': {c: '­', tclass: 'italic'},
340 '22': {c: '¯', tclass: 'italic', w: .3},
341 '25': {c: 'ß', tclass: 'italic'},
342 '26': {c: 'æ', tclass: 'italic'},
343 '27': {c: 'œ', tclass: 'italic'}
347 '3': {c: '<font face="Symbol">L</font>', tclass: 'bold'},
348 '5': {c: '<font face="Symbol">P</font>', tclass: 'bold'},
349 '10': {c: '<font face="Symbol">W</font>', tclass: 'bold'},
350 '16': {c: 'ı', tclass: 'bold'},
351 '20': {c: '­', tclass: 'bold'},
352 '22': {c: '¯', tclass: 'bold', w: .3},
353 '25': {c: 'ß', tclass: 'bold'},
354 '26': {c: 'æ', tclass: 'bold'},
355 '27': {c: 'œ', tclass: 'bold'}
362 if (jsMath.platform == "mac") {
366 jsMath.Update.TeXfonts({
367 cmr10: {'10': {c: 'Ω', tclass: 'normal'}},
368 cmmi10: {'10': {c: '<i>Ω</i>', tclass: 'normal'}},
369 cmsy10: {'10': {c: '⊗', tclass: 'normal'}},
370 cmex10: {'10': {c: '<span style="font-size: 67%">D</span>'}},
371 cmti10: {'10': {c: '<i>Ω</i>', tclass: 'normal'}},
372 cmbx10: {'10': {c: '<b>Ω</b>', tclass: 'normal'}}
378 jsMath.Update.TeXfonts({
380 '10': {c: 'Ω', tclass: 'normal'},
381 '20': {c: 'ˇ', tclass: 'normal'}
384 '10': {c: '<i>Ω</i>', tclass: 'normal'},
385 '20': {c: 'κ', tclass: 'normal'}
388 '10': {c: '⊗', tclass: 'normal'},
389 '20': {c: '≤', tclass: 'normal'}
392 '10': {c: '<span style="font-size: 67%">D</span>'},
393 '20': {c: '<span style="font-size: 82%">"</span>'}
396 '10': {c: '<i>Ω</i>', tclass: 'normal'},
397 '20': {c: '<i>ˇ</i>', tclass: 'normal'}
400 '10': {c: '<b>Ω</b>', tclass: 'normal'},
401 '20': {c: '<b>ˇ</b>', tclass: 'normal'}
407 jsMath.Update.TeXfonts({
408 cmr10: {'20': {c: 'ˇ', tclass: 'normal'}},
409 cmmi10: {'20': {c: 'κ', tclass: 'normal'}},
410 cmsy10: {'20': {c: '≤', tclass: 'normal'}},
411 cmex10: {'20': {c: '<span style="font-size: 84%">"</span>'}},
412 cmti10: {'20': {c: '<i>ˇ</i>', tclass: 'normal'}},
413 cmbx10: {'20': {c: '<b>ˇ</b>', tclass: 'normal'}}
420 jsMath.Setup.Styles({
421 '.typeset .cmr10': 'font-family: CMR10, serif',
422 '.typeset .cmbx10': 'font-family: CMBX10, CMR10',
423 '.typeset .cmti10': 'font-family: CMTI10, CMR10',
424 '.typeset .cmmi10': 'font-family: CMMI10',
425 '.typeset .cmsy10': 'font-family: CMSY10',
426 '.typeset .cmex10': 'font-family: CMEX10',
427 '.typeset .arial': "font-family: 'Arial unicode MS'"