File:  [LON-CAPA] / loncom / html / adm / jsMath / jsMath-fallback-mac-msie.js
Revision 1.4: download - view: text, annotated - select for diffs
Wed May 17 22:19:27 2006 UTC (18 years, 5 months ago) by albertel
Branches: MAIN
CVS tags: version_2_9_X, version_2_9_99_0, version_2_9_1, version_2_9_0, version_2_8_X, version_2_8_99_1, version_2_8_99_0, version_2_8_2, version_2_8_1, version_2_8_0, version_2_7_X, version_2_7_99_1, version_2_7_99_0, version_2_7_1, version_2_7_0, version_2_6_X, version_2_6_99_1, version_2_6_99_0, version_2_6_3, version_2_6_2, version_2_6_1, version_2_6_0, version_2_5_X, version_2_5_99_1, version_2_5_99_0, version_2_5_2, version_2_5_1, version_2_5_0, version_2_4_X, version_2_4_99_0, version_2_4_2, version_2_4_1, version_2_4_0, version_2_3_X, version_2_3_99_0, version_2_3_2, version_2_3_1, version_2_3_0, version_2_2_X, version_2_2_99_1, version_2_2_99_0, version_2_2_2, version_2_2_1, version_2_2_0, version_2_1_99_3, version_2_1_99_2, version_2_1_99_1, version_2_1_99_0, version_2_12_X, version_2_11_X, version_2_11_5_msu, version_2_11_5, version_2_11_4_uiuc, version_2_11_4_msu, version_2_11_4, version_2_11_3_uiuc, version_2_11_3_msu, version_2_11_3, version_2_11_2_uiuc, version_2_11_2_msu, version_2_11_2_educog, version_2_11_2, version_2_11_1, version_2_11_0_RC3, version_2_11_0_RC2, version_2_11_0_RC1, version_2_11_0, version_2_10_X, version_2_10_1, version_2_10_0_RC2, version_2_10_0_RC1, version_2_10_0, loncapaMITrelate_1, language_hyphenation_merge, language_hyphenation, bz6209-base, bz6209, bz5969, bz2851, PRINT_INCOMPLETE_base, PRINT_INCOMPLETE, HEAD, GCI_3, GCI_2, GCI_1, BZ5971-printing-apage, BZ5434-fox, BZ4492-merge, BZ4492-feature_horizontal_radioresponse
- jsmath 3.3

    1: /*
    2:  *  jsMath-fallback-mac-msie.js
    3:  *  
    4:  *  Part of the jsMath package for mathematics on the web.
    5:  *
    6:  *  This file makes changes needed by Internet Explorer on the Mac
    7:  *  for when the TeX fonts are not available.
    8:  *
    9:  *  ---------------------------------------------------------------------
   10:  *
   11:  *  Copyright 2004-2006 by Davide P. Cervone
   12:  * 
   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
   16:  * 
   17:  *      http://www.apache.org/licenses/LICENSE-2.0
   18:  * 
   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.
   24:  */
   25: 
   26: 
   27: 
   28: /********************************************************************
   29:  *
   30:  *  Fix the default non-TeX-font characters to work with MSIE
   31:  *
   32:  */
   33: 
   34: jsMath.Update.TeXfonts({
   35:   cmr10: {
   36:     '0':  {c: 'G', tclass: 'greek'},
   37:     '1':  {c: 'D', tclass: 'greek'},
   38:     '2':  {c: 'Q', tclass: 'greek'},
   39:     '3':  {c: 'L', tclass: 'greek'},
   40:     '4':  {c: 'X', tclass: 'greek'},
   41:     '5':  {c: 'P', tclass: 'greek'},
   42:     '6':  {c: 'S', tclass: 'greek'},
   43:     '7':  {c: '¡', tclass: 'greek'},
   44:     '8':  {c: 'F', tclass: 'greek'},
   45:     '9':  {c: 'Y', tclass: 'greek'},
   46:     '10': {c: 'W', tclass: 'greek'},
   47:     '22': {c: '<span style="position:relative; top:.1em">&#96;</span>', tclass: 'symbol3'}
   48:   },
   49:   
   50:   cmti10: {
   51:     '0':  {c: 'G', tclass: 'igreek'},
   52:     '1':  {c: 'D', tclass: 'igreek'},
   53:     '2':  {c: 'Q', tclass: 'igreek'},
   54:     '3':  {c: 'L', tclass: 'igreek'},
   55:     '4':  {c: 'X', tclass: 'igreek'},
   56:     '5':  {c: 'P', tclass: 'igreek'},
   57:     '6':  {c: 'S', tclass: 'igreek'},
   58:     '7':  {c: '&#161;', tclass: 'igreek'},
   59:     '8':  {c: 'F', tclass: 'igreek'},
   60:     '9':  {c: 'Y', tclass: 'igreek'},
   61:     '10': {c: 'W', tclass: 'igreek'},
   62:     '22': {c: '<span style="position:relative; top:.1em">&#96;</span>', tclass: 'symbol3'}
   63:   },
   64:   
   65:   cmbx10: {
   66:     '0':  {c: 'G', tclass: 'bgreek'},
   67:     '1':  {c: 'D', tclass: 'bgreek'},
   68:     '2':  {c: 'Q', tclass: 'bgreek'},
   69:     '3':  {c: 'L', tclass: 'bgreek'},
   70:     '4':  {c: 'X', tclass: 'bgreek'},
   71:     '5':  {c: 'P', tclass: 'bgreek'},
   72:     '6':  {c: 'S', tclass: 'bgreek'},
   73:     '7':  {c: '&#161;', tclass: 'bgreek'},
   74:     '8':  {c: 'F', tclass: 'bgreek'},
   75:     '9':  {c: 'Y', tclass: 'bgreek'},
   76:     '10': {c: 'W', tclass: 'bgreek'},
   77:     '22': {c: '<span style="position:relative; top:.1em">&#96;</span>', tclass: 'symbol3'}
   78:   },
   79:   cmmi10: {
   80:     '0':  {c: 'G', tclass: 'igreek'},
   81:     '1':  {c: 'D', tclass: 'igreek'},
   82:     '2':  {c: 'Q', tclass: 'igreek'},
   83:     '3':  {c: 'L', tclass: 'igreek'},
   84:     '4':  {c: 'X', tclass: 'igreek'},
   85:     '5':  {c: 'P', tclass: 'igreek'},
   86:     '6':  {c: 'S', tclass: 'igreek'},
   87:     '7':  {c: '&#161;', tclass: 'igreek'},
   88:     '8':  {c: 'F', tclass: 'igreek'},
   89:     '9':  {c: 'Y', tclass: 'igreek'},
   90:     '10': {c: 'W', tclass: 'igreek'},
   91:     '11': {c: 'a', tclass: 'greek'},
   92:     '12': {c: 'b', tclass: 'greek'},
   93:     '13': {c: 'g', tclass: 'greek'},
   94:     '14': {c: 'd', tclass: 'greek'},
   95:     '15': {c: 'e', tclass: 'greek'},
   96:     '16': {c: 'z', tclass: 'greek'},
   97:     '17': {c: 'h', tclass: 'greek'},
   98:     '18': {c: 'q', tclass: 'greek'},
   99:     '19': {c: 'i', tclass: 'greek'},
  100:     '20': {c: 'k', tclass: 'greek'},
  101:     '21': {c: 'l', tclass: 'greek'},
  102:     '22': {c: 'm', tclass: 'greek'},
  103:     '23': {c: 'n', tclass: 'greek'},
  104:     '24': {c: 'x', tclass: 'greek'},
  105:     '25': {c: 'p', tclass: 'greek'},
  106:     '26': {c: 'r', tclass: 'greek'},
  107:     '27': {c: 's', tclass: 'greek'},
  108:     '28': {c: 't', tclass: 'greek'},
  109:     '29': {c: 'u', tclass: 'greek'},
  110:     '30': {c: 'f', tclass: 'greek'},
  111:     '31': {c: 'c', tclass: 'greek'},
  112:     '32': {c: 'y', tclass: 'greek'},
  113:     '33': {c: 'w', tclass: 'greek'},
  114: //  '41':  // leftharpoondown
  115: //  '43':  // rightharpoondown   
  116: //  '44':  // hook left
  117: //  '45':  // hook right 
  118: //  '92':  // natural
  119:     '94': {c: '<span style="position:relative; top:.3em">&#xFE36;</span>'},
  120:     '95': {c: '<span style="position:relative; top:-.2em">&#xFE35;</span>'}
  121: //  '127': // half-circle down accent?
  122:   },
  123: 
  124:   cmsy10: {
  125:     '0':  {c: '&ndash;', tclass: 'normal'},
  126:     '11': {c: '<span style="font-size: 70%">&#x25EF;</span><span style="position:relative; margin-left:-.5em; top:.1em; margin-right:.3em">/</span>', tclass: 'normal'},
  127:     '16': {c: '<span style="position:relative;top:-.1em; font-size: 67%">&#xFE35;</span><span style="position:relative;top:.1em;font-size:67%;margin-left:-1em">&#xFE36;</span>', tclass: 'normal'},
  128:     '48': {c: '<span style="font-size: 133%; margin-left:-.1em; margin-right: -.6em; position: relative; top:.4em">&#x2032;</span>'},
  129:     '93': {c: '&#x222A;<span style="font-size: 50%; margin-left:-1.3em; position: relative; top:-.3em; margin-right:.6em">+</span>'},
  130:     '96': {c: '<span style="font-size:67%; position:relative; top:-.3em;">|</span><span style="position:relative; top:-.15em; margin-left:-.1em">&ndash;</span>', tclass: 'normal'},
  131:     '104': {c: '<span style="position:relative; top:.2em; margin-left:-.6em">&#x3008;</span>'},
  132:     '105': {c: '<span style="position:relative; top:.2em; margin-right:-.6em">&#x3009;</span>'},
  133:     '109': {c: '&#x21D1;<span style="position:relative; top:.1em; margin-left:-1em">&#x21D3;</span>'},
  134:     '110': {c: '\\', d:0, tclass: 'normal'}
  135: //  '111': // wr
  136: //, '113': // amalg
  137: //  '116': // sqcup
  138: //  '117': // sqcap
  139: //  '118': // sqsubseteq
  140: //  '119': // sqsupseteq
  141:   },
  142: 
  143:   cmex10: {
  144:     '10': {c: '<span style="position:relative; top:.1em; margin-left:-.6em">&#x3008;</span>'},
  145:     '11': {c: '<span style="position:relative; top:.1em; margin-right:-.6em">&#x3009;</span>'},
  146:     '14': {c: '/'}, '15': {c: '\\'},
  147:     '28': {c: '<span style="position:relative; top:.05em; margin-left:-.6em">&#x3008;</span>'},
  148:     '29': {c: '<span style="position:relative; top:.05em; margin-right:-.6em">&#x3009;</span>'},
  149:     '30': {c: '/'}, '31': {c: '\\'},
  150:     '42': {c: '<span style="margin-left:-.6em">&#x3008;</span>'},
  151:     '43': {c: '<span style="margin-right:-.6em">&#x3009;</span>'},
  152:     '44': {c: '/'}, '45': {c: '\\'},
  153:     '46': {c: '/'}, '47': {c: '\\'},
  154:     '68': {c: '<span style="margin-left:-.6em">&#x3008;</span>'},
  155:     '69': {c: '<span style="margin-right:-.6em">&#x3009;</span>'},
  156: //  '70':  // sqcup
  157: //  '71':  // big sqcup
  158:     '72': {ic: 0},  '73': {ic: 0},
  159:     '82': {tclass: 'bigop1cx', ic: .15}, '90': {tclass: 'bigop2cx', ic:.6},
  160:     '85': {c: '&#x222A;<span style="font-size: 50%; margin-left:-1.25em; position: relative; top:-.3em; margin-right:.6em">+</span>'},
  161:     '93': {c: '&#x222A;<span style="font-size: 50%; margin-left:-1.25em; position: relative; top:-.3em; margin-right:.6em">+</span>'},
  162: //  '96': // coprod
  163: //  '97': // big coprod
  164:     '98': {c: '&#xFE3F;', h: 0.722, w: .58, tclass: 'wide1'},
  165:     '99': {c: '&#xFE3F;', h: 0.722, w: .58, tclass: 'wide2'},
  166:     '100': {c: '&#xFE3F;', h: 0.722, w: .58, tclass: 'wide3'},
  167:     '101': {c: '~', h: 0.722, w: .42, tclass: 'wide1a'},
  168:     '102': {c: '~', h: 0.8, w: .73, tclass: 'wide2a'},
  169:     '103': {c: '~', h: 0.8, w: 1.1, tclass: 'wide3a'}
  170:   }
  171: 
  172: });
  173: 
  174: jsMath.Setup.Styles({
  175:   '.typeset .arrow1':   "font-family: Osaka; position: relative; top: .125em; margin: -1px",
  176:   '.typeset .arrow2':   "font-family: Osaka; position: relative; top: .1em; margin:-1px",
  177:   '.typeset .bigop1':   "font-family: Symbol; font-size: 110%; position:relative; top: .8em; margin:-.05em",
  178:   '.typeset .bigop1b':  "font-family: Symbol; font-size: 140%; position: relative; top: .8em; margin:-.1em",
  179:   '.typeset .bigop1c':  "font-family: Osaka; font-size: 125%; position:relative; top: .85em; margin:-.3em",
  180:   '.typeset .bigop1cx': "font-family: 'Apple Chancery'; font-size: 125%; position:relative; top: .7em; margin:-.1em",
  181:   '.typeset .bigop2':   "font-family: Symbol; font-size: 175%; position:relative; top: .8em; margin:-.07em",
  182:   '.typeset .bigop2a':  "font-family: Baskerville; font-size: 175%; position: relative; top: .65em",
  183:   '.typeset .bigop2b':  "font-family: Symbol; font-size: 175%; position: relative; top: .8em; margin:-.07em",
  184:   '.typeset .bigop2c':  "font-family: Osaka; font-size: 230%; position:relative; top: .85em; margin:-.35em",
  185:   '.typeset .bigop2cx': "font-family: 'Apple Chancery'; font-size: 250%; position:relative; top: .6em; margin-left:-.1em; margin-right:-.2em",
  186:   '.typeset .delim1b':  "font-family: Times; font-size: 150%; position:relative; top:.8em",
  187:   '.typeset .delim2b':  "font-family: Times; font-size: 210%; position:relative; top:.75em;",
  188:   '.typeset .delim3b':  "font-family: Times; font-size: 300%; position:relative; top:.7em;",
  189:   '.typeset .delim4b':  "font-family: Times; font-size: 400%; position:relative; top:.65em;",
  190:   '.typeset .symbol3':  "font-family: Symbol",
  191:   '.typeset .wide1':    "font-size: 50%; position: relative; top:-1.1em",
  192:   '.typeset .wide2':    "font-size: 80%; position: relative; top:-.7em",
  193:   '.typeset .wide3':    "font-size: 125%; position: relative; top:-.5em",
  194:   '.typeset .wide1a':   "font-size: 75%; position: relative; top:-.5em",
  195:   '.typeset .wide2a':   "font-size: 133%; position: relative; top: -.15em",
  196:   '.typeset .wide3a':   "font-size: 200%; position: relative; top: -.05em",
  197:   '.typeset .greek':    "font-family: Symbol",
  198:   '.typeset .igreek':   "font-family: Symbol; font-style:italic",
  199:   '.typeset .bgreek':   "font-family: Symbol; font-weight:bold"
  200: });

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>