version 1.1, 2005/02/25 04:57:49
|
version 1.3, 2006/03/27 19:32:07
|
Line 2
|
Line 2
|
* |
* |
* jsMath: Mathematics on the Web |
* jsMath: Mathematics on the Web |
* |
* |
* Version: 1.7e |
|
* |
|
* This jsMath package makes it possible to display mathematics in HTML pages |
* This jsMath package makes it possible to display mathematics in HTML pages |
* that are viewable by a wide range of browsers on both the Mac and the IBM PC, |
* that are viewable by a wide range of browsers on both the Mac and the IBM PC, |
* including browsers that don't process MathML. See |
* including browsers that don't process MathML. See |
Line 11
|
Line 9
|
* http://www.math.union.edu/locate/jsMath |
* http://www.math.union.edu/locate/jsMath |
* |
* |
* for the latest version, and for documentation on how to use jsMath. |
* for the latest version, and for documentation on how to use jsMath. |
* |
|
* Copyright (c) 2004-2005 by Davide P. Cervone. |
|
* |
* |
* This program is free software; you can redistribute it and/or |
* Copyright 2004-2006 by Davide P. Cervone |
* modify it under the terms of the GNU General Public License |
|
* as published by the Free Software Foundation; either version 2 |
|
* of the License. |
|
* |
|
* This program is distributed in the hope that it will be useful, |
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
* GNU General Public License for more details. |
|
* |
|
* You should have received a copy of the GNU General Public License |
|
* along with this program; if not, write to the Free Software |
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
* |
|
*****************************************************************************/ |
|
|
|
/* |
|
* Prevent running everything again if this file is loaded twice |
|
*/ |
|
if (!window.jsMath) { |
|
|
|
// |
|
// debugging routine |
|
// |
|
function ShowObject (obj,spaces) { |
|
var s = ''; if (!spaces) {spaces = ""} |
|
for (var i in obj) { |
|
if (obj[i] != null) { |
|
if (typeof(obj[i]) == "object") { |
|
s += spaces + i + ": {\n" |
|
+ ShowObject(obj[i],spaces + ' ') |
|
+ spaces + "}\n"; |
|
} else if (typeof(obj[i]) != "function") { |
|
s += spaces + i + ': ' + obj[i] + "\n"; |
|
} |
|
} |
|
} |
|
return s; |
|
} |
|
|
|
/***************************************************************************/ |
|
// |
|
// Check for DOM support |
|
// |
|
if (!document.getElementById || !document.childNodes || !document.createElement) { |
|
alert('The mathematics on this page requires W3C DOM support in its JavaScript. ' |
|
+ 'Unfortunately, your browser doesn\'t seem to have this.'); |
|
} else { |
|
|
|
/***************************************************************************/ |
|
|
|
var jsMath = { |
|
|
|
// |
|
// Name of image files |
|
// |
|
blank: "blank.gif", |
|
black: "black.gif", |
|
|
|
// |
|
// The TeX font parameters |
|
// |
|
TeX: { |
|
thinmuskip: 3/18, |
|
medmuskip: 4/18, |
|
thickmuskip: 5/18, |
|
|
|
x_height: .430554, |
|
quad: 1, |
|
num1: .676508, |
|
num2: .393732, |
|
num3: .44373, |
|
denom1: .685951, |
|
denom2: .344841, |
|
sup1: .412892, |
|
sup2: .362892, |
|
sup3: .288888, |
|
sub1: .15, |
|
sub2: .247217, |
|
sup_drop: .386108, |
|
sub_drop: .05, |
|
delim1: 2.39, |
|
delim2: 1.0, |
|
axis_height: .25, |
|
default_rule_thickness: .04, |
|
big_op_spacing1: .111111, |
|
big_op_spacing2: .166666, |
|
big_op_spacing3: .2, |
|
big_op_spacing4: .6, |
|
big_op_spacing5: .1, |
|
|
|
integer: 6553.6, // conversion of em's to TeX internal integer |
|
scriptspace: .05, |
|
nulldelimiterspace: .12, |
|
delimiterfactor: 901, |
|
delimitershortfall: .5, |
|
scale: 1 // scaling factor for font dimensions |
|
}, |
|
|
|
// Font sizes for \tiny, \small, etc. (must match styles below) |
|
sizes: [50, 60, 70, 85, 100, 120, 144, 173, 207, 249], |
|
|
|
allowAbsolute: 1, // tells if browser can nest absolutely positioned |
|
// SPANs inside relative SPANs |
|
absoluteOffsetY: 0, // vertical adjustment when absolute position is used |
|
allowAbsoluteDelim: 0, // OK to use absolute placement for building delims? |
|
renameOK: 1, // tells if brower will find a tag whose name |
|
// has been set via setAttributes |
|
separateNetgativeSkips: 0, // MSIE doesn't do negative left margins |
|
separateSkips: 0, // Netscape doesn't combine skips well |
|
noEmptySpans: 0, // empty spans are/aren't allowed |
|
msieSpaceFix: '', // for MSIE spacing bug fix |
|
|
|
delay: 1, // delay for asynchronous math processing |
|
|
|
defaultH: 0, // default height for characters with no height specified |
|
|
|
// |
|
// Debugging flags |
|
// |
|
show: { |
|
BBox: false, |
|
Baseline: false, |
|
Top: false |
|
}, |
|
|
|
// |
|
// The styles needed for the TeX fonts |
|
// |
|
styles: { |
|
'.size0': 'font-size: 50%', // tiny (\scriptscriptsize) |
|
'.size1': 'font-size: 60%', // (50% of \large for consistency) |
|
'.size2': 'font-size: 70%', // scriptsize |
|
'.size3': 'font-size: 85%', // small (70% of \large for consistency) |
|
'.size4': 'font-size: 100%', // normalsize |
|
'.size5': 'font-size: 120%', // large |
|
'.size6': 'font-size: 144%', // Large |
|
'.size7': 'font-size: 173%', // LARGE |
|
'.size8': 'font-size: 207%', // huge |
|
'.size9': 'font-size: 249%', // Huge |
|
|
|
'.cmr10': 'font-family: cmr10', |
|
'.cmbx10': 'font-family: cmbx10, cmr10', |
|
'.cmti10': 'font-family: cmti10, cmr10', |
|
'.cmmi10': 'font-family: cmmi10', |
|
'.cmsy10': 'font-family: cmsy10', |
|
'.cmex10': 'font-family: cmex10', |
|
'.arial': 'font-family: Arial unicode MS', // for MSIE |
|
|
|
'.normal': 'font-family: serif; font-style: normal', |
|
'.math': 'font-family: serif; font-style: normal', |
|
'.typeset': 'font-family: serif; font-style: normal', |
|
'span.typeset': 'font-family: serif; font-style: normal', |
|
'div.typeset': 'font-family: serif; font-style: normal; text-align: center; margin-top: 1em; margin-bottom: 1em', |
|
'.mathlink': 'text-decoration: none', |
|
'.mathHD': 'border-width: 0; width: 1px; margin-right: -1px', |
|
|
|
'.error': 'font-size: 10pt; font-style: italic; ' |
|
+ 'background-color: #FFFFCC; padding: 1; ' |
|
+ 'border-width: 1; border-style: solid; border-color: #CC0000' |
|
}, |
|
|
|
|
|
/***************************************************************************/ |
|
|
|
/* |
|
* Get the width and height (in pixels) of an HTML string |
|
*/ |
|
BBoxFor: function (s) { |
|
this.hidden.innerHTML = s; |
|
var bbox = {w: this.hidden.offsetWidth, h: this.hidden.offsetHeight}; |
|
this.hidden.innerHTML = ''; // avoid MSIE bug on the Mac |
|
return bbox; |
|
}, |
|
|
|
/* |
|
* Get the width and height (in ems) of an HTML string |
|
*/ |
|
EmBoxFor: function (s) { |
|
var bbox = this.BBoxFor(s); |
|
return {w: bbox.w/this.em, h: bbox.h/this.em}; |
|
}, |
|
|
|
/* |
|
* Determine if the "top" of a <SPAN> is always at the same height |
|
* or varies with the height of the rest of the line (MSIE). |
|
*/ |
|
TestSpanHeight: function () { |
|
this.hidden.innerHTML = '<SPAN><IMG SRC="'+jsMath.blank+'" STYLE="height: 2em"></SPAN>'; |
|
var span = this.hidden.getElementsByTagName('SPAN')[0]; |
|
var img = this.hidden.getElementsByTagName('IMG')[0]; |
|
this.spanHeightVaries = (span.offsetHeight == img.offsetHeight); |
|
this.hidden.innerHTML = ''; |
|
}, |
|
|
|
/* |
|
* Determine if the NAME attribute of a tag can be changed |
|
* using the setAttribute function, and then be properly |
|
* returned by getElementByName. |
|
*/ |
|
TestRenameOK: function () { |
|
this.hidden.innerHTML = '<SPAN ID="jsMath.test"></SPAN>'; |
|
var test = document.getElementById('jsMath.test'); |
|
test.setAttribute('NAME','jsMath_test'); |
|
this.renameOK = (document.getElementsByName('jsMath_test').length > 0); |
|
this.hidden.innerHTML = ''; |
|
}, |
|
|
|
/* |
|
* Look to see if a font is found. HACK! |
|
* Check the character in the '|' position, and see if it is |
|
* wider than the usual '|'. |
|
*/ |
|
TestFont: function (name,n,factor) { |
|
if (n == null) {n = 124}; if (factor == null) {factor = 2} |
|
var wh1 = this.BBoxFor('<SPAN STYLE="font-family: '+name+', serif">'+this.TeX[name][n].c+'</SPAN>'); |
|
var wh2 = this.BBoxFor('<SPAN STYLE="font-family: serif">'+this.TeX[name][n].c+'</SPAN>'); |
|
return (wh1.w > factor*wh2.w && wh1.h != 0); |
|
}, |
|
|
|
TestFont2: function (name,n,factor) { |
|
if (n == null) {n = 124}; if (factor == null) {factor = 2} |
|
var wh1 = this.BBoxFor('<SPAN STYLE="font-family: '+name+', serif">'+this.TeX[name][n].c+'</SPAN>'); |
|
var wh2 = this.BBoxFor('<SPAN STYLE="font-family: serif">'+this.TeX[name][n].c+'</SPAN>'); |
|
return (wh2.w > factor*wh1.w && wh1.h != 0); |
|
}, |
|
|
|
/* |
|
* Check for the availability of TeX fonts. We do this by looking at |
|
* the width and height of a character in the cmex10 font. The cmex10 |
|
* font has depth considerably greater than most characters' widths (the |
|
* whole font has the depth of the character with greatest depth). This |
|
* is not the case for most fonts, so if we can access cmex10, the |
|
* height of a character should be much bigger than the width. |
|
* Otherwise, if we don't have cmex10, we'll get a character in another |
|
* font with normal height and width. In this case, we insert a message |
|
* pointing the user to the jsMath site, and load one of the fallback |
|
* definitions. |
|
* |
|
*/ |
|
CheckFonts: function () { |
|
jsMath.nofonts = 0; |
|
var wh = this.BBoxFor('<SPAN STYLE="font-family: cmex10">'+this.TeX.cmex10[1].c+'</SPAN>'); |
|
if (wh.w*3 < wh.h && wh.h != 0) return; |
|
if (this.TestFont('cmr10')) return; |
|
if (window.NoFontMessage) {window.NoFontMessage()} else {this.NoFontMessage()} |
|
if (navigator.platform == 'Win32') { |
|
document.writeln('<SCRIPT SRC="'+this.root+'jsMath-fallback-pc.js"></SCRIPT>'); |
|
} else if (navigator.platform == 'MacPPC') { |
|
document.writeln('<SCRIPT SRC="'+this.root+'jsMath-fallback-mac.js"></SCRIPT>'); |
|
} else { |
|
// default to unix? Is there a better way to tell if unix? |
|
document.writeln('<SCRIPT SRC="'+this.root+'jsMath-fallback-unix.js"></SCRIPT>'); |
|
} |
|
jsMath.nofonts = 1; |
|
}, |
|
|
|
/* |
|
* The message for when no TeX fonts. You can eliminate this message |
|
* by including |
|
* |
|
* <SCRIPT>function NoFontMessage() {}</SCRIPT> |
|
* |
|
* in your HTML file, if you want. But this means the user may not know |
|
* that he or she can get a better version of your page. |
|
*/ |
|
NoFontMessage: function () { |
|
document.writeln |
|
('<CENTER><DIV STYLE="padding: 10; border-style: solid; border-width:3;' |
|
+' border-color: #DD0000; background-color: #FFF8F8; width: 75%; text-align: left">' |
|
+'<SMALL><FONT COLOR="#AA0000"><B>Warning:</B>\n' |
|
+'It looks like you don\'t have the TeX math fonts installed.\n' |
|
+'The mathematics on this page may not look right without them.\n' |
|
+'The <A HREF="http://www.math.union.edu/locate/jsMath/" TARGET="_blank">' |
|
+'jsMath Home Page</A> has information on how to download the\n' |
|
+'needed fonts. In the meantime, we will do the best we can\n' |
|
+'with the fonts you have, but it may not be pretty and some equations\n' |
|
+'may not be rendered correctly.\n' |
|
+'</FONT></SMALL></DIV></CENTER><p><HR><p>'); |
|
}, |
|
|
|
/* |
|
* Initialize jsMath. This determines the em size, and a variety |
|
* of other parameters used throughout jsMath. |
|
*/ |
|
Init: function() { |
|
this.em = this.BBoxFor('<DIV STYLE="width: 20em; height: 1em"></DIV>').w/20; |
|
var h = this.BBoxFor('x').h; // Line height and depth to baseline |
|
var d = this.BBoxFor('x<IMG SRC="'+jsMath.black+'" HEIGHT="'+h+'" WIDTH="1">').h - h; |
|
this.h = (h-d)/this.em; this.d = d/this.em; |
|
this.hd = this.h + this.d; |
|
this.ph = h-d; this.pd = d; |
|
|
|
this.InitTeXfonts(); |
|
|
|
var x_height = this.EmBoxFor('<SPAN CLASS="cmr10">M</SPAN>').w/2; |
|
this.TeX.M_height = x_height*(26/14); |
|
this.TeX.h = this.h; this.TeX.d = this.d; this.TeX.hd = this.hd; |
|
// factor for \big and its brethren |
|
this.p_height = (this.TeX.cmex10[0].h+this.TeX.cmex10[0].d) / .85; |
|
|
|
this.InitSizes(); |
|
|
|
this.initialized = 1; |
|
}, |
|
|
|
/* |
|
* Find the root URL for the jsMath files (so we can load |
|
* the other .js and .gif files |
|
*/ |
|
InitSource: function () { |
|
var script = document.getElementsByTagName('SCRIPT'); |
|
var src = script[script.length-1].getAttribute('SRC'); |
|
if (src.match('(^|/)jsMath.js$')) { |
|
this.root = src.replace(/jsMath.js$/,''); |
|
this.blank = this.root + this.blank; |
|
this.black = this.root + this.black; |
|
} |
|
}, |
|
|
|
/* |
|
* Look up the default height and depth for a TeX font |
|
* and set the skewchar |
|
*/ |
|
InitTeXfont: function (name) { |
|
var font = this.TeX[name]; |
|
var WH = this.EmBoxFor('<SPAN CLASS="'+name+'">'+font[65].c+'</SPAN>'); |
|
font.hd = WH.h; |
|
font.d = this.EmBoxFor('<SPAN CLASS="'+name+'">'+ font[65].c + |
|
'<IMG SRC="'+jsMath.black+'" STYLE="height:'+font.hd+'em; width:1"></SPAN>').h |
|
- font.hd; |
|
font.h = font.hd - font.d; |
|
font.dh = .05; |
|
if (name == 'cmmi10') {font.skewchar = 0177} |
|
else if (name == 'cmsy10') {font.skewchar = 060} |
|
}, |
|
|
|
/* |
|
* Init all the TeX fonts |
|
*/ |
|
InitTeXfonts: function () { |
|
for (var i = 0; i < this.TeX.fam.length; i++) |
|
{if (this.TeX.fam[i]) {this.InitTeXfont(this.TeX.fam[i])}} |
|
}, |
|
|
|
/* |
|
* Compute font parameters for various sizes |
|
*/ |
|
InitSizes: function () { |
|
this.TeXparams = []; |
|
for (var j=0; j < this.sizes.length; j++) {this.TeXparams[j] = {}} |
|
for (var i in this.TeX) { |
|
if (typeof(this.TeX[i]) != 'object') { |
|
for (var j=0; j < this.sizes.length; j++) { |
|
this.TeXparams[j][i] = this.sizes[j]*this.TeX[i]/100; |
|
} |
|
} |
|
} |
|
}, |
|
|
|
/* |
|
* Test for browser characteristics, and adjust the font table |
|
* to overcome specific browser bugs |
|
*/ |
|
InitBrowser: function () { |
|
jsMath.browser = 'unknown'; |
|
this.isSafari = navigator.userAgent.match(/Safari/); |
|
this.TestSpanHeight(); |
|
this.TestRenameOK(); |
|
|
|
// |
|
// Check for bug-filled Internet Explorer |
|
// |
|
if (this.spanHeightVaries) { |
|
jsMath.browser = 'MSIE'; |
|
if (navigator.platform == 'Win32') { |
|
this.UpdateTeXfonts({ |
|
cmr10: {'10': {c: 'Ω', tclass: 'normal'}}, |
|
cmmi10: { |
|
'10': {c: '<I>Ω</I>', tclass: 'normal'}, |
|
'126': {c: '~<SPAN STYLE="margin-left:.1em"></SPAN>'} |
|
}, |
|
cmsy10: {'10': {c: '⊗', tclass: 'arial'}}, |
|
cmex10: {'10': {c: '<SPAN STYLE="font-size: 67%">D</SPAN>'}}, |
|
cmti10: {'10': {c: '<I>Ω</I>', tclass: 'normal'}}, |
|
cmbx10: {'10': {c: '<B>Ω</B>', tclass: 'normal'}} |
|
}); |
|
this.allowAbsoluteDelim = 1; |
|
this.separateSkips = 1; |
|
this.msieFontBug = 1; this.msieIntegralBug = 1; |
|
this.msieSpaceFix = '<IMG SRC="'+jsMath.blank+'" CLASS="mathHD">'; |
|
jsMath.Macro('joinrel','\\mathrel{\\kern-5mu}'), |
|
jsMath.Macro('mapsto','\\mapstochar\\kern-.54em\\rightarrow'); |
|
jsMath.Macro('longmapsto','\\mapstochar\\kern-.54em\\char{cmsy10}{0}\\joinrel\\rightarrow'); |
|
} else if (navigator.platform == 'MacPPC') { |
|
document.writeln('<SCRIPT SRC="'+this.root+'jsMath-msie-mac.js"></SCRIPT>'); |
|
jsMath.Parser.prototype.macros.angle = ['Replace','ord','<FONT FACE="Symbol">‹</FONT>','normal']; |
|
jsMath.msieAbsoluteBug = 1; |
|
} |
|
jsMath.Macro('not','\\mathrel{\\rlap{\\kern3mu/}}'); |
|
} |
|
|
|
// |
|
// Look for Netscape/Mozilla (any flavor) |
|
// |
|
if (this.hidden.ATTRIBUTE_NODE) { |
|
jsMath.browser = 'Mozilla'; |
|
if (navigator.platform == 'MacPPC') { |
|
this.UpdateTeXfonts({ |
|
cmr10: {'10': {c: 'Ω', tclass: 'normal'}}, |
|
cmmi10: {'10': {c: '<I>Ω</I>', tclass: 'normal'}}, |
|
cmsy10: {'10': {c: '⊗', tclass: 'normal'}}, |
|
cmex10: {'10': {c: '<SPAN STYLE="font-size: 67%">D</SPAN>'}}, |
|
cmti10: {'10': {c: '<I>Ω</I>', tclass: 'normal'}}, |
|
cmbx10: {'10': {c: '<B>Ω</B>', tclass: 'normal'}} |
|
}); |
|
} else { |
|
document.writeln('<SCRIPT SRC="'+this.root+'jsMath-mozilla.js"></SCRIPT>'); |
|
} |
|
for (var i = 0; i < this.TeX.fam.length; i++) { |
|
if (this.TeX.fam[i]) |
|
{this.styles['.'+this.TeX.fam[i]] += '; position: relative'} |
|
} |
|
this.allowAbsoluteDelim = 1; |
|
this.separateSkips = 1; |
|
jsMath.Macro('not','\\mathrel{\\rlap{\\kern3mu/}}'); |
|
} |
|
|
|
// |
|
// Look for OmniWeb |
|
// |
|
if (navigator.accentColorName) { |
|
jsMath.browser = 'OmniWeb'; |
|
this.allowAbsolute = 0; |
|
} |
|
|
|
// |
|
// Look for Opera |
|
// |
|
if (navigator.userAgent.search(" Opera ") >= 0) { |
|
jsMath.browser = 'Opera'; |
|
this.isOpera = 1; |
|
this.UpdateTeXfonts({ |
|
cmr10: { |
|
'10': {c: 'Ω', tclass: 'normal'}, |
|
'20': {c: 'ˇ', tclass: 'normal'} |
|
}, |
|
cmmi10: { |
|
'10': {c: '<I>Ω</I>', tclass: 'normal'}, |
|
'20': {c: 'κ', tclass: 'normal'} |
|
}, |
|
cmsy10: { |
|
'10': {c: '⊗', tclass: 'normal'}, |
|
'20': {c: '≤', tclass: 'normal'} |
|
}, |
|
cmex10: { |
|
'10': {c: '<SPAN STYLE="font-size: 67%">D</SPAN>'}, |
|
'20': {c: '<SPAN STYLE="font-size: 82%">"</SPAN>'} |
|
}, |
|
cmti10: { |
|
'10': {c: '<I>Ω</I>', tclass: 'normal'}, |
|
'20': {c: '<I>ˇ</I>', tclass: 'normal'} |
|
}, |
|
cmbx10: { |
|
'10': {c: '<B>Ω</B>', tclass: 'normal'}, |
|
'20': {c: '<B>ˇ</B>', tclass: 'normal'} |
|
} |
|
}); |
|
this.allowAbsolute = 0; |
|
jsMath.delay = 10; |
|
} |
|
|
|
// |
|
// Look for Safari |
|
// |
|
if (this.isSafari) { |
|
jsMath.browser = 'Safari'; |
|
var version = navigator.userAgent.match("Safari/([0-9]+)")[1]; |
|
if (version < 125) {this.allowAbsolute = 0; this.oldSafari = 1} |
|
for (var i = 0; i < this.TeX.fam.length; i++) |
|
{if (this.TeX.fam[i] != '') {this.TeX[this.TeX.fam[i]].dh = .1}} |
|
this.absoluteOffsetY = -.05; |
|
this.TeX.axis_height += .05; |
|
this.allowAbsoluteDelim = ! this.oldSafari; |
|
} |
|
|
|
// |
|
// Change some routines depending on the browser |
|
// |
|
if (this.allowAbsoluteDelim) { |
|
jsMath.Box.DelimExtend = jsMath.Box.DelimExtendAbsolute; |
|
jsMath.Box.Layout = jsMath.Box.LayoutAbsolute; |
|
} else { |
|
jsMath.Box.DelimExtend = jsMath.Box.DelimExtendRelative; |
|
jsMath.Box.Layout = jsMath.Box.LayoutRelative; |
|
} |
|
|
|
if (this.separateNegativeSkips) { |
|
jsMath.HTML.Place = jsMath.HTML.PlaceSeparateNegative; |
|
jsMath.Typeset.prototype.Place = jsMath.Typeset.prototype.PlaceSeparateNegative; |
|
} else if (this.separateSkips) { |
|
jsMath.HTML.Place = jsMath.HTML.PlaceSeparateSkips; |
|
jsMath.Typeset.prototype.Place = jsMath.Typeset.prototype.PlaceSeparateSkips; |
|
} |
|
|
|
if (this.noEmptySpans) {jsMath.HTML.Spacer = jsMath.HTML.SpacerImage} |
|
|
|
}, |
|
|
|
/* |
|
* Define some styles |
|
*/ |
|
WriteStyles: function (styles) { |
|
document.writeln('<STYLE TYPE="text/css">'); |
|
for (var id in styles) {document.writeln(' '+id+' {'+styles[id]+'}')} |
|
document.writeln('</STYLE>'); |
|
}, |
|
|
|
/* |
|
* Send the style definitions to the browser (these may be adjusted |
|
* by the browser-specific code) |
|
*/ |
|
InitStyles: function () {this.WriteStyles(this.styles)}, |
|
|
|
/* |
|
* Update specific parameters for a limited number of font entries |
|
*/ |
|
UpdateTeXfonts: function (change) { |
|
for (var font in change) { |
|
for (var code in change[font]) { |
|
for (var id in change[font][code]) { |
|
this.TeX[font][code][id] = change[font][code][id]; |
|
} |
|
} |
|
} |
|
}, |
|
|
|
/* |
|
* Update the character code for every character in a list |
|
* of fonts |
|
*/ |
|
UpdateTeXfontCodes: function (change) { |
|
for (var font in change) { |
|
for (var i = 0; i < change[font].length; i++) { |
|
this.TeX[font][i].c = change[font][i]; |
|
} |
|
} |
|
}, |
|
|
|
/* |
|
* Add a collection of styles to the style list |
|
*/ |
|
UpdateStyles: function (styles) { |
|
for (var i in styles) {this.styles[i] = styles[i]} |
|
}, |
|
|
|
/* |
|
* Manage JavaScript objects: |
|
* |
|
* Add: simply add items to an object |
|
* Package: add items to an object prototype |
|
*/ |
|
Add: function (obj,def) {for (var id in def) {obj[id] = def[id]}}, |
|
Package: function (obj,def) {this.Add(obj.prototype,def)} |
|
|
|
} |
|
|
|
|
|
/***************************************************************************/ |
|
|
|
jsMath.Add(jsMath.TeX,{ |
|
|
|
// The TeX math atom types (see Appendix G of the TeXbook) |
|
atom: ['ord', 'op', 'bin', 'rel', 'open', 'close', 'punct', 'ord'], |
|
|
|
// The TeX font families |
|
fam: ['cmr10','cmmi10','cmsy10','cmex10','cmti10','','cmbx10'], |
|
|
|
/* |
|
* The following are the TeX font mappings and metrics. The metric |
|
* information comes directly from the TeX .tfm files, and the |
|
* character mappings are for the TrueType TeX fonts. Browser-specific |
|
* adjustments are made to these tables in the InitBrowser() routine |
|
*/ |
|
cmr10: [ |
|
// 00 - 0F |
|
{c: '¡', h: 0.683, w: 0.625}, |
|
{c: '¢', h: 0.683, w: 0.833}, |
|
{c: '£', h: 0.683, w: 0.778}, |
|
{c: '¤', h: 0.683, w: 0.694}, |
|
{c: '¥', h: 0.683, w: 0.667}, |
|
{c: '¦', h: 0.683, w: 0.75}, |
|
{c: '§', h: 0.683, w: 0.722}, |
|
{c: '¨', h: 0.683, w: 0.778}, |
|
{c: '©', h: 0.683, w: 0.722}, |
|
{c: 'ª', h: 0.683, w: 0.778}, |
|
{c: '­', h: 0.683, w: 0.722}, |
|
{c: '®', h: 0.694, w: 0.583, ic: 0.0778, krn: {'39': 0.0778, '63': 0.0778, '33': 0.0778, '41': 0.0778, '93': 0.0778}, lig: {'105': 14, '108': 15}}, |
|
{c: '¯', h: 0.694, w: 0.556}, |
|
{c: '°', h: 0.694, w: 0.556}, |
|
{c: '±', h: 0.694, w: 0.833}, |
|
{c: '²', h: 0.694, w: 0.833}, |
|
// 10 - 1F |
|
{c: '³', h: 0.431, w: 0.278}, |
|
{c: '´', h: 0.431, d: 0.194, w: 0.306}, |
|
{c: 'µ', h: 0.694, w: 0.5}, |
|
{c: '¶', h: 0.694, w: 0.5}, |
|
{c: '∙', h: 0.628, w: 0.5}, |
|
{c: '¸', h: 0.694, w: 0.5}, |
|
{c: '¹', h: 0.568, w: 0.5}, |
|
{c: 'º', h: 0.694, w: 0.75}, |
|
{c: '»', d: 0.17, w: 0.444}, |
|
{c: '¼', h: 0.694, w: 0.5}, |
|
{c: '½', h: 0.431, w: 0.722}, |
|
{c: '¾', h: 0.431, w: 0.778}, |
|
{c: '¿', h: 0.528, d: 0.0972, w: 0.5}, |
|
{c: 'À', h: 0.683, w: 0.903}, |
|
{c: 'Á', h: 0.683, w: 1.01}, |
|
{c: 'Â', h: 0.732, d: 0.0486, w: 0.778}, |
|
// 20 - 2F |
|
{c: 'Ã', h: 0.431, w: 0.278, krn: {'108': -0.278, '76': -0.319}}, |
|
{c: '!', h: 0.694, w: 0.278, lig: {'96': 60}}, |
|
{c: '"', h: 0.694, w: 0.5}, |
|
{c: '#', h: 0.694, d: 0.194, w: 0.833}, |
|
{c: '$', h: 0.75, d: 0.0556, w: 0.5}, |
|
{c: '%', h: 0.75, d: 0.0556, w: 0.833}, |
|
{c: '&', h: 0.694, w: 0.778}, |
|
{c: '\'', h: 0.694, w: 0.278, krn: {'63': 0.111, '33': 0.111}, lig: {'39': 34}}, |
|
{c: '(', h: 0.75, d: 0.25, w: 0.389}, |
|
{c: ')', h: 0.75, d: 0.25, w: 0.389}, |
|
{c: '*', h: 0.75, w: 0.5}, |
|
{c: '+', h: 0.583, d: 0.0833, w: 0.778}, |
|
{c: ',', h: 0.106, d: 0.194, w: 0.278}, |
|
{c: '-', h: 0.431, w: 0.333, lig: {'45': 123}}, |
|
{c: '.', h: 0.106, w: 0.278}, |
|
{c: '/', h: 0.75, d: 0.25, w: 0.5}, |
|
// 30 - 3F |
|
{c: '0', h: 0.644, w: 0.5}, |
|
{c: '1', h: 0.644, w: 0.5}, |
|
{c: '2', h: 0.644, w: 0.5}, |
|
{c: '3', h: 0.644, w: 0.5}, |
|
{c: '4', h: 0.644, w: 0.5}, |
|
{c: '5', h: 0.644, w: 0.5}, |
|
{c: '6', h: 0.644, w: 0.5}, |
|
{c: '7', h: 0.644, w: 0.5}, |
|
{c: '8', h: 0.644, w: 0.5}, |
|
{c: '9', h: 0.644, w: 0.5}, |
|
{c: ':', h: 0.431, w: 0.278}, |
|
{c: ';', h: 0.431, d: 0.194, w: 0.278}, |
|
{c: '<', h: 0.5, d: 0.194, w: 0.278}, |
|
{c: '=', h: 0.367, d: -0.133, w: 0.778}, |
|
{c: '>', h: 0.5, d: 0.194, w: 0.472}, |
|
{c: '?', h: 0.694, w: 0.472, lig: {'96': 62}}, |
|
// 40 - 4F |
|
{c: '@', h: 0.694, w: 0.778}, |
|
{c: 'A', h: 0.683, w: 0.75, krn: {'116': -0.0278, '67': -0.0278, '79': -0.0278, '71': -0.0278, '85': -0.0278, '81': -0.0278, '84': -0.0833, '89': -0.0833, '86': -0.111, '87': -0.111}}, |
|
{c: 'B', h: 0.683, w: 0.708}, |
|
{c: 'C', h: 0.683, w: 0.722}, |
|
{c: 'D', h: 0.683, w: 0.764, krn: {'88': -0.0278, '87': -0.0278, '65': -0.0278, '86': -0.0278, '89': -0.0278}}, |
|
{c: 'E', h: 0.683, w: 0.681}, |
|
{c: 'F', h: 0.683, w: 0.653, krn: {'111': -0.0833, '101': -0.0833, '117': -0.0833, '114': -0.0833, '97': -0.0833, '65': -0.111, '79': -0.0278, '67': -0.0278, '71': -0.0278, '81': -0.0278}}, |
|
{c: 'G', h: 0.683, w: 0.785}, |
|
{c: 'H', h: 0.683, w: 0.75}, |
|
{c: 'I', h: 0.683, w: 0.361, krn: {'73': 0.0278}}, |
|
{c: 'J', h: 0.683, w: 0.514}, |
|
{c: 'K', h: 0.683, w: 0.778, krn: {'79': -0.0278, '67': -0.0278, '71': -0.0278, '81': -0.0278}}, |
|
{c: 'L', h: 0.683, w: 0.625, krn: {'84': -0.0833, '89': -0.0833, '86': -0.111, '87': -0.111}}, |
|
{c: 'M', h: 0.683, w: 0.917}, |
|
{c: 'N', h: 0.683, w: 0.75}, |
|
{c: 'O', h: 0.683, w: 0.778, krn: {'88': -0.0278, '87': -0.0278, '65': -0.0278, '86': -0.0278, '89': -0.0278}}, |
|
// 50 - 5F |
|
{c: 'P', h: 0.683, w: 0.681, krn: {'65': -0.0833, '111': -0.0278, '101': -0.0278, '97': -0.0278, '46': -0.0833, '44': -0.0833}}, |
|
{c: 'Q', h: 0.683, d: 0.194, w: 0.778}, |
|
{c: 'R', h: 0.683, w: 0.736, krn: {'116': -0.0278, '67': -0.0278, '79': -0.0278, '71': -0.0278, '85': -0.0278, '81': -0.0278, '84': -0.0833, '89': -0.0833, '86': -0.111, '87': -0.111}}, |
|
{c: 'S', h: 0.683, w: 0.556}, |
|
{c: 'T', h: 0.683, w: 0.722, krn: {'121': -0.0278, '101': -0.0833, '111': -0.0833, '114': -0.0833, '97': -0.0833, '65': -0.0833, '117': -0.0833}}, |
|
{c: 'U', h: 0.683, w: 0.75}, |
|
{c: 'V', h: 0.683, w: 0.75, ic: 0.0139, krn: {'111': -0.0833, '101': -0.0833, '117': -0.0833, '114': -0.0833, '97': -0.0833, '65': -0.111, '79': -0.0278, '67': -0.0278, '71': -0.0278, '81': -0.0278}}, |
|
{c: 'W', h: 0.683, w: 1.03, ic: 0.0139, krn: {'111': -0.0833, '101': -0.0833, '117': -0.0833, '114': -0.0833, '97': -0.0833, '65': -0.111, '79': -0.0278, '67': -0.0278, '71': -0.0278, '81': -0.0278}}, |
|
{c: 'X', h: 0.683, w: 0.75, krn: {'79': -0.0278, '67': -0.0278, '71': -0.0278, '81': -0.0278}}, |
|
{c: 'Y', h: 0.683, w: 0.75, ic: 0.025, krn: {'101': -0.0833, '111': -0.0833, '114': -0.0833, '97': -0.0833, '65': -0.0833, '117': -0.0833}}, |
|
{c: 'Z', h: 0.683, w: 0.611}, |
|
{c: '[', h: 0.75, d: 0.25, w: 0.278}, |
|
{c: '\\', h: 0.694, w: 0.5}, |
|
{c: ']', h: 0.75, d: 0.25, w: 0.278}, |
|
{c: '^', h: 0.694, w: 0.5}, |
|
{c: '_', h: 0.668, w: 0.278}, |
|
// 60 - 6F |
|
{c: '`', h: 0.694, w: 0.278, lig: {'96': 92}}, |
|
{c: 'a', h: 0.431, w: 0.5, krn: {'118': -0.0278, '106': 0.0556, '121': -0.0278, '119': -0.0278}}, |
|
{c: 'b', h: 0.694, w: 0.556, krn: {'101': 0.0278, '111': 0.0278, '120': -0.0278, '100': 0.0278, '99': 0.0278, '113': 0.0278, '118': -0.0278, '106': 0.0556, '121': -0.0278, '119': -0.0278}}, |
|
{c: 'c', h: 0.431, w: 0.444, krn: {'104': -0.0278, '107': -0.0278}}, |
|
{c: 'd', h: 0.694, w: 0.556}, |
|
{c: 'e', h: 0.431, w: 0.444}, |
|
{c: 'f', h: 0.694, w: 0.306, ic: 0.0778, krn: {'39': 0.0778, '63': 0.0778, '33': 0.0778, '41': 0.0778, '93': 0.0778}, lig: {'105': 12, '102': 11, '108': 13}}, |
|
{c: 'g', h: 0.431, d: 0.194, w: 0.5, ic: 0.0139, krn: {'106': 0.0278}}, |
|
{c: 'h', h: 0.694, w: 0.556, krn: {'116': -0.0278, '117': -0.0278, '98': -0.0278, '121': -0.0278, '118': -0.0278, '119': -0.0278}}, |
|
{c: 'i', h: 0.668, w: 0.278}, |
|
{c: 'j', h: 0.668, d: 0.194, w: 0.306}, |
|
{c: 'k', h: 0.694, w: 0.528, krn: {'97': -0.0556, '101': -0.0278, '97': -0.0278, '111': -0.0278, '99': -0.0278}}, |
|
{c: 'l', h: 0.694, w: 0.278}, |
|
{c: 'm', h: 0.431, w: 0.833, krn: {'116': -0.0278, '117': -0.0278, '98': -0.0278, '121': -0.0278, '118': -0.0278, '119': -0.0278}}, |
|
{c: 'n', h: 0.431, w: 0.556, krn: {'116': -0.0278, '117': -0.0278, '98': -0.0278, '121': -0.0278, '118': -0.0278, '119': -0.0278}}, |
|
{c: 'o', h: 0.431, w: 0.5, krn: {'101': 0.0278, '111': 0.0278, '120': -0.0278, '100': 0.0278, '99': 0.0278, '113': 0.0278, '118': -0.0278, '106': 0.0556, '121': -0.0278, '119': -0.0278}}, |
|
// 70 - 7F |
|
{c: 'p', h: 0.431, d: 0.194, w: 0.556, krn: {'101': 0.0278, '111': 0.0278, '120': -0.0278, '100': 0.0278, '99': 0.0278, '113': 0.0278, '118': -0.0278, '106': 0.0556, '121': -0.0278, '119': -0.0278}}, |
|
{c: 'q', h: 0.431, d: 0.194, w: 0.528}, |
|
{c: 'r', h: 0.431, w: 0.392}, |
|
{c: 's', h: 0.431, w: 0.394}, |
|
{c: 't', h: 0.615, w: 0.389, krn: {'121': -0.0278, '119': -0.0278}}, |
|
{c: 'u', h: 0.431, w: 0.556, krn: {'119': -0.0278}}, |
|
{c: 'v', h: 0.431, w: 0.528, ic: 0.0139, krn: {'97': -0.0556, '101': -0.0278, '97': -0.0278, '111': -0.0278, '99': -0.0278}}, |
|
{c: 'w', h: 0.431, w: 0.722, ic: 0.0139, krn: {'101': -0.0278, '97': -0.0278, '111': -0.0278, '99': -0.0278}}, |
|
{c: 'x', h: 0.431, w: 0.528}, |
|
{c: 'y', h: 0.431, d: 0.194, w: 0.528, ic: 0.0139, krn: {'111': -0.0278, '101': -0.0278, '97': -0.0278, '46': -0.0833, '44': -0.0833}}, |
|
{c: 'z', h: 0.431, w: 0.444}, |
|
{c: '{', h: 0.431, w: 0.5, ic: 0.0278, lig: {'45': 124}}, |
|
{c: '|', h: 0.431, w: 1, ic: 0.0278}, |
|
{c: '}', h: 0.694, w: 0.5}, |
|
{c: '~', h: 0.668, w: 0.5}, |
|
{c: 'Ä', h: 0.668, w: 0.5} |
|
], |
|
|
|
cmmi10: [ |
|
// 00 - 0F |
|
{c: '¡', h: 0.683, w: 0.615, ic: 0.139, krn: {'61': -0.0556, '59': -0.111, '58': -0.111, '127': 0.0833}}, |
|
{c: '¢', h: 0.683, w: 0.833, krn: {'127': 0.167}}, |
|
{c: '£', h: 0.683, w: 0.763, ic: 0.0278, krn: {'127': 0.0833}}, |
|
{c: '¤', h: 0.683, w: 0.694, krn: {'127': 0.167}}, |
|
{c: '¥', h: 0.683, w: 0.742, ic: 0.0757, krn: {'127': 0.0833}}, |
|
{c: '¦', h: 0.683, w: 0.831, ic: 0.0812, krn: {'61': -0.0556, '59': -0.0556, '58': -0.0556, '127': 0.0556}}, |
|
{c: '§', h: 0.683, w: 0.78, ic: 0.0576, krn: {'127': 0.0833}}, |
|
{c: '¨', h: 0.683, w: 0.583, ic: 0.139, krn: {'61': -0.0556, '59': -0.111, '58': -0.111, '127': 0.0556}}, |
|
{c: '©', h: 0.683, w: 0.667, krn: {'127': 0.0833}}, |
|
{c: 'ª', h: 0.683, w: 0.612, ic: 0.11, krn: {'61': -0.0556, '59': -0.0556, '58': -0.0556, '127': 0.0556}}, |
|
{c: '­', h: 0.683, w: 0.772, ic: 0.0502, krn: {'127': 0.0833}}, |
|
{c: '®', h: 0.431, w: 0.64, ic: 0.0037, krn: {'127': 0.0278}}, |
|
{c: '¯', h: 0.694, d: 0.194, w: 0.566, ic: 0.0528, krn: {'127': 0.0833}}, |
|
{c: '°', h: 0.431, d: 0.194, w: 0.518, ic: 0.0556}, |
|
{c: '±', h: 0.694, w: 0.444, ic: 0.0378, krn: {'59': -0.0556, '58': -0.0556, '127': 0.0556}}, |
|
{c: '²', h: 0.431, w: 0.406, krn: {'127': 0.0556}}, |
|
// 10 - 1F |
|
{c: '³', h: 0.694, d: 0.194, w: 0.438, ic: 0.0738, krn: {'127': 0.0833}}, |
|
{c: '´', h: 0.431, d: 0.194, w: 0.497, ic: 0.0359, krn: {'127': 0.0556}}, |
|
{c: 'µ', h: 0.694, w: 0.469, ic: 0.0278, krn: {'127': 0.0833}}, |
|
{c: '¶', h: 0.431, w: 0.354, krn: {'127': 0.0556}}, |
|
{c: '∙', h: 0.431, w: 0.576}, |
|
{c: '¸', h: 0.694, w: 0.583}, |
|
{c: '¹', h: 0.431, d: 0.194, w: 0.603, krn: {'127': 0.0278}}, |
|
{c: 'º', h: 0.431, w: 0.494, ic: 0.0637, krn: {'59': -0.0556, '58': -0.0556, '127': 0.0278}}, |
|
{c: '»', h: 0.694, d: 0.194, w: 0.438, ic: 0.046, krn: {'127': 0.111}}, |
|
{c: '¼', h: 0.431, w: 0.57, ic: 0.0359}, |
|
{c: '½', h: 0.431, d: 0.194, w: 0.517, krn: {'127': 0.0833}}, |
|
{c: '¾', h: 0.431, w: 0.571, ic: 0.0359, krn: {'59': -0.0556, '58': -0.0556}}, |
|
{c: '¿', h: 0.431, w: 0.437, ic: 0.113, krn: {'59': -0.0556, '58': -0.0556, '127': 0.0278}}, |
|
{c: 'À', h: 0.431, w: 0.54, ic: 0.0359, krn: {'127': 0.0278}}, |
|
{c: 'Á', h: 0.694, d: 0.194, w: 0.596, krn: {'127': 0.0833}}, |
|
{c: 'Â', h: 0.431, d: 0.194, w: 0.626, krn: {'127': 0.0556}}, |
|
// 20 - 2F |
|
{c: 'Ã', h: 0.694, d: 0.194, w: 0.651, ic: 0.0359, krn: {'127': 0.111}}, |
|
{c: '!', h: 0.431, w: 0.622, ic: 0.0359}, |
|
{c: '"', h: 0.431, w: 0.466, krn: {'127': 0.0833}}, |
|
{c: '#', h: 0.694, w: 0.591, krn: {'127': 0.0833}}, |
|
{c: '$', h: 0.431, w: 0.828, ic: 0.0278}, |
|
{c: '%', h: 0.431, d: 0.194, w: 0.517, krn: {'127': 0.0833}}, |
|
{c: '&', h: 0.431, d: 0.0972, w: 0.363, ic: 0.0799, krn: {'127': 0.0833}}, |
|
{c: '\'', h: 0.431, d: 0.194, w: 0.654, krn: {'127': 0.0833}}, |
|
{c: '(', h: 0.367, d: -0.133, w: 1}, |
|
{c: ')', h: 0.367, d: -0.133, w: 1}, |
|
{c: '*', h: 0.367, d: -0.133, w: 1}, |
|
{c: '+', h: 0.367, d: -0.133, w: 1}, |
|
{c: ',', h: 0.464, d: -0.0363, w: 0.278}, |
|
{c: '-', h: 0.464, d: -0.0363, w: 0.278}, |
|
{c: '.', h: 0.465, d: -0.0347, w: 0.5}, |
|
{c: '/', h: 0.465, d: -0.0347, w: 0.5}, |
|
// 30 - 3F |
|
{c: '0', h: 0.431, w: 0.5}, |
|
{c: '1', h: 0.431, w: 0.5}, |
|
{c: '2', h: 0.431, w: 0.5}, |
|
{c: '3', h: 0.431, d: 0.194, w: 0.5}, |
|
{c: '4', h: 0.431, d: 0.194, w: 0.5}, |
|
{c: '5', h: 0.431, d: 0.194, w: 0.5}, |
|
{c: '6', h: 0.644, w: 0.5}, |
|
{c: '7', h: 0.431, d: 0.194, w: 0.5}, |
|
{c: '8', h: 0.644, w: 0.5}, |
|
{c: '9', h: 0.431, d: 0.194, w: 0.5}, |
|
{c: ':', h: 0.106, w: 0.278}, |
|
{c: ';', h: 0.106, d: 0.194, w: 0.278}, |
|
{c: '<', h: 0.539, d: 0.0391, w: 0.778}, |
|
{c: '=', h: 0.75, d: 0.25, w: 0.5, krn: {'1': -0.0556, '65': -0.0556, '77': -0.0556, '78': -0.0556, '89': 0.0556, '90': -0.0556}}, |
|
{c: '>', h: 0.539, d: 0.0391, w: 0.778}, |
|
{c: '?', h: 0.465, d: -0.0347, w: 0.5}, |
|
// 40 - 4F |
|
{c: '@', h: 0.694, w: 0.531, ic: 0.0556, krn: {'127': 0.0833}}, |
|
{c: 'A', h: 0.683, w: 0.75, krn: {'127': 0.139}}, |
|
{c: 'B', h: 0.683, w: 0.759, ic: 0.0502, krn: {'127': 0.0833}}, |
|
{c: 'C', h: 0.683, w: 0.715, ic: 0.0715, krn: {'61': -0.0278, '59': -0.0556, '58': -0.0556, '127': 0.0833}}, |
|
{c: 'D', h: 0.683, w: 0.828, ic: 0.0278, krn: {'127': 0.0556}}, |
|
{c: 'E', h: 0.683, w: 0.738, ic: 0.0576, krn: {'127': 0.0833}}, |
|
{c: 'F', h: 0.683, w: 0.643, ic: 0.139, krn: {'61': -0.0556, '59': -0.111, '58': -0.111, '127': 0.0833}}, |
|
{c: 'G', h: 0.683, w: 0.786, krn: {'127': 0.0833}}, |
|
{c: 'H', h: 0.683, w: 0.831, ic: 0.0812, krn: {'61': -0.0556, '59': -0.0556, '58': -0.0556, '127': 0.0556}}, |
|
{c: 'I', h: 0.683, w: 0.44, ic: 0.0785, krn: {'127': 0.111}}, |
|
{c: 'J', h: 0.683, w: 0.555, ic: 0.0962, krn: {'61': -0.0556, '59': -0.111, '58': -0.111, '127': 0.167}}, |
|
{c: 'K', h: 0.683, w: 0.849, ic: 0.0715, krn: {'61': -0.0556, '59': -0.0556, '58': -0.0556, '127': 0.0556}}, |
|
{c: 'L', h: 0.683, w: 0.681, krn: {'127': 0.0278}}, |
|
{c: 'M', h: 0.683, w: 0.97, ic: 0.109, krn: {'61': -0.0556, '59': -0.0556, '58': -0.0556, '127': 0.0833}}, |
|
{c: 'N', h: 0.683, w: 0.803, ic: 0.109, krn: {'61': -0.0833, '61': -0.0278, '59': -0.0556, '58': -0.0556, '127': 0.0833}}, |
|
{c: 'O', h: 0.683, w: 0.763, ic: 0.0278, krn: {'127': 0.0833}}, |
|
// 50 - 5F |
|
{c: 'P', h: 0.683, w: 0.642, ic: 0.139, krn: {'61': -0.0556, '59': -0.111, '58': -0.111, '127': 0.0833}}, |
|
{c: 'Q', h: 0.683, d: 0.194, w: 0.791, krn: {'127': 0.0833}}, |
|
{c: 'R', h: 0.683, w: 0.759, ic: 0.00773, krn: {'127': 0.0833}}, |
|
{c: 'S', h: 0.683, w: 0.613, ic: 0.0576, krn: {'61': -0.0556, '59': -0.0556, '58': -0.0556, '127': 0.0833}}, |
|
{c: 'T', h: 0.683, w: 0.584, ic: 0.139, krn: {'61': -0.0278, '59': -0.0556, '58': -0.0556, '127': 0.0833}}, |
|
{c: 'U', h: 0.683, w: 0.683, ic: 0.109, krn: {'59': -0.111, '58': -0.111, '61': -0.0556, '127': 0.0278}}, |
|
{c: 'V', h: 0.683, w: 0.583, ic: 0.222, krn: {'59': -0.167, '58': -0.167, '61': -0.111}}, |
|
{c: 'W', h: 0.683, w: 0.944, ic: 0.139, krn: {'59': -0.167, '58': -0.167, '61': -0.111}}, |
|
{c: 'X', h: 0.683, w: 0.828, ic: 0.0785, krn: {'61': -0.0833, '61': -0.0278, '59': -0.0556, '58': -0.0556, '127': 0.0833}}, |
|
{c: 'Y', h: 0.683, w: 0.581, ic: 0.222, krn: {'59': -0.167, '58': -0.167, '61': -0.111}}, |
|
{c: 'Z', h: 0.683, w: 0.683, ic: 0.0715, krn: {'61': -0.0556, '59': -0.0556, '58': -0.0556, '127': 0.0833}}, |
|
{c: '[', h: 0.75, w: 0.389}, |
|
{c: '\\', h: 0.694, d: 0.194, w: 0.389}, |
|
{c: ']', h: 0.694, d: 0.194, w: 0.389}, |
|
{c: '^', h: 0.358, d: -0.142, w: 1}, |
|
{c: '_', h: 0.358, d: -0.142, w: 1}, |
|
// 60 - 6F |
|
{c: '`', h: 0.694, w: 0.417, krn: {'127': 0.111}}, |
|
{c: 'a', h: 0.431, w: 0.529}, |
|
{c: 'b', h: 0.694, w: 0.429}, |
|
{c: 'c', h: 0.431, w: 0.433, krn: {'127': 0.0556}}, |
|
{c: 'd', h: 0.694, w: 0.52, krn: {'89': 0.0556, '90': -0.0556, '106': -0.111, '102': -0.167, '127': 0.167}}, |
|
{c: 'e', h: 0.431, w: 0.466, krn: {'127': 0.0556}}, |
|
{c: 'f', h: 0.694, d: 0.194, w: 0.49, ic: 0.108, krn: {'59': -0.0556, '58': -0.0556, '127': 0.167}}, |
|
{c: 'g', h: 0.431, d: 0.194, w: 0.477, ic: 0.0359, krn: {'127': 0.0278}}, |
|
{c: 'h', h: 0.694, w: 0.576, krn: {'127': -0.0278}}, |
|
{c: 'i', h: 0.66, w: 0.345}, |
|
{c: 'j', h: 0.66, d: 0.194, w: 0.412, ic: 0.0572, krn: {'59': -0.0556, '58': -0.0556}}, |
|
{c: 'k', h: 0.694, w: 0.521, ic: 0.0315}, |
|
{c: 'l', h: 0.694, w: 0.298, ic: 0.0197, krn: {'127': 0.0833}}, |
|
{c: 'm', h: 0.431, w: 0.878}, |
|
{c: 'n', h: 0.431, w: 0.6}, |
|
{c: 'o', h: 0.431, w: 0.485, krn: {'127': 0.0556}}, |
|
// 70 - 7F |
|
{c: 'p', h: 0.431, d: 0.194, w: 0.503, krn: {'127': 0.0833}}, |
|
{c: 'q', h: 0.431, d: 0.194, w: 0.446, ic: 0.0359, krn: {'127': 0.0833}}, |
|
{c: 'r', h: 0.431, w: 0.451, ic: 0.0278, krn: {'59': -0.0556, '58': -0.0556, '127': 0.0556}}, |
|
{c: 's', h: 0.431, w: 0.469, krn: {'127': 0.0556}}, |
|
{c: 't', h: 0.615, w: 0.361, krn: {'127': 0.0833}}, |
|
{c: 'u', h: 0.431, w: 0.572, krn: {'127': 0.0278}}, |
|
{c: 'v', h: 0.431, w: 0.485, ic: 0.0359, krn: {'127': 0.0278}}, |
|
{c: 'w', h: 0.431, w: 0.716, ic: 0.0269, krn: {'127': 0.0833}}, |
|
{c: 'x', h: 0.431, w: 0.572, krn: {'127': 0.0278}}, |
|
{c: 'y', h: 0.431, d: 0.194, w: 0.49, ic: 0.0359, krn: {'127': 0.0556}}, |
|
{c: 'z', h: 0.431, w: 0.465, ic: 0.044, krn: {'127': 0.0556}}, |
|
{c: '{', h: 0.431, w: 0.322, krn: {'127': 0.0278}}, |
|
{c: '|', h: 0.431, d: 0.194, w: 0.384, krn: {'127': 0.0833}}, |
|
{c: '}', h: 0.431, d: 0.194, w: 0.636, krn: {'127': 0.111}}, |
|
{c: '~', h: 0.714, w: 0.5, ic: 0.154}, |
|
{c: 'Ä', h: 0.694, w: 0.278, ic: 0.399} |
|
], |
|
|
|
cmsy10: [ |
|
// 00 - 0F |
|
{c: '¡', h: 0.583, d: 0.0833, w: 0.778}, |
|
{c: '¢', h: 0.444, d: -0.0556, w: 0.278}, |
|
{c: '£', h: 0.583, d: 0.0833, w: 0.778}, |
|
{c: '¤', h: 0.465, d: -0.0347, w: 0.5}, |
|
{c: '¥', h: 0.583, d: 0.0833, w: 0.778}, |
|
{c: '¦', h: 0.444, d: -0.0556, w: 0.5}, |
|
{c: '§', h: 0.583, d: 0.0833, w: 0.778}, |
|
{c: '¨', h: 0.583, d: 0.0833, w: 0.778}, |
|
{c: '©', h: 0.583, d: 0.0833, w: 0.778}, |
|
{c: 'ª', h: 0.583, d: 0.0833, w: 0.778}, |
|
{c: '­', h: 0.583, d: 0.0833, w: 0.778}, |
|
{c: '®', h: 0.583, d: 0.0833, w: 0.778}, |
|
{c: '¯', h: 0.583, d: 0.0833, w: 0.778}, |
|
{c: '°', h: 0.694, d: 0.194, w: 1}, |
|
{c: '±', h: 0.444, d: -0.0556, w: 0.5}, |
|
{c: '²', h: 0.444, d: -0.0556, w: 0.5}, |
|
// 10 - 1F |
|
{c: '³', h: 0.464, d: -0.0363, w: 0.778}, |
|
{c: '´', h: 0.464, d: -0.0363, w: 0.778}, |
|
{c: 'µ', h: 0.636, d: 0.136, w: 0.778}, |
|
{c: '¶', h: 0.636, d: 0.136, w: 0.778}, |
|
{c: '∙', h: 0.636, d: 0.136, w: 0.778}, |
|
{c: '¸', h: 0.636, d: 0.136, w: 0.778}, |
|
{c: '¹', h: 0.636, d: 0.136, w: 0.778}, |
|
{c: 'º', h: 0.636, d: 0.136, w: 0.778}, |
|
{c: '»', h: 0.367, d: -0.133, w: 0.778}, |
|
{c: '¼', h: 0.483, d: -0.0169, w: 0.778}, |
|
{c: '½', h: 0.539, d: 0.0391, w: 0.778}, |
|
{c: '¾', h: 0.539, d: 0.0391, w: 0.778}, |
|
{c: '¿', h: 0.539, d: 0.0391, w: 1}, |
|
{c: 'À', h: 0.539, d: 0.0391, w: 1}, |
|
{c: 'Á', h: 0.539, d: 0.0391, w: 0.778}, |
|
{c: 'Â', h: 0.539, d: 0.0391, w: 0.778}, |
|
// 20 - 2F |
|
{c: 'Ã', h: 0.367, d: -0.133, w: 1}, |
|
{c: '!', h: 0.367, d: -0.133, w: 1}, |
|
{c: '"', h: 0.694, d: 0.194, w: 0.5}, |
|
{c: '#', h: 0.694, d: 0.194, w: 0.5}, |
|
{c: '$', h: 0.367, d: -0.133, w: 1}, |
|
{c: '%', h: 0.694, d: 0.194, w: 1}, |
|
{c: '&', h: 0.694, d: 0.194, w: 1}, |
|
{c: '\'', h: 0.464, d: -0.0363, w: 0.778}, |
|
{c: '(', h: 0.367, d: -0.133, w: 1}, |
|
{c: ')', h: 0.367, d: -0.133, w: 1}, |
|
{c: '*', h: 0.694, d: 0.194, w: 0.611}, |
|
{c: '+', h: 0.694, d: 0.194, w: 0.611}, |
|
{c: ',', h: 0.367, d: -0.133, w: 1}, |
|
{c: '-', h: 0.694, d: 0.194, w: 1}, |
|
{c: '.', h: 0.694, d: 0.194, w: 1}, |
|
{c: '/', h: 0.431, w: 0.778}, |
|
// 30 - 3F |
|
{c: '0', h: 0.556, w: 0.275}, |
|
{c: '1', h: 0.431, w: 1}, |
|
{c: '2', h: 0.539, d: 0.0391, w: 0.667}, |
|
{c: '3', h: 0.539, d: 0.0391, w: 0.667}, |
|
{c: '4', h: 0.694, d: 0.194, w: 0.889}, |
|
{c: '5', h: 0.694, d: 0.194, w: 0.889}, |
|
{c: '6', h: 0.694, d: 0.194, w: 0}, |
|
{c: '7', h: 0.367, d: -0.133, w: 0}, |
|
{c: '8', h: 0.694, w: 0.556}, |
|
{c: '9', h: 0.694, w: 0.556}, |
|
{c: ':', h: 0.431, w: 0.667}, |
|
{c: ';', h: 0.75, d: 0.0556, w: 0.5}, |
|
{c: '<', h: 0.694, w: 0.722}, |
|
{c: '=', h: 0.694, w: 0.722}, |
|
{c: '>', h: 0.694, w: 0.778}, |
|
{c: '?', h: 0.694, w: 0.778}, |
|
// 40 - 4F |
|
{c: '@', h: 0.694, w: 0.611}, |
|
{c: 'A', h: 0.683, w: 0.798, krn: {'48': 0.194}}, |
|
{c: 'B', h: 0.683, w: 0.657, ic: 0.0304, krn: {'48': 0.139}}, |
|
{c: 'C', h: 0.683, w: 0.527, ic: 0.0583, krn: {'48': 0.139}}, |
|
{c: 'D', h: 0.683, w: 0.771, ic: 0.0278, krn: {'48': 0.0833}}, |
|
{c: 'E', h: 0.683, w: 0.528, ic: 0.0894, krn: {'48': 0.111}}, |
|
{c: 'F', h: 0.683, w: 0.719, ic: 0.0993, krn: {'48': 0.111}}, |
|
{c: 'G', h: 0.683, d: 0.0972, w: 0.595, ic: 0.0593, krn: {'48': 0.111}}, |
|
{c: 'H', h: 0.683, w: 0.845, ic: 0.00965, krn: {'48': 0.111}}, |
|
{c: 'I', h: 0.683, w: 0.545, ic: 0.0738, krn: {'48': 0.0278}}, |
|
{c: 'J', h: 0.683, d: 0.0972, w: 0.678, ic: 0.185, krn: {'48': 0.167}}, |
|
{c: 'K', h: 0.683, w: 0.762, ic: 0.0144, krn: {'48': 0.0556}}, |
|
{c: 'L', h: 0.683, w: 0.69, krn: {'48': 0.139}}, |
|
{c: 'M', h: 0.683, w: 1.2, krn: {'48': 0.139}}, |
|
{c: 'N', h: 0.683, w: 0.82, ic: 0.147, krn: {'48': 0.0833}}, |
|
{c: 'O', h: 0.683, w: 0.796, ic: 0.0278, krn: {'48': 0.111}}, |
|
// 50 - 5F |
|
{c: 'P', h: 0.683, w: 0.696, ic: 0.0822, krn: {'48': 0.0833}}, |
|
{c: 'Q', h: 0.683, d: 0.0972, w: 0.817, krn: {'48': 0.111}}, |
|
{c: 'R', h: 0.683, w: 0.848, krn: {'48': 0.0833}}, |
|
{c: 'S', h: 0.683, w: 0.606, ic: 0.075, krn: {'48': 0.139}}, |
|
{c: 'T', h: 0.683, w: 0.545, ic: 0.254, krn: {'48': 0.0278}}, |
|
{c: 'U', h: 0.683, w: 0.626, ic: 0.0993, krn: {'48': 0.0833}}, |
|
{c: 'V', h: 0.683, w: 0.613, ic: 0.0822, krn: {'48': 0.0278}}, |
|
{c: 'W', h: 0.683, w: 0.988, ic: 0.0822, krn: {'48': 0.0833}}, |
|
{c: 'X', h: 0.683, w: 0.713, ic: 0.146, krn: {'48': 0.139}}, |
|
{c: 'Y', h: 0.683, d: 0.0972, w: 0.668, ic: 0.0822, krn: {'48': 0.0833}}, |
|
{c: 'Z', h: 0.683, w: 0.725, ic: 0.0794, krn: {'48': 0.139}}, |
|
{c: '[', h: 0.556, w: 0.667}, |
|
{c: '\\', h: 0.556, w: 0.667}, |
|
{c: ']', h: 0.556, w: 0.667}, |
|
{c: '^', h: 0.556, w: 0.667}, |
|
{c: '_', h: 0.556, w: 0.667}, |
|
// 60 - 6F |
|
{c: '`', h: 0.694, w: 0.611}, |
|
{c: 'a', h: 0.694, w: 0.611}, |
|
{c: 'b', h: 0.75, d: 0.25, w: 0.444}, |
|
{c: 'c', h: 0.75, d: 0.25, w: 0.444}, |
|
{c: 'd', h: 0.75, d: 0.25, w: 0.444}, |
|
{c: 'e', h: 0.75, d: 0.25, w: 0.444}, |
|
{c: 'f', h: 0.75, d: 0.25, w: 0.5}, |
|
{c: 'g', h: 0.75, d: 0.25, w: 0.5}, |
|
{c: 'h', h: 0.75, d: 0.25, w: 0.389}, |
|
{c: 'i', h: 0.75, d: 0.25, w: 0.389}, |
|
{c: 'j', h: 0.75, d: 0.25, w: 0.278}, |
|
{c: 'k', h: 0.75, d: 0.25, w: 0.5}, |
|
{c: 'l', h: 0.75, d: 0.25, w: 0.5}, |
|
{c: 'm', h: 0.75, d: 0.25, w: 0.611}, |
|
{c: 'n', h: 0.75, d: 0.25, w: 0.5}, |
|
{c: 'o', h: 0.694, d: 0.194, w: 0.278}, |
|
// 70 - 7F |
|
{c: 'p', h: 0.04, d: 0.96, w: 0.833}, |
|
{c: 'q', h: 0.683, w: 0.75}, |
|
{c: 'r', h: 0.683, w: 0.833}, |
|
{c: 's', h: 0.694, d: 0.194, w: 0.417, ic: 0.111}, |
|
{c: 't', h: 0.556, w: 0.667}, |
|
{c: 'u', h: 0.556, w: 0.667}, |
|
{c: 'v', h: 0.636, d: 0.136, w: 0.778}, |
|
{c: 'w', h: 0.636, d: 0.136, w: 0.778}, |
|
{c: 'x', h: 0.694, d: 0.194, w: 0.444}, |
|
{c: 'y', h: 0.694, d: 0.194, w: 0.444}, |
|
{c: 'z', h: 0.694, d: 0.194, w: 0.444}, |
|
{c: '{', h: 0.694, d: 0.194, w: 0.611}, |
|
{c: '|', h: 0.694, d: 0.13, w: 0.778}, |
|
{c: '}', h: 0.694, d: 0.13, w: 0.778}, |
|
{c: '~', h: 0.694, d: 0.13, w: 0.778}, |
|
{c: 'Ä', h: 0.694, d: 0.13, w: 0.778} |
|
], |
|
|
|
cmex10: [ |
|
// 00 - 0F |
|
{c: '¡', h: 0.04, d: 1.16, w: 0.458, n: 16}, |
|
{c: '¢', h: 0.04, d: 1.16, w: 0.458, n: 17}, |
|
{c: '£', h: 0.04, d: 1.16, w: 0.417, n: 104}, |
|
{c: '¤', h: 0.04, d: 1.16, w: 0.417, n: 105}, |
|
{c: '¥', h: 0.04, d: 1.16, w: 0.472, n: 106}, |
|
{c: '¦', h: 0.04, d: 1.16, w: 0.472, n: 107}, |
|
{c: '§', h: 0.04, d: 1.16, w: 0.472, n: 108}, |
|
{c: '¨', h: 0.04, d: 1.16, w: 0.472, n: 109}, |
|
{c: '©', h: 0.04, d: 1.16, w: 0.583, n: 110}, |
|
{c: 'ª', h: 0.04, d: 1.16, w: 0.583, n: 111}, |
|
{c: '­', h: 0.04, d: 1.16, w: 0.472, n: 68}, |
|
{c: '®', h: 0.04, d: 1.16, w: 0.472, n: 69}, |
|
{c: '¯', d: 0.6, w: 0.333, delim: {rep: 12}}, |
|
{c: '°', d: 0.6, w: 0.556, delim: {rep: 13}}, |
|
{c: '±', h: 0.04, d: 1.16, w: 0.578, n: 46}, |
|
{c: '²', h: 0.04, d: 1.16, w: 0.578, n: 47}, |
|
// 10 - 1F |
|
{c: '³', h: 0.04, d: 1.76, w: 0.597, n: 18}, |
|
{c: '´', h: 0.04, d: 1.76, w: 0.597, n: 19}, |
|
{c: 'µ', h: 0.04, d: 2.36, w: 0.736, n: 32}, |
|
{c: '¶', h: 0.04, d: 2.36, w: 0.736, n: 33}, |
|
{c: '∙', h: 0.04, d: 2.36, w: 0.528, n: 34}, |
|
{c: '¸', h: 0.04, d: 2.36, w: 0.528, n: 35}, |
|
{c: '¹', h: 0.04, d: 2.36, w: 0.583, n: 36}, |
|
{c: 'º', h: 0.04, d: 2.36, w: 0.583, n: 37}, |
|
{c: '»', h: 0.04, d: 2.36, w: 0.583, n: 38}, |
|
{c: '¼', h: 0.04, d: 2.36, w: 0.583, n: 39}, |
|
{c: '½', h: 0.04, d: 2.36, w: 0.75, n: 40}, |
|
{c: '¾', h: 0.04, d: 2.36, w: 0.75, n: 41}, |
|
{c: '¿', h: 0.04, d: 2.36, w: 0.75, n: 42}, |
|
{c: 'À', h: 0.04, d: 2.36, w: 0.75, n: 43}, |
|
{c: 'Á', h: 0.04, d: 2.36, w: 1.04, n: 44}, |
|
{c: 'Â', h: 0.04, d: 2.36, w: 1.04, n: 45}, |
|
// 20 - 2F |
|
{c: 'Ã', h: 0.04, d: 2.96, w: 0.792, n: 48}, |
|
{c: '!', h: 0.04, d: 2.96, w: 0.792, n: 49}, |
|
{c: '"', h: 0.04, d: 2.96, w: 0.583, n: 50}, |
|
{c: '#', h: 0.04, d: 2.96, w: 0.583, n: 51}, |
|
{c: '$', h: 0.04, d: 2.96, w: 0.639, n: 52}, |
|
{c: '%', h: 0.04, d: 2.96, w: 0.639, n: 53}, |
|
{c: '&', h: 0.04, d: 2.96, w: 0.639, n: 54}, |
|
{c: '\'', h: 0.04, d: 2.96, w: 0.639, n: 55}, |
|
{c: '(', h: 0.04, d: 2.96, w: 0.806, n: 56}, |
|
{c: ')', h: 0.04, d: 2.96, w: 0.806, n: 57}, |
|
{c: '*', h: 0.04, d: 2.96, w: 0.806}, |
|
{c: '+', h: 0.04, d: 2.96, w: 0.806}, |
|
{c: ',', h: 0.04, d: 2.96, w: 1.28}, |
|
{c: '-', h: 0.04, d: 2.96, w: 1.28}, |
|
{c: '.', h: 0.04, d: 1.76, w: 0.811, n: 30}, |
|
{c: '/', h: 0.04, d: 1.76, w: 0.811, n: 31}, |
|
// 30 - 3F |
|
{c: '0', h: 0.04, d: 1.76, w: 0.875, delim: {top: 48, bot: 64, rep: 66}}, |
|
{c: '1', h: 0.04, d: 1.76, w: 0.875, delim: {top: 49, bot: 65, rep: 67}}, |
|
{c: '2', h: 0.04, d: 1.76, w: 0.667, delim: {top: 50, bot: 52, rep: 54}}, |
|
{c: '3', h: 0.04, d: 1.76, w: 0.667, delim: {top: 51, bot: 53, rep: 55}}, |
|
{c: '4', h: 0.04, d: 1.76, w: 0.667, delim: {bot: 52, rep: 54}}, |
|
{c: '5', h: 0.04, d: 1.76, w: 0.667, delim: {bot: 53, rep: 55}}, |
|
{c: '6', d: 0.6, w: 0.667, delim: {top: 50, rep: 54}}, |
|
{c: '7', d: 0.6, w: 0.667, delim: {top: 51, rep: 55}}, |
|
{c: '8', d: 0.9, w: 0.889, delim: {top: 56, mid: 60, bot: 58, rep: 62}}, |
|
{c: '9', d: 0.9, w: 0.889, delim: {top: 57, mid: 61, bot: 59, rep: 62}}, |
|
{c: ':', d: 0.9, w: 0.889, delim: {top: 56, bot: 58, rep: 62}}, |
|
{c: ';', d: 0.9, w: 0.889, delim: {top: 57, bot: 59, rep: 62}}, |
|
{c: '<', d: 1.8, w: 0.889, delim: {rep: 63}}, |
|
{c: '=', d: 1.8, w: 0.889, delim: {rep: 119}}, |
|
{c: '>', d: 0.3, w: 0.889, delim: {rep: 62}}, |
|
{c: '?', d: 0.6, w: 0.667, delim: {top: 120, bot: 121, rep: 63}}, |
|
// 40 - 4F |
|
{c: '@', h: 0.04, d: 1.76, w: 0.875, delim: {top: 56, bot: 59, rep: 62}}, |
|
{c: 'A', h: 0.04, d: 1.76, w: 0.875, delim: {top: 57, bot: 58, rep: 62}}, |
|
{c: 'B', d: 0.6, w: 0.875, delim: {rep: 66}}, |
|
{c: 'C', d: 0.6, w: 0.875, delim: {rep: 67}}, |
|
{c: 'D', h: 0.04, d: 1.76, w: 0.611, n: 28}, |
|
{c: 'E', h: 0.04, d: 1.76, w: 0.611, n: 29}, |
|
{c: 'F', d: 1, w: 0.833, n: 71}, |
|
{c: 'G', h: 0.1, d: 1.5, w: 1.11}, |
|
{c: 'H', d: 1.11, w: 0.472, ic: 0.194, n: 73}, |
|
{c: 'I', d: 2.22, w: 0.556, ic: 0.444}, |
|
{c: 'J', d: 1, w: 1.11, n: 75}, |
|
{c: 'K', h: 0.1, d: 1.5, w: 1.51}, |
|
{c: 'L', d: 1, w: 1.11, n: 77}, |
|
{c: 'M', h: 0.1, d: 1.5, w: 1.51}, |
|
{c: 'N', d: 1, w: 1.11, n: 79}, |
|
{c: 'O', h: 0.1, d: 1.5, w: 1.51}, |
|
// 50 - 5F |
|
{c: 'P', d: 1, w: 1.06, n: 88}, |
|
{c: 'Q', d: 1, w: 0.944, n: 89}, |
|
{c: 'R', d: 1.11, w: 0.472, ic: 0.194, n: 90}, |
|
{c: 'S', d: 1, w: 0.833, n: 91}, |
|
{c: 'T', d: 1, w: 0.833, n: 92}, |
|
{c: 'U', d: 1, w: 0.833, n: 93}, |
|
{c: 'V', d: 1, w: 0.833, n: 94}, |
|
{c: 'W', d: 1, w: 0.833, n: 95}, |
|
{c: 'X', h: 0.1, d: 1.5, w: 1.44}, |
|
{c: 'Y', h: 0.1, d: 1.5, w: 1.28}, |
|
{c: 'Z', d: 2.22, w: 0.556, ic: 0.444}, |
|
{c: '[', h: 0.1, d: 1.5, w: 1.11}, |
|
{c: '\\', h: 0.1, d: 1.5, w: 1.11}, |
|
{c: ']', h: 0.1, d: 1.5, w: 1.11}, |
|
{c: '^', h: 0.1, d: 1.5, w: 1.11}, |
|
{c: '_', h: 0.1, d: 1.5, w: 1.11}, |
|
// 60 - 6F |
|
{c: '`', d: 1, w: 0.944, n: 97}, |
|
{c: 'a', h: 0.1, d: 1.5, w: 1.28}, |
|
{c: 'b', h: 0.722, w: 0.556, n: 99}, |
|
{c: 'c', h: 0.75, w: 1, n: 100}, |
|
{c: 'd', h: 0.75, w: 1.44}, |
|
{c: 'e', h: 0.722, w: 0.556, n: 102}, |
|
{c: 'f', h: 0.75, w: 1, n: 103}, |
|
{c: 'g', h: 0.75, w: 1.44}, |
|
{c: 'h', h: 0.04, d: 1.76, w: 0.472, n: 20}, |
|
{c: 'i', h: 0.04, d: 1.76, w: 0.472, n: 21}, |
|
{c: 'j', h: 0.04, d: 1.76, w: 0.528, n: 22}, |
|
{c: 'k', h: 0.04, d: 1.76, w: 0.528, n: 23}, |
|
{c: 'l', h: 0.04, d: 1.76, w: 0.528, n: 24}, |
|
{c: 'm', h: 0.04, d: 1.76, w: 0.528, n: 25}, |
|
{c: 'n', h: 0.04, d: 1.76, w: 0.667, n: 26}, |
|
{c: 'o', h: 0.04, d: 1.76, w: 0.667, n: 27}, |
|
// 70 - 7F |
|
{c: 'p', h: 0.04, d: 1.16, w: 1, n: 113}, |
|
{c: 'q', h: 0.04, d: 1.76, w: 1, n: 114}, |
|
{c: 'r', h: 0.04, d: 2.36, w: 1, n: 115}, |
|
{c: 's', h: 0.04, d: 2.96, w: 1, n: 116}, |
|
{c: 't', d: 1.8, w: 1.06, delim: {top: 118, bot: 116, rep: 117}}, |
|
{c: 'u', d: 0.6, w: 1.06}, |
|
{c: 'v', h: 0.04, d: 0.56, w: 1.06}, |
|
{c: 'w', d: 0.6, w: 0.778, delim: {top: 126, bot: 127, rep: 119}}, |
|
{c: 'x', d: 0.6, w: 0.667, delim: {top: 120, rep: 63}}, |
|
{c: 'y', d: 0.6, w: 0.667, delim: {bot: 121, rep: 63}}, |
|
{c: 'z', h: 0.12, w: 0.45}, |
|
{c: '{', h: 0.12, w: 0.45}, |
|
{c: '|', h: 0.12, w: 0.45}, |
|
{c: '}', h: 0.12, w: 0.45}, |
|
{c: '~', d: 0.6, w: 0.778, delim: {top: 126, rep: 119}}, |
|
{c: 'Ä', d: 0.6, w: 0.778, delim: {bot: 127, rep: 119}} |
|
], |
|
|
|
cmti10: [ |
|
// 00 - 0F |
|
{c: '¡', h: 0.683, w: 0.627, ic: 0.133}, |
|
{c: '¢', h: 0.683, w: 0.818}, |
|
{c: '£', h: 0.683, w: 0.767, ic: 0.094}, |
|
{c: '¤', h: 0.683, w: 0.692}, |
|
{c: '¥', h: 0.683, w: 0.664, ic: 0.153}, |
|
{c: '¦', h: 0.683, w: 0.743, ic: 0.164}, |
|
{c: '§', h: 0.683, w: 0.716, ic: 0.12}, |
|
{c: '¨', h: 0.683, w: 0.767, ic: 0.111}, |
|
{c: '©', h: 0.683, w: 0.716, ic: 0.0599}, |
|
{c: 'ª', h: 0.683, w: 0.767, ic: 0.111}, |
|
{c: '­', h: 0.683, w: 0.716, ic: 0.103}, |
|
{c: '®', h: 0.694, d: 0.194, w: 0.613, ic: 0.212, krn: {'39': 0.104, '63': 0.104, '33': 0.104, '41': 0.104, '93': 0.104}, lig: {'105': 14, '108': 15}}, |
|
{c: '¯', h: 0.694, d: 0.194, w: 0.562, ic: 0.103}, |
|
{c: '°', h: 0.694, d: 0.194, w: 0.588, ic: 0.103}, |
|
{c: '±', h: 0.694, d: 0.194, w: 0.882, ic: 0.103}, |
|
{c: '²', h: 0.694, d: 0.194, w: 0.894, ic: 0.103}, |
|
// 10 - 1F |
|
{c: '³', h: 0.431, w: 0.307, ic: 0.0767}, |
|
{c: '´', h: 0.431, d: 0.194, w: 0.332, ic: 0.0374}, |
|
{c: 'µ', h: 0.694, w: 0.511}, |
|
{c: '¶', h: 0.694, w: 0.511, ic: 0.0969}, |
|
{c: '∙', h: 0.628, w: 0.511, ic: 0.083}, |
|
{c: '¸', h: 0.694, w: 0.511, ic: 0.108}, |
|
{c: '¹', h: 0.562, w: 0.511, ic: 0.103}, |
|
{c: 'º', h: 0.694, w: 0.831}, |
|
{c: '»', d: 0.17, w: 0.46}, |
|
{c: '¼', h: 0.694, d: 0.194, w: 0.537, ic: 0.105}, |
|
{c: '½', h: 0.431, w: 0.716, ic: 0.0751}, |
|
{c: '¾', h: 0.431, w: 0.716, ic: 0.0751}, |
|
{c: '¿', h: 0.528, d: 0.0972, w: 0.511, ic: 0.0919}, |
|
{c: 'À', h: 0.683, w: 0.883, ic: 0.12}, |
|
{c: 'Á', h: 0.683, w: 0.985, ic: 0.12}, |
|
{c: 'Â', h: 0.732, d: 0.0486, w: 0.767, ic: 0.094}, |
|
// 20 - 2F |
|
{c: 'Ã', h: 0.431, w: 0.256, krn: {'108': -0.256, '76': -0.321}}, |
|
{c: '!', h: 0.694, w: 0.307, ic: 0.124, lig: {'96': 60}}, |
|
{c: '"', h: 0.694, w: 0.514, ic: 0.0696}, |
|
{c: '#', h: 0.694, d: 0.194, w: 0.818, ic: 0.0662}, |
|
{c: '$', h: 0.694, w: 0.769}, |
|
{c: '%', h: 0.75, d: 0.0556, w: 0.818, ic: 0.136}, |
|
{c: '&', h: 0.694, w: 0.767, ic: 0.0969}, |
|
{c: '\'', h: 0.694, w: 0.307, ic: 0.124, krn: {'63': 0.102, '33': 0.102}, lig: {'39': 34}}, |
|
{c: '(', h: 0.75, d: 0.25, w: 0.409, ic: 0.162}, |
|
{c: ')', h: 0.75, d: 0.25, w: 0.409, ic: 0.0369}, |
|
{c: '*', h: 0.75, w: 0.511, ic: 0.149}, |
|
{c: '+', h: 0.562, d: 0.0567, w: 0.767, ic: 0.0369}, |
|
{c: ',', h: 0.106, d: 0.194, w: 0.307}, |
|
{c: '-', h: 0.431, w: 0.358, ic: 0.0283, lig: {'45': 123}}, |
|
{c: '.', h: 0.106, w: 0.307}, |
|
{c: '/', h: 0.75, d: 0.25, w: 0.511, ic: 0.162}, |
|
// 30 - 3F |
|
{c: '0', h: 0.644, w: 0.511, ic: 0.136}, |
|
{c: '1', h: 0.644, w: 0.511, ic: 0.136}, |
|
{c: '2', h: 0.644, w: 0.511, ic: 0.136}, |
|
{c: '3', h: 0.644, w: 0.511, ic: 0.136}, |
|
{c: '4', h: 0.644, d: 0.194, w: 0.511, ic: 0.136}, |
|
{c: '5', h: 0.644, w: 0.511, ic: 0.136}, |
|
{c: '6', h: 0.644, w: 0.511, ic: 0.136}, |
|
{c: '7', h: 0.644, d: 0.194, w: 0.511, ic: 0.136}, |
|
{c: '8', h: 0.644, w: 0.511, ic: 0.136}, |
|
{c: '9', h: 0.644, w: 0.511, ic: 0.136}, |
|
{c: ':', h: 0.431, w: 0.307, ic: 0.0582}, |
|
{c: ';', h: 0.431, d: 0.194, w: 0.307, ic: 0.0582}, |
|
{c: '<', h: 0.5, d: 0.194, w: 0.307, ic: 0.0756}, |
|
{c: '=', h: 0.367, d: -0.133, w: 0.767, ic: 0.0662}, |
|
{c: '>', h: 0.5, d: 0.194, w: 0.511}, |
|
{c: '?', h: 0.694, w: 0.511, ic: 0.122, lig: {'96': 62}}, |
|
// 40 - 4F |
|
{c: '@', h: 0.694, w: 0.767, ic: 0.096}, |
|
{c: 'A', h: 0.683, w: 0.743, krn: {'110': -0.0256, '108': -0.0256, '114': -0.0256, '117': -0.0256, '109': -0.0256, '116': -0.0256, '105': -0.0256, '67': -0.0256, '79': -0.0256, '71': -0.0256, '104': -0.0256, '98': -0.0256, '85': -0.0256, '107': -0.0256, '118': -0.0256, '119': -0.0256, '81': -0.0256, '84': -0.0767, '89': -0.0767, '86': -0.102, '87': -0.102, '101': -0.0511, '97': -0.0511, '111': -0.0511, '100': -0.0511, '99': -0.0511, '103': -0.0511, '113': -0.0511}}, |
|
{c: 'B', h: 0.683, w: 0.704, ic: 0.103}, |
|
{c: 'C', h: 0.683, w: 0.716, ic: 0.145}, |
|
{c: 'D', h: 0.683, w: 0.755, ic: 0.094, krn: {'88': -0.0256, '87': -0.0256, '65': -0.0256, '86': -0.0256, '89': -0.0256}}, |
|
{c: 'E', h: 0.683, w: 0.678, ic: 0.12}, |
|
{c: 'F', h: 0.683, w: 0.653, ic: 0.133, krn: {'111': -0.0767, '101': -0.0767, '117': -0.0767, '114': -0.0767, '97': -0.0767, '65': -0.102, '79': -0.0256, '67': -0.0256, '71': -0.0256, '81': -0.0256}}, |
|
{c: 'G', h: 0.683, w: 0.774, ic: 0.0872}, |
|
{c: 'H', h: 0.683, w: 0.743, ic: 0.164}, |
|
{c: 'I', h: 0.683, w: 0.386, ic: 0.158}, |
|
{c: 'J', h: 0.683, w: 0.525, ic: 0.14}, |
|
{c: 'K', h: 0.683, w: 0.769, ic: 0.145, krn: {'79': -0.0256, '67': -0.0256, '71': -0.0256, '81': -0.0256}}, |
|
{c: 'L', h: 0.683, w: 0.627, krn: {'84': -0.0767, '89': -0.0767, '86': -0.102, '87': -0.102, '101': -0.0511, '97': -0.0511, '111': -0.0511, '100': -0.0511, '99': -0.0511, '103': -0.0511, '113': -0.0511}}, |
|
{c: 'M', h: 0.683, w: 0.897, ic: 0.164}, |
|
{c: 'N', h: 0.683, w: 0.743, ic: 0.164}, |
|
{c: 'O', h: 0.683, w: 0.767, ic: 0.094, krn: {'88': -0.0256, '87': -0.0256, '65': -0.0256, '86': -0.0256, '89': -0.0256}}, |
|
// 50 - 5F |
|
{c: 'P', h: 0.683, w: 0.678, ic: 0.103, krn: {'65': -0.0767}}, |
|
{c: 'Q', h: 0.683, d: 0.194, w: 0.767, ic: 0.094}, |
|
{c: 'R', h: 0.683, w: 0.729, ic: 0.0387, krn: {'110': -0.0256, '108': -0.0256, '114': -0.0256, '117': -0.0256, '109': -0.0256, '116': -0.0256, '105': -0.0256, '67': -0.0256, '79': -0.0256, '71': -0.0256, '104': -0.0256, '98': -0.0256, '85': -0.0256, '107': -0.0256, '118': -0.0256, '119': -0.0256, '81': -0.0256, '84': -0.0767, '89': -0.0767, '86': -0.102, '87': -0.102, '101': -0.0511, '97': -0.0511, '111': -0.0511, '100': -0.0511, '99': -0.0511, '103': -0.0511, '113': -0.0511}}, |
|
{c: 'S', h: 0.683, w: 0.562, ic: 0.12}, |
|
{c: 'T', h: 0.683, w: 0.716, ic: 0.133, krn: {'121': -0.0767, '101': -0.0767, '111': -0.0767, '114': -0.0767, '97': -0.0767, '117': -0.0767, '65': -0.0767}}, |
|
{c: 'U', h: 0.683, w: 0.743, ic: 0.164}, |
|
{c: 'V', h: 0.683, w: 0.743, ic: 0.184, krn: {'111': -0.0767, '101': -0.0767, '117': -0.0767, '114': -0.0767, '97': -0.0767, '65': -0.102, '79': -0.0256, '67': -0.0256, '71': -0.0256, '81': -0.0256}}, |
|
{c: 'W', h: 0.683, w: 0.999, ic: 0.184, krn: {'65': -0.0767}}, |
|
{c: 'X', h: 0.683, w: 0.743, ic: 0.158, krn: {'79': -0.0256, '67': -0.0256, '71': -0.0256, '81': -0.0256}}, |
|
{c: 'Y', h: 0.683, w: 0.743, ic: 0.194, krn: {'101': -0.0767, '111': -0.0767, '114': -0.0767, '97': -0.0767, '117': -0.0767, '65': -0.0767}}, |
|
{c: 'Z', h: 0.683, w: 0.613, ic: 0.145}, |
|
{c: '[', h: 0.75, d: 0.25, w: 0.307, ic: 0.188}, |
|
{c: '\\', h: 0.694, w: 0.514, ic: 0.169}, |
|
{c: ']', h: 0.75, d: 0.25, w: 0.307, ic: 0.105}, |
|
{c: '^', h: 0.694, w: 0.511, ic: 0.0665}, |
|
{c: '_', h: 0.668, w: 0.307, ic: 0.118}, |
|
// 60 - 6F |
|
{c: '`', h: 0.694, w: 0.307, ic: 0.124, lig: {'96': 92}}, |
|
{c: 'a', h: 0.431, w: 0.511, ic: 0.0767}, |
|
{c: 'b', h: 0.694, w: 0.46, ic: 0.0631, krn: {'101': -0.0511, '97': -0.0511, '111': -0.0511, '100': -0.0511, '99': -0.0511, '103': -0.0511, '113': -0.0511}}, |
|
{c: 'c', h: 0.431, w: 0.46, ic: 0.0565, krn: {'101': -0.0511, '97': -0.0511, '111': -0.0511, '100': -0.0511, '99': -0.0511, '103': -0.0511, '113': -0.0511}}, |
|
{c: 'd', h: 0.694, w: 0.511, ic: 0.103, krn: {'108': 0.0511}}, |
|
{c: 'e', h: 0.431, w: 0.46, ic: 0.0751, krn: {'101': -0.0511, '97': -0.0511, '111': -0.0511, '100': -0.0511, '99': -0.0511, '103': -0.0511, '113': -0.0511}}, |
|
{c: 'f', h: 0.694, d: 0.194, w: 0.307, ic: 0.212, krn: {'39': 0.104, '63': 0.104, '33': 0.104, '41': 0.104, '93': 0.104}, lig: {'105': 12, '102': 11, '108': 13}}, |
|
{c: 'g', h: 0.431, d: 0.194, w: 0.46, ic: 0.0885}, |
|
{c: 'h', h: 0.694, w: 0.511, ic: 0.0767}, |
|
{c: 'i', h: 0.655, w: 0.307, ic: 0.102}, |
|
{c: 'j', h: 0.655, d: 0.194, w: 0.307, ic: 0.145}, |
|
{c: 'k', h: 0.694, w: 0.46, ic: 0.108}, |
|
{c: 'l', h: 0.694, w: 0.256, ic: 0.103, krn: {'108': 0.0511}}, |
|
{c: 'm', h: 0.431, w: 0.818, ic: 0.0767}, |
|
{c: 'n', h: 0.431, w: 0.562, ic: 0.0767, krn: {'39': -0.102}}, |
|
{c: 'o', h: 0.431, w: 0.511, ic: 0.0631, krn: {'101': -0.0511, '97': -0.0511, '111': -0.0511, '100': -0.0511, '99': -0.0511, '103': -0.0511, '113': -0.0511}}, |
|
// 70 - 7F |
|
{c: 'p', h: 0.431, d: 0.194, w: 0.511, ic: 0.0631, krn: {'101': -0.0511, '97': -0.0511, '111': -0.0511, '100': -0.0511, '99': -0.0511, '103': -0.0511, '113': -0.0511}}, |
|
{c: 'q', h: 0.431, d: 0.194, w: 0.46, ic: 0.0885}, |
|
{c: 'r', h: 0.431, w: 0.422, ic: 0.108, krn: {'101': -0.0511, '97': -0.0511, '111': -0.0511, '100': -0.0511, '99': -0.0511, '103': -0.0511, '113': -0.0511}}, |
|
{c: 's', h: 0.431, w: 0.409, ic: 0.0821}, |
|
{c: 't', h: 0.615, w: 0.332, ic: 0.0949}, |
|
{c: 'u', h: 0.431, w: 0.537, ic: 0.0767}, |
|
{c: 'v', h: 0.431, w: 0.46, ic: 0.108}, |
|
{c: 'w', h: 0.431, w: 0.664, ic: 0.108, krn: {'108': 0.0511}}, |
|
{c: 'x', h: 0.431, w: 0.464, ic: 0.12}, |
|
{c: 'y', h: 0.431, d: 0.194, w: 0.486, ic: 0.0885}, |
|
{c: 'z', h: 0.431, w: 0.409, ic: 0.123}, |
|
{c: '{', h: 0.431, w: 0.511, ic: 0.0921, lig: {'45': 124}}, |
|
{c: '|', h: 0.431, w: 1.02, ic: 0.0921}, |
|
{c: '}', h: 0.694, w: 0.511, ic: 0.122}, |
|
{c: '~', h: 0.668, w: 0.511, ic: 0.116}, |
|
{c: 'Ä', h: 0.668, w: 0.511, ic: 0.105} |
|
], |
|
|
|
cmbx10: [ |
|
// 00 - 0F |
|
{c: '¡', h: 0.686, w: 0.692}, |
|
{c: '¢', h: 0.686, w: 0.958}, |
|
{c: '£', h: 0.686, w: 0.894}, |
|
{c: '¤', h: 0.686, w: 0.806}, |
|
{c: '¥', h: 0.686, w: 0.767}, |
|
{c: '¦', h: 0.686, w: 0.9}, |
|
{c: '§', h: 0.686, w: 0.831}, |
|
{c: '¨', h: 0.686, w: 0.894}, |
|
{c: '©', h: 0.686, w: 0.831}, |
|
{c: 'ª', h: 0.686, w: 0.894}, |
|
{c: '­', h: 0.686, w: 0.831}, |
|
{c: '®', h: 0.694, w: 0.671, ic: 0.109, krn: {'39': 0.109, '63': 0.109, '33': 0.109, '41': 0.109, '93': 0.109}, lig: {'105': 14, '108': 15}}, |
|
{c: '¯', h: 0.694, w: 0.639}, |
|
{c: '°', h: 0.694, w: 0.639}, |
|
{c: '±', h: 0.694, w: 0.958}, |
|
{c: '²', h: 0.694, w: 0.958}, |
|
// 10 - 1F |
|
{c: '³', h: 0.444, w: 0.319}, |
|
{c: '´', h: 0.444, d: 0.194, w: 0.351}, |
|
{c: 'µ', h: 0.694, w: 0.575}, |
|
{c: '¶', h: 0.694, w: 0.575}, |
|
{c: '∙', h: 0.632, w: 0.575}, |
|
{c: '¸', h: 0.694, w: 0.575}, |
|
{c: '¹', h: 0.596, w: 0.575}, |
|
{c: 'º', h: 0.694, w: 0.869}, |
|
{c: '»', d: 0.17, w: 0.511}, |
|
{c: '¼', h: 0.694, w: 0.597}, |
|
{c: '½', h: 0.444, w: 0.831}, |
|
{c: '¾', h: 0.444, w: 0.894}, |
|
{c: '¿', h: 0.542, d: 0.0972, w: 0.575}, |
|
{c: 'À', h: 0.686, w: 1.04}, |
|
{c: 'Á', h: 0.686, w: 1.17}, |
|
{c: 'Â', h: 0.735, d: 0.0486, w: 0.894}, |
|
// 20 - 2F |
|
{c: 'Ã', h: 0.444, w: 0.319, krn: {'108': -0.319, '76': -0.378}}, |
|
{c: '!', h: 0.694, w: 0.35, lig: {'96': 60}}, |
|
{c: '"', h: 0.694, w: 0.603}, |
|
{c: '#', h: 0.694, d: 0.194, w: 0.958}, |
|
{c: '$', h: 0.75, d: 0.0556, w: 0.575}, |
|
{c: '%', h: 0.75, d: 0.0556, w: 0.958}, |
|
{c: '&', h: 0.694, w: 0.894}, |
|
{c: '\'', h: 0.694, w: 0.319, krn: {'63': 0.128, '33': 0.128}, lig: {'39': 34}}, |
|
{c: '(', h: 0.75, d: 0.25, w: 0.447}, |
|
{c: ')', h: 0.75, d: 0.25, w: 0.447}, |
|
{c: '*', h: 0.75, w: 0.575}, |
|
{c: '+', h: 0.633, d: 0.133, w: 0.894}, |
|
{c: ',', h: 0.156, d: 0.194, w: 0.319}, |
|
{c: '-', h: 0.444, w: 0.383, lig: {'45': 123}}, |
|
{c: '.', h: 0.156, w: 0.319}, |
|
{c: '/', h: 0.75, d: 0.25, w: 0.575}, |
|
// 30 - 3F |
|
{c: '0', h: 0.644, w: 0.575}, |
|
{c: '1', h: 0.644, w: 0.575}, |
|
{c: '2', h: 0.644, w: 0.575}, |
|
{c: '3', h: 0.644, w: 0.575}, |
|
{c: '4', h: 0.644, w: 0.575}, |
|
{c: '5', h: 0.644, w: 0.575}, |
|
{c: '6', h: 0.644, w: 0.575}, |
|
{c: '7', h: 0.644, w: 0.575}, |
|
{c: '8', h: 0.644, w: 0.575}, |
|
{c: '9', h: 0.644, w: 0.575}, |
|
{c: ':', h: 0.444, w: 0.319}, |
|
{c: ';', h: 0.444, d: 0.194, w: 0.319}, |
|
{c: '<', h: 0.5, d: 0.194, w: 0.35}, |
|
{c: '=', h: 0.391, d: -0.109, w: 0.894}, |
|
{c: '>', h: 0.5, d: 0.194, w: 0.543}, |
|
{c: '?', h: 0.694, w: 0.543, lig: {'96': 62}}, |
|
// 40 - 4F |
|
{c: '@', h: 0.694, w: 0.894}, |
|
{c: 'A', h: 0.686, w: 0.869, krn: {'116': -0.0319, '67': -0.0319, '79': -0.0319, '71': -0.0319, '85': -0.0319, '81': -0.0319, '84': -0.0958, '89': -0.0958, '86': -0.128, '87': -0.128}}, |
|
{c: 'B', h: 0.686, w: 0.818}, |
|
{c: 'C', h: 0.686, w: 0.831}, |
|
{c: 'D', h: 0.686, w: 0.882, krn: {'88': -0.0319, '87': -0.0319, '65': -0.0319, '86': -0.0319, '89': -0.0319}}, |
|
{c: 'E', h: 0.686, w: 0.756}, |
|
{c: 'F', h: 0.686, w: 0.724, krn: {'111': -0.0958, '101': -0.0958, '117': -0.0958, '114': -0.0958, '97': -0.0958, '65': -0.128, '79': -0.0319, '67': -0.0319, '71': -0.0319, '81': -0.0319}}, |
|
{c: 'G', h: 0.686, w: 0.904}, |
|
{c: 'H', h: 0.686, w: 0.9}, |
|
{c: 'I', h: 0.686, w: 0.436, krn: {'73': 0.0319}}, |
|
{c: 'J', h: 0.686, w: 0.594}, |
|
{c: 'K', h: 0.686, w: 0.901, krn: {'79': -0.0319, '67': -0.0319, '71': -0.0319, '81': -0.0319}}, |
|
{c: 'L', h: 0.686, w: 0.692, krn: {'84': -0.0958, '89': -0.0958, '86': -0.128, '87': -0.128}}, |
|
{c: 'M', h: 0.686, w: 1.09}, |
|
{c: 'N', h: 0.686, w: 0.9}, |
|
{c: 'O', h: 0.686, w: 0.864, krn: {'88': -0.0319, '87': -0.0319, '65': -0.0319, '86': -0.0319, '89': -0.0319}}, |
|
// 50 - 5F |
|
{c: 'P', h: 0.686, w: 0.786, krn: {'65': -0.0958, '111': -0.0319, '101': -0.0319, '97': -0.0319, '46': -0.0958, '44': -0.0958}}, |
|
{c: 'Q', h: 0.686, d: 0.194, w: 0.864}, |
|
{c: 'R', h: 0.686, w: 0.862, krn: {'116': -0.0319, '67': -0.0319, '79': -0.0319, '71': -0.0319, '85': -0.0319, '81': -0.0319, '84': -0.0958, '89': -0.0958, '86': -0.128, '87': -0.128}}, |
|
{c: 'S', h: 0.686, w: 0.639}, |
|
{c: 'T', h: 0.686, w: 0.8, krn: {'121': -0.0319, '101': -0.0958, '111': -0.0958, '114': -0.0958, '97': -0.0958, '65': -0.0958, '117': -0.0958}}, |
|
{c: 'U', h: 0.686, w: 0.885}, |
|
{c: 'V', h: 0.686, w: 0.869, ic: 0.016, krn: {'111': -0.0958, '101': -0.0958, '117': -0.0958, '114': -0.0958, '97': -0.0958, '65': -0.128, '79': -0.0319, '67': -0.0319, '71': -0.0319, '81': -0.0319}}, |
|
{c: 'W', h: 0.686, w: 1.19, ic: 0.016, krn: {'111': -0.0958, '101': -0.0958, '117': -0.0958, '114': -0.0958, '97': -0.0958, '65': -0.128, '79': -0.0319, '67': -0.0319, '71': -0.0319, '81': -0.0319}}, |
|
{c: 'X', h: 0.686, w: 0.869, krn: {'79': -0.0319, '67': -0.0319, '71': -0.0319, '81': -0.0319}}, |
|
{c: 'Y', h: 0.686, w: 0.869, ic: 0.0287, krn: {'101': -0.0958, '111': -0.0958, '114': -0.0958, '97': -0.0958, '65': -0.0958, '117': -0.0958}}, |
|
{c: 'Z', h: 0.686, w: 0.703}, |
|
{c: '[', h: 0.75, d: 0.25, w: 0.319}, |
|
{c: '\\', h: 0.694, w: 0.603}, |
|
{c: ']', h: 0.75, d: 0.25, w: 0.319}, |
|
{c: '^', h: 0.694, w: 0.575}, |
|
{c: '_', h: 0.694, w: 0.319}, |
|
// 60 - 6F |
|
{c: '`', h: 0.694, w: 0.319, lig: {'96': 92}}, |
|
{c: 'a', h: 0.444, w: 0.559, krn: {'118': -0.0319, '106': 0.0639, '121': -0.0319, '119': -0.0319}}, |
|
{c: 'b', h: 0.694, w: 0.639, krn: {'101': 0.0319, '111': 0.0319, '120': -0.0319, '100': 0.0319, '99': 0.0319, '113': 0.0319, '118': -0.0319, '106': 0.0639, '121': -0.0319, '119': -0.0319}}, |
|
{c: 'c', h: 0.444, w: 0.511, krn: {'104': -0.0319, '107': -0.0319}}, |
|
{c: 'd', h: 0.694, w: 0.639}, |
|
{c: 'e', h: 0.444, w: 0.527}, |
|
{c: 'f', h: 0.694, w: 0.351, ic: 0.109, krn: {'39': 0.109, '63': 0.109, '33': 0.109, '41': 0.109, '93': 0.109}, lig: {'105': 12, '102': 11, '108': 13}}, |
|
{c: 'g', h: 0.444, d: 0.194, w: 0.575, ic: 0.016, krn: {'106': 0.0319}}, |
|
{c: 'h', h: 0.694, w: 0.639, krn: {'116': -0.0319, '117': -0.0319, '98': -0.0319, '121': -0.0319, '118': -0.0319, '119': -0.0319}}, |
|
{c: 'i', h: 0.694, w: 0.319}, |
|
{c: 'j', h: 0.694, d: 0.194, w: 0.351}, |
|
{c: 'k', h: 0.694, w: 0.607, krn: {'97': -0.0639, '101': -0.0319, '97': -0.0319, '111': -0.0319, '99': -0.0319}}, |
|
{c: 'l', h: 0.694, w: 0.319}, |
|
{c: 'm', h: 0.444, w: 0.958, krn: {'116': -0.0319, '117': -0.0319, '98': -0.0319, '121': -0.0319, '118': -0.0319, '119': -0.0319}}, |
|
{c: 'n', h: 0.444, w: 0.639, krn: {'116': -0.0319, '117': -0.0319, '98': -0.0319, '121': -0.0319, '118': -0.0319, '119': -0.0319}}, |
|
{c: 'o', h: 0.444, w: 0.575, krn: {'101': 0.0319, '111': 0.0319, '120': -0.0319, '100': 0.0319, '99': 0.0319, '113': 0.0319, '118': -0.0319, '106': 0.0639, '121': -0.0319, '119': -0.0319}}, |
|
// 70 - 7F |
|
{c: 'p', h: 0.444, d: 0.194, w: 0.639, krn: {'101': 0.0319, '111': 0.0319, '120': -0.0319, '100': 0.0319, '99': 0.0319, '113': 0.0319, '118': -0.0319, '106': 0.0639, '121': -0.0319, '119': -0.0319}}, |
|
{c: 'q', h: 0.444, d: 0.194, w: 0.607}, |
|
{c: 'r', h: 0.444, w: 0.474}, |
|
{c: 's', h: 0.444, w: 0.454}, |
|
{c: 't', h: 0.635, w: 0.447, krn: {'121': -0.0319, '119': -0.0319}}, |
|
{c: 'u', h: 0.444, w: 0.639, krn: {'119': -0.0319}}, |
|
{c: 'v', h: 0.444, w: 0.607, ic: 0.016, krn: {'97': -0.0639, '101': -0.0319, '97': -0.0319, '111': -0.0319, '99': -0.0319}}, |
|
{c: 'w', h: 0.444, w: 0.831, ic: 0.016, krn: {'101': -0.0319, '97': -0.0319, '111': -0.0319, '99': -0.0319}}, |
|
{c: 'x', h: 0.444, w: 0.607}, |
|
{c: 'y', h: 0.444, d: 0.194, w: 0.607, ic: 0.016, krn: {'111': -0.0319, '101': -0.0319, '97': -0.0319, '46': -0.0958, '44': -0.0958}}, |
|
{c: 'z', h: 0.444, w: 0.511}, |
|
{c: '{', h: 0.444, w: 0.575, ic: 0.0319, lig: {'45': 124}}, |
|
{c: '|', h: 0.444, w: 1.15, ic: 0.0319}, |
|
{c: '}', h: 0.694, w: 0.575}, |
|
{c: '~', h: 0.694, w: 0.575}, |
|
{c: 'Ä', h: 0.694, w: 0.575} |
|
] |
|
}); |
|
|
|
/***************************************************************************/ |
|
|
|
/* |
|
* jsMath.HTML handles creation of most of the HTML needed for |
|
* presenting mathematics in HTML pages. |
|
*/ |
|
|
|
jsMath.HTML = { |
|
|
|
/* |
|
* produce a string version of a measurement in ems, |
|
* showing only a limited number of digits, and |
|
* using 0 when the value is near zero. |
|
*/ |
|
Em: function (m) { |
|
var n = 5; if (m < 0) {n++} |
|
if (Math.abs(m) < .000001) {m = 0} |
|
var s = String(m); s = s.replace(/(\.\d\d\d).+/,'$1'); |
|
return s+'em' |
|
}, |
|
|
|
/* |
|
* Create a horizontal space of width w |
|
*/ |
|
Spacer: function (w) { |
|
if (w == 0) {return ''}; |
|
return jsMath.msieSpaceFix |
|
+ '<SPAN STYLE="margin-left: '+this.Em(w)+'"></SPAN>'; |
|
}, |
|
|
|
/* |
|
* Use an image to create a horizontal space of width w |
|
*/ |
|
SpacerImage: function (w) { |
|
if (w == 0) {return ''}; |
|
return '<IMG SRC="'+jsMath.blank+'" STYLE="' |
|
+ ' width: 0; margin-left: '+this.Em(w)+'">'; |
|
}, |
|
|
|
/* |
|
* Create a colored frame (for debugging use) |
|
*/ |
|
Frame: function (x,y,w,h,c,pos) { |
|
|
|
h -= 2/jsMath.em; // use 2 pixels to compensate for border size |
|
w -= 2/jsMath.em; |
|
y -= 1/jsMath.em; |
|
if (!c) {c = 'black'}; |
|
if (pos) {pos = 'absolute;'} else |
|
{pos = 'relative; margin-right: '+this.Em(-(w+2/jsMath.em))+'; '} |
|
return '<IMG SRC="'+jsMath.blank+'" STYLE="position:' + pos |
|
+ 'vertical-align: '+this.Em(y)+'; left: '+this.Em(x)+'; ' |
|
+ 'width:'+this.Em(w)+'; height: '+this.Em(h)+'; ' |
|
+ 'border-color: '+c+'; border-style: solid; border-width: 1px;">'; |
|
}, |
|
|
|
/* |
|
* Create a 1-pixel-high horizontal line at a particular |
|
* position, width and color. |
|
*/ |
|
Line: function (x,y,w,c,pos) { |
|
if (!c) {c = 'black'}; |
|
if (pos) {pos = 'absolute;'} else |
|
{pos = 'relative; margin-right: '+this.Em(-w)+'; '} |
|
return '<IMG SRC="'+jsMath.blank+'" STYLE="position:'+pos |
|
+ 'top: '+this.Em(-y)+'; left:'+this.Em(x)+'; ' |
|
+ 'width:'+this.Em(w)+'; height:1px; background-color: '+c+';">'; |
|
}, |
|
|
|
/* |
|
* Create a black rule line for fractions, etc. |
|
* Height is converted to pixels (with a minimum of 1), so that |
|
* the line will not disappear at small font sizes. This means that |
|
* the thickness will not change if you change the font size, or |
|
* may not be correct within a header or other enlarged text. |
|
*/ |
|
Rule: function (w,h) { |
|
if (h == null) {h = jsMath.TeX.default_rule_thickness} |
|
if (w == 0 || h == 0) return; // should make an invisible box? |
|
h = Math.round(h*jsMath.em); |
|
if (h < 1) {h = 1} |
|
return '<IMG SRC="'+jsMath.black+'" HSPACE="0" VSPACE="0" ' |
|
+ 'STYLE="width:'+this.Em(w)+'; height: '+h+'px">'; |
|
}, |
|
|
|
/* |
|
* Create a colored block of a specific size (won't always print |
|
* correctly). |
|
*/ |
|
Block: function (w,h,c) { |
|
if (c == null) {c = 'black'} |
|
return '<IMG SRC="'+jsMath.blank+'" HSPACE="0" VSPACE="0" ' |
|
+ 'STYLE="width:'+this.Em(w)+'; height: '+this.Em(h)+'; ' |
|
+ 'background-color: '+c+'">'; |
|
}, |
|
|
|
/* |
|
* Add a <SPAN> tag to activate a specific CSS class |
|
*/ |
|
Class: function (tclass,html) { |
|
return '<SPAN CLASS="'+tclass+'">'+html+'</SPAN>'; |
|
}, |
|
|
|
/* |
|
* Use a <SPAN> to place some HTML at a specific position. |
|
* (This can be replaced by the ones below to overcome |
|
* some browser-specific bugs.) |
|
*/ |
|
Place: function (html,x,y) { |
|
if (Math.abs(x) < .0001) {x = 0} |
|
if (Math.abs(y) < .0001) {y = 0} |
|
if (x || y) { |
|
var span = '<SPAN STYLE="position: relative;'; |
|
if (x) {span += ' margin-left:'+this.Em(x)+';'} |
|
if (y) {span += ' top:'+this.Em(-y)+';'} |
|
html = span + '">' + html + '</SPAN>'; |
|
} |
|
return html; |
|
}, |
|
|
|
/* |
|
* For MSIE on Windows, backspacing must be done in a separate |
|
* <SPAN>, otherwise the contents will be clipped. |
|
*/ |
|
PlaceSeparateNegative: function (html,x,y) { |
|
if (Math.abs(x) < .0001) {x = 0} |
|
if (Math.abs(y) < .0001) {y = 0} |
|
if (x > 0 || y) { |
|
var span = '<SPAN STYLE="position: relative;'; |
|
if (x > 0) {span += ' margin-left:'+this.Em(x)+';'} |
|
if (y) {span += ' top:'+this.Em(-y)+';'} |
|
html = span + '">' + html + '</SPAN>'; |
|
} |
|
if (x < 0) { |
|
html = jsMath.msieSpaceFix |
|
+ '<SPAN STYLE="margin-left:'+this.Em(x)+';"></SPAN>' + html; |
|
} |
|
return html; |
|
}, |
|
|
|
/* |
|
* Here the x and y positioning is done in separate <SPAN> tags |
|
*/ |
|
PlaceSeparateSkips: function (html,x,y) { |
|
if (Math.abs(x) < .0001) {x = 0} |
|
if (Math.abs(y) < .0001) {y = 0} |
|
if (y) {html = '<SPAN STYLE="position: relative; top:'+this.Em(-y)+';' |
|
+ '">' + html + '</SPAN>'} |
|
if (x) {html = jsMath.msieSpaceFix |
|
+ '<SPAN STYLE="margin-left:'+this.Em(x)+';"></SPAN>' + html} |
|
return html; |
|
}, |
|
|
|
/* |
|
* Place a SPAN with absolute coordinates |
|
*/ |
|
PlaceAbsolute: function (html,x,y) { |
|
if (Math.abs(x) < .0001) {x = 0} |
|
if (Math.abs(y) < .0001) {y = 0} |
|
html = '<SPAN STYLE="position: absolute; left:'+this.Em(x)+'; ' |
|
+ 'top:'+this.Em(y)+';">' + html + ' </SPAN>'; |
|
// space normalizes line height |
|
return html; |
|
}, |
|
|
|
Absolute: function(html,w,h,d,y,H) { |
|
var align = ""; |
|
if (d) {align = ' vertical-align: '+jsMath.HTML.Em(-d)+';'} |
|
if (y != "none") { |
|
if (Math.abs(y) < .0001) {y = 0} |
|
html = '<SPAN STYLE="position: absolute; ' |
|
+ 'top:'+jsMath.HTML.Em(y)+'; left: 0em;">' |
|
+ html + ' ' // space normalizes line height in script styles |
|
+ '</SPAN>'; |
|
} |
|
html += '<IMG SRC="'+jsMath.blank+'" STYLE="width: '+jsMath.HTML.Em(w)+'; ' |
|
+ 'height: '+jsMath.HTML.Em(h)+';'+align+'">'; |
|
if (jsMath.msieAbsoluteBug) {// for MSIE (Mac) |
|
html = '<SPAN STYLE="position: relative;">' + html + '</SPAN>'; |
|
} |
|
html = '<SPAN STYLE="position: relative;' |
|
+ ' width: '+jsMath.HTML.Em(w)+';' // for MSIE |
|
+ ' height: '+jsMath.HTML.Em(H)+';' // for MSIE |
|
+ '">' |
|
+ html |
|
+ '</SPAN>'; |
|
return html; |
|
} |
|
|
|
}; |
|
|
|
|
|
/***************************************************************************/ |
|
|
|
/* |
|
* jsMath.Box handles TeX's math boxes and jsMath's equivalent of hboxes. |
|
*/ |
|
|
|
jsMath.Box = function (format,text,w,h,d) { |
|
if (d == null) {d = jsMath.d} |
|
this.type = 'typeset'; |
|
this.w = w; this.h = h; this.d = d; this.bh = h; this.bd = d; |
|
this.x = 0; this.y = 0; |
|
this.html = text; this.format = format; |
|
}; |
|
|
|
|
|
jsMath.Add(jsMath.Box,{ |
|
|
|
/* |
|
* An empty box |
|
*/ |
|
Null: new jsMath.Box('null','',0,0,0), |
|
|
|
/* |
|
* A box containing only text whose class and style haven't been added |
|
* yet (so that we can combine ones with the same styles). It gets |
|
* the text dimensions, if needed. (In general, this has been |
|
* replaced by TeX() below, but is still used in fallback mode.) |
|
*/ |
|
Text: function (text,tclass,style,size,a,d) { |
|
var html = jsMath.Typeset.AddClass(tclass,text); |
|
html = jsMath.Typeset.AddStyle(style,size,html); |
|
var BB = jsMath.EmBoxFor(html); var TeX = jsMath.Typeset.TeX(style,size); |
|
var bd = ((tclass == 'cmsy10' || tclass == 'cmex10')? BB.h-TeX.h: TeX.d*BB.h/TeX.hd); |
|
var box = new jsMath.Box('text',text,BB.w,BB.h-bd,bd); |
|
box.style = style; box.size = size; box.tclass = tclass; |
|
if (d != null) {if (d != 1) {box.d = d}} else {box.d = 0} |
|
if (a == null || a == 1) {box.h = .9*TeX.M_height} |
|
else {box.h = 1.1*TeX.x_height + 1*a}; // sometimes a is a string? |
|
return box; |
|
}, |
|
|
|
/* |
|
* Produce a box containing a given TeX character from a given font. |
|
* The box is a text box (like the ones above), so that characters from |
|
* the same font can be combined. |
|
*/ |
|
TeX: function (c,font,style,size) { |
|
c = jsMath.TeX[font][c]; |
|
if (c.d == null) {c.d = 0}; if (c.h == null) {c.h = 0} |
|
var scale = jsMath.Typeset.TeX(style,size).scale; |
|
var h = c.h + jsMath.TeX[font].dh |
|
var box = new jsMath.Box('text',c.c,c.w*scale,h*scale,c.d*scale); |
|
box.style = style; box.size = size; |
|
if (c.tclass) { |
|
box.tclass = c.tclass; |
|
box.bh = scale*jsMath.h; |
|
box.bd = scale*jsMath.d; |
|
} else { |
|
box.tclass = font; |
|
box.bh = scale*jsMath.TeX[font].h; |
|
box.bd = scale*jsMath.TeX[font].d; |
|
if (jsMath.msieFontBug) { |
|
// hack to avoid Font changing back to the default |
|
// font when a unicode reference is not followed |
|
// by a letter or number |
|
box.html += '<SPAN STYLE="display: none">x</SPAN>' |
|
} |
|
} |
|
return box; |
|
}, |
|
|
|
/* |
|
* A box containing a spacer of a specific width |
|
*/ |
|
Space: function (w) { |
|
return new jsMath.Box('html',jsMath.HTML.Spacer(w),w,0,0); |
|
}, |
|
|
|
/* |
|
* A box containing a horizontal rule |
|
*/ |
|
Rule: function (w,h) { |
|
if (h == null) {h = jsMath.TeX.default_rule_thickness} |
|
html = jsMath.HTML.Rule(w,h); |
|
return new jsMath.Box('html',html,w,h,0); |
|
}, |
|
|
|
/* |
|
* A box containing a colored block |
|
*/ |
|
Block: function (w,h,c) { |
|
return new jsMath.Box('html',jsMath.HTML.Block(w,h,c),w,h,0); |
|
}, |
|
|
|
/* |
|
* Get a character from a TeX font, and make sure that it has |
|
* its metrics specified. |
|
*/ |
|
GetChar: function (code,font) { |
|
var c = jsMath.TeX[font][code]; |
|
if (c.tclass == null) {c.tclass = font} |
|
if (!c.computedW) { |
|
c.w = jsMath.EmBoxFor(jsMath.Typeset.AddClass(c.tclass,c.c)).w; |
|
if (c.h == null) {c.h = jsMath.defaultH}; if (c.d == null) {c.d = 0} |
|
c.computedW = 1; |
|
} |
|
return c; |
|
}, |
|
|
|
/* |
|
* Locate the TeX delimiter character that matches a given height. |
|
* Return the character, font, style and actual height used. |
|
*/ |
|
DelimBestFit: function (H,c,font,style) { |
|
if (c == 0 && font == 0) return; |
|
var C; var h; font = jsMath.TeX.fam[font]; |
|
var isSS = (style.charAt(1) == 'S'); |
|
var isS = (style.charAt(0) == 'S'); |
|
while (c != null) { |
|
C = jsMath.TeX[font][c]; |
|
if (C.h == null) {C.h = jsMath.defaultH}; if (C.d == null) {C.d = 0} |
|
h = C.h+C.d; |
|
if (C.delim) {return [c,font,'',H]} |
|
if (isSS && .5*h >= H) {return [c,font,'SS',.5*h]} |
|
if (isS && .7*h >= H) {return [c,font,'S',.7*h]} |
|
if (h >= H || C.n == null) {return [c,font,'T',h]} |
|
c = C.n |
|
} |
|
}, |
|
|
|
/* |
|
* Create the HTML needed for a stretchable delimiter of a given height, |
|
* either centered or not. This version uses relative placement (i.e., |
|
* backspaces, not line-breaks). This works with more browsers, but |
|
* if the font size changes, the backspacing may not be right, so the |
|
* delimiters may become jagged. |
|
*/ |
|
DelimExtendRelative: function (H,c,font,a,nocenter) { |
|
var C = jsMath.TeX[font][c]; |
|
var top = this.GetChar(C.delim.top? C.delim.top: C.delim.rep,font); |
|
var rep = this.GetChar(C.delim.rep,font); |
|
var bot = this.GetChar(C.delim.bot? C.delim.bot: C.delim.rep,font); |
|
var ext = jsMath.Typeset.AddClass(rep.tclass,rep.c); |
|
var w = rep.w; var h = rep.h+rep.d |
|
var y; var dx; |
|
if (C.delim.mid) {// braces |
|
var mid = this.GetChar(C.delim.mid,font); |
|
var n = Math.ceil((H-(top.h+top.d)-(mid.h+mid.d)-(bot.h+bot.d))/(2*(rep.h+rep.d))); |
|
H = 2*n*(rep.h+rep.d) + (top.h+top.d) + (mid.h+mid.d) + (bot.h+bot.d); |
|
if (nocenter) {y = 0} else {y = H/2+a}; var Y = y; |
|
var html = jsMath.HTML.Place(jsMath.Typeset.AddClass(top.tclass,top.c),0,y-top.h) |
|
+ jsMath.HTML.Place(jsMath.Typeset.AddClass(bot.tclass,bot.c),-(top.w+bot.w)/2,y-(H-bot.d)) |
|
+ jsMath.HTML.Place(jsMath.Typeset.AddClass(mid.tclass,mid.c),-(bot.w+mid.w)/2,y-(H+mid.h-mid.d)/2); |
|
dx = (w-mid.w)/2; if (Math.abs(dx) < .0001) {dx = 0} |
|
if (dx) {html += jsMath.HTML.Spacer(dx)} |
|
y -= top.h+top.d + rep.h; |
|
for (var i = 0; i < n; i++) {html += jsMath.HTML.Place(ext,-w,y-i*h)} |
|
y -= H/2 - rep.h/2; |
|
for (var i = 0; i < n; i++) {html += jsMath.HTML.Place(ext,-w,y-i*h)} |
|
} else {// everything else |
|
var n = Math.ceil((H - (top.h+top.d) - (bot.h+bot.d))/(rep.h+rep.d)); |
|
// make sure two-headed arrows have an extender |
|
if (top.h+top.d < .9*(rep.h+rep.d)) {n = Math.max(1,n)} |
|
H = n*(rep.h+rep.d) + (top.h+top.d) + (bot.h+bot.d); |
|
if (nocenter) {y = 0} else {y = H/2+a}; var Y = y; |
|
var html = jsMath.HTML.Place(jsMath.Typeset.AddClass(top.tclass,top.c),0,y-top.h) |
|
dx = (w-top.w)/2; if (Math.abs(dx) < .0001) {dx = 0} |
|
if (dx) {html += jsMath.HTML.Spacer(dx)} |
|
y -= top.h+top.d + rep.h; |
|
for (var i = 0; i < n; i++) {html += jsMath.HTML.Place(ext,-w,y-i*h)} |
|
html += jsMath.HTML.Place(jsMath.Typeset.AddClass(bot.tclass,bot.c),-(w+bot.w)/2,Y-(H-bot.d)); |
|
} |
|
if (nocenter) {h = top.h} else {h = H/2+a} |
|
var box = new jsMath.Box('html',html,rep.w,h,H-h); |
|
box.bh = jsMath.TeX[font].h; box.bd = jsMath.TeX[font].d; |
|
return box; |
|
}, |
|
|
|
/* |
|
* Create the HTML needed for a stretchable delimiter of a given height, |
|
* either centered or not. This version uses absolute placement (i.e., |
|
* line-breaks, not backspacing). This gives more reliable results, |
|
* but doesn't work with all browsers. |
|
*/ |
|
DelimExtendAbsolute: function (H,c,font,a,nocenter) { |
|
var Font = jsMath.TeX[font]; |
|
var C = Font[c]; |
|
var top = this.GetChar(C.delim.top? C.delim.top: C.delim.rep,font); |
|
var rep = this.GetChar(C.delim.rep,font); |
|
var bot = this.GetChar(C.delim.bot? C.delim.bot: C.delim.rep,font); |
|
|
|
if (C.delim.mid) {// braces |
|
var mid = this.GetChar(C.delim.mid,font); |
|
var n = Math.ceil((H-(top.h+top.d)-(mid.h+mid.d-.05)-(bot.h+bot.d-.05))/(2*(rep.h+rep.d-.05))); |
|
H = 2*n*(rep.h+rep.d-.05) + (top.h+top.d) + (mid.h+mid.d-.05) + (bot.h+bot.d-.05); |
|
|
|
html = jsMath.HTML.PlaceAbsolute(jsMath.Typeset.AddClass(top.tclass,top.c),0,0); |
|
var h = rep.h+rep.d - .05; var y = top.d-.05 + rep.h; |
|
var ext = jsMath.Typeset.AddClass(font,rep.c) |
|
for (var i = 0; i < n; i++) {html += jsMath.HTML.PlaceAbsolute(ext,0,y+i*h)} |
|
html += jsMath.HTML.PlaceAbsolute(jsMath.Typeset.AddClass(mid.tclass,mid.c),0,y+n*h-rep.h+mid.h); |
|
y += n*h + mid.h+mid.d - .05; |
|
for (var i = 0; i < n; i++) {html += jsMath.HTML.PlaceAbsolute(ext,0,y+i*h)} |
|
html += jsMath.HTML.PlaceAbsolute(jsMath.Typeset.AddClass(bot.tclass,bot.c),0,y+n*h-rep.h+bot.h); |
|
} else {// all others |
|
var n = Math.ceil((H - (top.h+top.d) - (bot.h+bot.d-.05))/(rep.h+rep.d-.05)); |
|
H = n*(rep.h+rep.d-.05) + (top.h+top.d) + (bot.h+bot.d-.05); |
|
|
|
html = jsMath.HTML.PlaceAbsolute(jsMath.Typeset.AddClass(top.tclass,top.c),0,0); |
|
var h = rep.h+rep.d-.05; var y = top.d-.05 + rep.h; |
|
var ext = jsMath.Typeset.AddClass(rep.tclass,rep.c); |
|
for (var i = 0; i < n; i++) {html += jsMath.HTML.PlaceAbsolute(ext,0,y+i*h)} |
|
html += jsMath.HTML.PlaceAbsolute(jsMath.Typeset.AddClass(bot.tclass,bot.c),0,y+n*h-rep.h+bot.h); |
|
} |
|
|
|
var w = top.w; |
|
if (nocenter) {h = top.h; y = 0} else {h = H/2 + a; y = h - top.h} |
|
html = jsMath.HTML.Absolute(html,w,Font.h,"none",-y,top.h); |
|
var box = new jsMath.Box('html',html,rep.w,h,H-h); |
|
box.bh = jsMath.TeX[font].h; box.bd = jsMath.TeX[font].d; |
|
return box; |
|
}, |
|
|
|
/* |
|
* Get the HTML for a given delimiter of a given height. |
|
* It will return either a single character, if one exists, or the |
|
* more complex HTML needed for a stretchable delimiter. |
|
*/ |
|
Delimiter: function (H,delim,style,nocenter) { |
|
var size = 4; //### pass this? |
|
var TeX = jsMath.Typeset.TeX(style,size); |
|
var CFSH = this.DelimBestFit(H,(delim&0xFF000)>>12,(delim&0xF00000)>>20,style); |
|
if (CFSH == null || CFSH[3] < H) |
|
{CFSH = this.DelimBestFit(H,(delim&0xFF),(delim&0xF00)>>8,style)} |
|
if (CFSH == null) {return this.Space(TeX.nulldelimiterspace)} |
|
if (CFSH[2] == '') |
|
{return this.DelimExtend(H,CFSH[0],CFSH[1],TeX.axis_height,nocenter)} |
|
box = jsMath.Box.TeX(CFSH[0],CFSH[1],CFSH[2],size).Styled(); |
|
if (nocenter) {box.y = -jsMath.TeX[CFSH[1]].dh*TeX.scale} |
|
else {box.y = -((box.h+box.d)/2 - box.d - TeX.axis_height)} |
|
if (Math.abs(box.y) < .0001) {box.y = 0} |
|
if (box.y) {box = jsMath.Box.SetList([box],CFSH[2],size)} |
|
return box; |
|
}, |
|
|
|
/* |
|
* Get a character by its TeX charcode, and make sure its width |
|
* is specified. |
|
*/ |
|
GetCharCode: function (code) { |
|
var font = jsMath.TeX.fam[(code&0xF00)>>8]; |
|
var Font = jsMath.TeX[font]; |
|
var c = Font[code & 0xFF]; |
|
if (c.w == null) {c.w = jsMath.EmBoxFor(jsMath.Typeset.AddClass(c.tclass,c.c)).w} |
|
if (c.font == null) {c.font = font} |
|
return c; |
|
}, |
|
|
|
/* |
|
* Add the class to the html, and use the font if there isn't one |
|
* specified already |
|
*/ |
|
|
|
AddClass: function (tclass,html,font) { |
|
if (tclass == null) {tclass = font} |
|
return jsMath.Typeset.AddClass(tclass,html); |
|
}, |
|
|
|
/* |
|
* Create a horizontally stretchable "delimiter" (like over- and |
|
* underbraces). |
|
*/ |
|
//### Add size? |
|
Leaders: function (W,leader) { |
|
var h; var d; var w; var html; var font; |
|
if (leader.lmid) {// braces |
|
font = jsMath.TeX.fam[(leader.left & 0xF00) >> 8]; |
|
var left = this.GetCharCode(leader.left); |
|
var right = this.GetCharCode(leader.right); |
|
var lmid = this.GetCharCode(leader.lmid); |
|
var rmid = this.GetCharCode(leader.rmid); |
|
w = (W - left.w - right.w - lmid.w - rmid.w)/2 - .1; h = .4; d = .3; |
|
if (w < 0) {w = 0} |
|
html = this.AddClass(left.tclass,left.c,left.font) |
|
+ jsMath.HTML.Rule(w,left.h) |
|
+ this.AddClass(lmid.tclass,lmid.c+rmid.c,lmid.font) |
|
+ jsMath.HTML.Rule(w,right.h) |
|
+ this.AddClass(right.tclass,right.c,right.font); |
|
} else { //arrows |
|
font = jsMath.TeX.fam[(leader.rep &0xF00) >> 8]; |
|
var left = this.GetCharCode(leader.left? leader.left: leader.rep); |
|
var rep = this.GetCharCode(leader.rep); |
|
var right = this.GetCharCode(leader.right? leader.right: leader.rep); |
|
var n = Math.ceil((W - left.w - right.w + .4)/(rep.w - .3)); |
|
w = (W - left.w - right.w + .4 - n*(rep.w - .3)); |
|
if (leader.left) {h = left.h; d = left.d} else {h = right.h; d = right.d} |
|
if (d == null) {d = 0}; if (h == null) {h = 0} |
|
var html = this.AddClass(left.tclass,left.c,left.font); var m = Math.floor(n/2); |
|
var ext = jsMath.HTML.Place(rep.c,-.3,0); |
|
var ehtml = ''; for (var i = 0; i < m; i++) {ehtml += ext}; |
|
html += this.AddClass(rep.tclass,ehtml,rep.font) + jsMath.HTML.Spacer(w); |
|
ehtml = ''; for (var i = m; i < n; i++) {ehtml += ext}; |
|
html += this.AddClass(rep.tclass,ehtml,rep.font); |
|
if (jsMath.msieFontBug) {html += '<SPAN STYLE="display: none">x</SPAN>'} |
|
html += jsMath.HTML.Place(this.AddClass(right.tclass,right.c,right.font),-.4,0); |
|
} |
|
w = jsMath.EmBoxFor(html).w; |
|
if (w != W) { |
|
w = jsMath.HTML.Spacer((W-w)/2); |
|
html = w + html + w; |
|
} |
|
var box = new jsMath.Box('html',html,W,h,d); |
|
box.bh = jsMath.TeX[font].h; box.bd = jsMath.TeX[font].d; |
|
return box; |
|
}, |
|
|
|
/* |
|
* Create the HTML for an alignment (e.g., array or matrix) |
|
* Since the widths are not really accurate (they are based on pixel |
|
* widths not the sub-pixel widths of the actual characters), there |
|
* is some drift involved. We lay out the table column by column |
|
* to help reduce the problem. |
|
* |
|
* ### still need to allow users to specify row and column attributes, |
|
* and do things like \span and \multispan ### |
|
*/ |
|
LayoutRelative: function (size,table,align,cspacing) { |
|
if (align == null) {align = []} |
|
if (cspacing == null) {cspacing = []} |
|
|
|
// get row and column maximum dimensions |
|
var scale = jsMath.sizes[size]/100; |
|
var W = []; var H = []; var D = []; |
|
var unset = -1000; var bh = unset; var bd = unset; |
|
var i; var j; var row; |
|
for (i = 0; i < table.length; i++) { |
|
row = table[i]; H[i] = jsMath.h*scale; D[i] = jsMath.d*scale; |
|
for (j = 0; j < row.length; j++) { |
|
row[j] = row[j].Remeasured(); |
|
if (row[j].h > H[i]) {H[i] = row[j].h} |
|
if (row[j].d > D[i]) {D[i] = row[j].d} |
|
if (j >= W.length) {W[j] = row[j].w} |
|
else if (row[j].w > W[j]) {W[j] = row[j].w} |
|
if (row[j].bh > bh) {bh = row[j].bh} |
|
if (row[j].bd > bd) {bd = row[j].bd} |
|
} |
|
} |
|
if (bh == unset) {bh = 0}; if (bd == unset) {bd = 0} |
|
|
|
// lay out the columns |
|
var HD = (jsMath.hd-.01)*scale; |
|
var html = ''; var pW = 0; var cW = 0; |
|
var w; var h; var y; |
|
var box; var mlist; var entry; |
|
for (j = 0; j < W.length; j++) { |
|
mlist = []; y = -H[0]; pW = 0; |
|
for (i = 0; i < table.length; i++) { |
|
entry = table[i][j]; |
|
if (entry && entry.format != 'null') { |
|
if (align[j] == 'l') {w = 0} else |
|
if (align[j] == 'r') {w = W[j] - entry.w} else |
|
{w = (W[j] - entry.w)/2} |
|
entry.x = w - pW; pW = entry.w + w; entry.y = y; |
|
mlist[mlist.length] = entry; |
|
} |
|
if (i == table.length-1) {y -= D[i]} |
|
else {y -= Math.max(HD,D[i]+H[i+1]) + scale/10} |
|
} |
|
if (cspacing[j] == null) cspacing[j] = scale; |
|
if (mlist.length > 0) { |
|
box = jsMath.Box.SetList(mlist,'T',size); |
|
html += jsMath.HTML.Place(box.html,cW,0); |
|
cW = W[j] - box.w + cspacing[j]; |
|
} else {cW += cspacing[j]} |
|
} |
|
|
|
// get the full width and height |
|
w = -cspacing[W.length-1]; y = (H.length-1)*scale/10; |
|
for (i = 0; i < W.length; i++) {w += W[i] + cspacing[i]} |
|
for (i = 0; i < H.length; i++) {y += Math.max(HD,H[i]+D[i])} |
|
h = y/2 + jsMath.TeX.axis_height; var d = y-h; |
|
|
|
// adjust the final row width, and vcenter the table |
|
// (add 1/6em at each side for the \,) |
|
html += jsMath.HTML.Spacer(cW-cspacing[W.length-1] + scale/6); |
|
html = jsMath.HTML.Place(html,scale/6,h); |
|
box = new jsMath.Box('html',html,w+scale/3,h,d); |
|
box.bh = bh; box.bd = bd; |
|
return box; |
|
}, |
|
|
|
/* |
|
* Create the HTML for an alignment (e.g., array or matrix) |
|
* Use absolute position for elements in the array. |
|
* |
|
* ### still need to allow users to specify row and column attributes, |
|
* and do things like \span and \multispan ### |
|
*/ |
|
LayoutAbsolute: function (size,table,align,cspacing) { |
|
if (align == null) {align = []} |
|
if (cspacing == null) {cspacing = []} |
|
|
|
// get row and column maximum dimensions |
|
var scale = jsMath.sizes[size]/100; |
|
var HD = (jsMath.hd-.01)*scale; |
|
var W = []; var H = []; var D = []; |
|
var w = 0; var h; var x; var y; |
|
var i; var j; var row; |
|
for (i = 0; i < table.length; i++) { |
|
row = table[i]; |
|
H[i] = jsMath.h*scale; D[i] = jsMath.d*scale; |
|
for (j = 0; j < row.length; j++) { |
|
row[j] = row[j].Remeasured(); |
|
if (row[j].h > H[i]) {H[i] = row[j].h} |
|
if (row[j].d > D[i]) {D[i] = row[j].d} |
|
if (j >= W.length) {W[j] = row[j].w} |
|
else if (row[j].w > W[j]) {W[j] = row[j].w} |
|
} |
|
} |
|
|
|
// get the height and depth of the centered table |
|
y = (H.length-1)*scale/6; |
|
for (i = 0; i < H.length; i++) {y += Math.max(HD,H[i]+D[i])} |
|
h = y/2 + jsMath.TeX.axis_height; var d = y - h; |
|
|
|
// lay out the columns |
|
var html = ''; var entry; w = scale/6; |
|
for (j = 0; j < W.length; j++) { |
|
y = H[0]-h; |
|
for (i = 0; i < table.length; i++) { |
|
entry = table[i][j]; |
|
if (entry && entry.format != 'null') { |
|
if (align[j] == 'l') {x = 0} else |
|
if (align[j] == 'r') {x = W[j] - entry.w} else |
|
{x = (W[j] - entry.w)/2} |
|
html += jsMath.HTML.PlaceAbsolute(entry.html,w+x, |
|
y-Math.max(0,entry.bh-jsMath.h*scale)); |
|
} |
|
if (i == table.length-1) {y += D[i]} |
|
else {y += Math.max(HD,D[i]+H[i+1]) + scale/6} |
|
} |
|
if (cspacing[j] == null) cspacing[j] = scale; |
|
w += W[j] + cspacing[j]; |
|
} |
|
|
|
// get the full width |
|
w = -cspacing[W.length-1]+scale/3; |
|
for (i = 0; i < W.length; i++) {w += W[i] + cspacing[i]} |
|
|
|
html = jsMath.HTML.Spacer(scale/6)+html+jsMath.HTML.Spacer(scale/6); |
|
if (jsMath.spanHeightVaries) {y = h-jsMath.h} else {y = 0} |
|
html = jsMath.HTML.Absolute(html,w,h+d,d,y,H[0]); |
|
var box = new jsMath.Box('html',html,w+scale/3,h,d); |
|
return box; |
|
}, |
|
|
|
/* |
|
* Look for math within \hbox and other non-math text |
|
*/ |
|
InternalMath: function (text,size) { |
|
if (!text.match(/\$|\\\(/)) {return this.Text(text,'nonmath','T',size).Styled()} |
|
|
|
var i = 0; var k = 0; var c; var match = ''; |
|
var mlist = []; var parse; var html; var box; |
|
while (i < text.length) { |
|
c = text.charAt(i++); |
|
if (c == '$') { |
|
if (match == '$') { |
|
parse = jsMath.Parse(text.slice(k,i-1),null,size); |
|
if (parse.error) { |
|
mlist[mlist.length] = this.Text(parse.error,'error','T',size,1,1); |
|
} else { |
|
parse.Atomize(); |
|
mlist[mlist.length] = parse.mlist.Typeset('T',size).Styled(); |
|
} |
|
match = ''; k = i; |
|
} else { |
|
mlist[mlist.length] = this.Text(text.slice(k,i-1),'nonmath','T',size,1,1); |
|
match = '$'; k = i; |
|
} |
|
} else if (c == '\\') { |
|
c = text.charAt(i++); |
|
if (c == '(' && match == '') { |
|
mlist[mlist.length] = this.Text(text.slice(k,i-2),'nonmath','T',size,1,1); |
|
match = ')'; k = i; |
|
} else if (c == ')' && match == ')') { |
|
parse = jsMath.Parse(text.slice(k,i-2),null,size); |
|
if (parse.error) { |
|
mlist[mlist.length] = this.Text(parse.error,'error','T',size,1,1); |
|
} else { |
|
parse.Atomize(); |
|
mlist[mlist.length] = parse.mlist.Typeset('T',size).Styled(); |
|
} |
|
match = ''; k = i; |
|
} |
|
} |
|
} |
|
mlist[mlist.length] = this.Text(text.slice(k),'nonmath','T',size,1,1); |
|
return this.SetList(mlist,'T',size); |
|
}, |
|
|
|
/* |
|
* Convert an abitrary box to a typeset box. I.e., make an |
|
* HTML version of the contents of the box, at its desired (x,y) |
|
* position. |
|
*/ |
|
Set: function (box,style,size,addstyle) { |
|
if (box) { |
|
if (box.type == 'typeset') {return box} |
|
if (box.type == 'mlist') { |
|
box.mlist.Atomize(style,size); |
|
return box.mlist.Typeset(style,size); |
|
} |
|
if (box.type == 'text') { |
|
box = this.Text(box.text,box.tclass,style,size,box.ascend,box.descend); |
|
if (addstyle != 0) {box.Styled()} |
|
return box; |
|
} |
|
box = this.TeX(box.c,box.font,style,size); |
|
if (addstyle != 0) {box.Styled()} |
|
return box; |
|
} |
|
return jsMath.Box.Null; |
|
}, |
|
|
|
/* |
|
* Convert a list of boxes to a single typeset box. I.e., finalize |
|
* the HTML for the list of boxes, properly spaced and positioned. |
|
*/ |
|
SetList: function (boxes,style,size) { |
|
var mlist = []; var box; |
|
for (var i = 0; i < boxes.length; i++) { |
|
box = boxes[i]; |
|
if (box.type == 'typeset') {box = jsMath.mItem.Typeset(box)} |
|
mlist[mlist.length] = box; |
|
} |
|
var typeset = new jsMath.Typeset(mlist); |
|
return typeset.Typeset(style,size); |
|
} |
|
|
|
}); |
|
|
|
|
|
jsMath.Package(jsMath.Box,{ |
|
|
|
/* |
|
* Add the class and style to a text box (i.e., finalize the |
|
* unpositioned HTML for the box). |
|
*/ |
|
Styled: function () { |
|
if (this.format == 'text') { |
|
this.html = jsMath.Typeset.AddClass(this.tclass,this.html); |
|
this.html = jsMath.Typeset.AddStyle(this.style,this.size,this.html); |
|
delete this.tclass; delete this.style; |
|
this.format = 'html'; |
|
} |
|
return this; |
|
}, |
|
|
|
/* |
|
* Recompute the box width to make it more accurate. |
|
*/ |
|
Remeasured: function () { |
|
if (this.w > 0) { |
|
if (!jsMath.spanHeightVaries || !this.html.match(/position: ?absolute/)) |
|
{this.w = jsMath.EmBoxFor(this.html).w} |
|
} |
|
return this; |
|
} |
|
|
|
}); |
|
|
|
|
|
/***************************************************************************/ |
|
|
|
/* |
|
* mItems are the buiulding blocks of mLists (math lists) used to |
|
* store the information about a mathematical expression. These are |
|
* basically the items listed in the TeXbook in Appendix G (plus some |
|
* minor extensions). |
|
*/ |
|
jsMath.mItem = function (type,def) { |
|
this.type = type; |
|
jsMath.Add(this,def); |
|
} |
|
|
|
jsMath.Add(jsMath.mItem,{ |
|
|
|
/* |
|
* a general atom (given a nucleus for the atom) |
|
*/ |
|
Atom: function (type,nucleus) { |
|
return new jsMath.mItem(type,{atom: 1, nuc: nucleus}); |
|
}, |
|
|
|
/* |
|
* An atom whose nucleus is a piece of text, in a given |
|
* class, with a given additional height and depth |
|
*/ |
|
TextAtom: function (type,text,tclass,a,d) { |
|
var atom = new jsMath.mItem(type,{ |
|
atom: 1, |
|
nuc: { |
|
type: 'text', |
|
text: text, |
|
tclass: tclass |
|
} |
|
}); |
|
if (a != null) {atom.nuc.ascend = a} |
|
if (d != null) {atom.nuc.descend = d} |
|
return atom; |
|
}, |
|
|
|
/* |
|
* An atom whose nucleus is a TeX character in a specific font |
|
*/ |
|
TeXAtom: function (type,c,font) { |
|
return new jsMath.mItem(type,{ |
|
atom: 1, |
|
nuc: { |
|
type: 'TeX', |
|
c: c, |
|
font: font |
|
} |
|
}); |
|
}, |
|
|
|
/* |
|
* A generalized fraction atom, with given delimiters, rule |
|
* thickness, and a numerator and denominator. |
|
*/ |
|
Fraction: function (name,num,den,thickness,left,right) { |
|
return new jsMath.mItem('fraction',{ |
|
from: name, num: num, den: den, |
|
thickness: thickness, left: left, right: right |
|
}); |
|
}, |
|
|
|
/* |
|
* An atom that inserts some glue |
|
*/ |
|
Space: function (w) {return new jsMath.mItem('space',{w: w})}, |
|
|
|
/* |
|
* An atom that contains a typeset box (like an hbox or vbox) |
|
*/ |
|
Typeset: function (box) {return new jsMath.mItem('box',{nuc: box})}, |
|
|
|
/* |
|
* An atom that contains some finished HTML (acts like a typeset box) |
|
*/ |
|
HTML: function (html) {return new jsMath.mItem('html',{html: html})} |
|
|
|
}); |
|
|
|
/***************************************************************************/ |
|
|
|
/* |
|
* mLists are lists of mItems, and encode the contents of |
|
* mathematical expressions and sub-expressions. They act as |
|
* the expression "stack" as the mathematics is parsed, and |
|
* contain some state information, like the position of the |
|
* most recent open paren and \over command, and the current font. |
|
*/ |
|
jsMath.mList = function (list,font,size,style) { |
|
if (list) {this.mlist = list} else {this.mlist = []} |
|
if (style == null) {style = 'T'}; if (size == null) {size = 4} |
|
this.data = {openI: null, overI: null, overF: null, |
|
font: font, size: size, style: style}; |
|
this.init = {size: size, style: style}; |
|
} |
|
|
|
jsMath.Package(jsMath.mList,{ |
|
|
|
/* |
|
* Add an mItem to the list |
|
*/ |
|
Add: function (box) {return (this.mlist[this.mlist.length] = box)}, |
|
|
|
/* |
|
* Get the i-th mItem from the list |
|
*/ |
|
Get: function (i) {return this.mlist[i]}, |
|
|
|
/* |
|
* Get the length of the list |
|
*/ |
|
Length: function() {return this.mlist.length}, |
|
|
|
/* |
|
* Get the tail mItem of the list |
|
*/ |
|
Last: function () { |
|
if (this.mlist.length == 0) {return null} |
|
return this.mlist[this.mlist.length-1] |
|
}, |
|
|
|
/* |
|
* Get a sublist of an mList |
|
*/ |
|
Range: function (i,j) { |
|
if (j == null) {j = this.mlist.length} |
|
return new jsMath.mList(this.mlist.slice(i,j+1)); |
|
}, |
|
|
|
/* |
|
* Remove a range of mItems from the list. |
|
*/ |
|
Delete: function (i,j) { |
|
if (j == null) {j = i} |
|
if (this.mlist.splice) {this.mlist.splice(i,j-i+1)} else { |
|
var mlist = []; |
|
for (var k = 0; k < this.mlist.length; k++) |
|
{if (k < i || k > j) {mlist[mlist.length] = this.mlist[k]}} |
|
this.mlist = mlist; |
|
} |
|
}, |
|
|
|
/* |
|
* Add an open brace and maintain the stack information |
|
* about the previous open brace so we can recover it |
|
* when this one os closed. |
|
*/ |
|
Open: function (left) { |
|
var box = this.Add(new jsMath.mItem('boundary',{data: this.data})); |
|
var olddata = this.data; |
|
this.data = {}; for (var i in olddata) {this.data[i] = olddata[i]} |
|
delete this.data.overI; delete this.data.overF; |
|
this.data.openI = this.mlist.length-1; |
|
if (left != null) {box.left = left} |
|
return box; |
|
}, |
|
|
|
/* |
|
* Attempt to close a brace. Recover the stack information |
|
* about previous open braces and \over commands. If there was an |
|
* \over (or \above, etc) in this set of braces, create a fraction |
|
* atom from the two halves, otherwise create an inner or ord |
|
* from the contents of the braces. |
|
* Remove the braced material from the list and add the newly |
|
* created atom (the fraction, inner or ord). |
|
*/ |
|
Close: function (right) { |
|
if (right != null) {right = new jsMath.mItem('boundary',{right: right})} |
|
var atom; var open = this.data.openI; |
|
var over = this.data.overI; var from = this.data.overF; |
|
this.data = this.mlist[open].data; |
|
if (over) { |
|
atom = jsMath.mItem.Fraction(from.name, |
|
{type: 'mlist', mlist: this.Range(open+1,over-1)}, |
|
{type: 'mlist', mlist: this.Range(over)}, |
|
from.thickness,from.left,from.right); |
|
if (right) { |
|
var mlist = new jsMath.mList([this.mlist[open],atom,right]); |
|
atom = jsMath.mItem.Atom('inner',{type: 'mlist', mlist: mlist}); |
|
} |
|
} else { |
|
var openI = open+1; if (right) {this.Add(right); openI--} |
|
atom = jsMath.mItem.Atom((right)?'inner':'ord', |
|
{type: 'mlist', mlist: this.Range(openI)}); |
|
} |
|
this.Delete(open,this.Length()); |
|
return this.Add(atom); |
|
}, |
|
|
|
/* |
|
* Create a generalized fraction from an mlist that |
|
* contains an \over (or \above, etc). |
|
*/ |
|
Over: function () { |
|
var over = this.data.overI; var from = this.data.overF |
|
var atom = jsMath.mItem.Fraction(from.name, |
|
{type: 'mlist', mlist: this.Range(open+1,over-1)}, |
|
{type: 'mlist', mlist: this.Range(over)}, |
|
from.thickness,from.left,from.right); |
|
this.mlist = [atom]; |
|
}, |
|
|
|
/* |
|
* Take a raw mList (that has been produced by parsing some TeX |
|
* expression), and perform the modifications outlined in |
|
* Appendix G of the TeXbook. |
|
*/ |
|
Atomize: function (style,size) { |
|
var mitem; var prev = ''; |
|
this.style = style; this.size = size; |
|
for (var i = 0; i < this.mlist.length; i++) { |
|
mitem = this.mlist[i]; mitem.delta = 0; |
|
if (mitem.type == 'choice') |
|
{this.mlist = this.Atomize.choice(this.style,mitem,i,this.mlist); i--} |
|
else if (this.Atomize[mitem.type]) { |
|
var f = this.Atomize[mitem.type]; // Opera needs separate name |
|
f(this.style,this.size,mitem,prev,this,i); |
|
} |
|
prev = mitem; |
|
} |
|
if (mitem && mitem.type == 'bin') {mitem.type = 'ord'} |
|
if (this.mlist.length >= 2 && mitem.type == 'boundary' && |
|
this.mlist[0].type == 'boundary') {this.AddDelimiters(style,size)} |
|
}, |
|
|
|
/* |
|
* For a list that has boundary delimiters as its first and last |
|
* entries, we replace the boundary atoms by open and close |
|
* atoms whose nuclei are the specified delimiters properly sized |
|
* for the contents of the list. (Rule 19) |
|
*/ |
|
AddDelimiters: function(style,size) { |
|
var unset = -10000; var h = unset; var d = unset; |
|
for (var i = 0; i < this.mlist.length; i++) { |
|
mitem = this.mlist[i]; |
|
if (mitem.atom || mitem.type == 'box') { |
|
h = Math.max(h,mitem.nuc.h+mitem.nuc.y); |
|
d = Math.max(d,mitem.nuc.d-mitem.nuc.y); |
|
} |
|
} |
|
var TeX = jsMath.TeX; var a = jsMath.Typeset.TeX(style,size).axis_height; |
|
var delta = Math.max(h-a,d+a); |
|
var H = Math.max(Math.floor(TeX.integer*delta/500)*TeX.delimiterfactor, |
|
TeX.integer*(2*delta-TeX.delimitershortfall))/TeX.integer; |
|
var left = this.mlist[0]; var right = this.mlist[this.mlist.length-1]; |
|
left.nuc = jsMath.Box.Delimiter(H,left.left,style); |
|
right.nuc = jsMath.Box.Delimiter(H,right.right,style); |
|
left.type = 'open'; left.atom = 1; delete left.left; |
|
right.type = 'close'; right.atom = 1; delete right.right; |
|
}, |
|
|
|
/* |
|
* Typeset a math list to produce final HTML for the list. |
|
*/ |
|
Typeset: function (style,size) { |
|
var typeset = new jsMath.Typeset(this.mlist); |
|
return typeset.Typeset(style,size); |
|
} |
|
|
|
}); |
|
|
|
|
|
/* |
|
* These routines implement the main rules given in Appendix G of the |
|
* TeXbook |
|
*/ |
|
|
|
jsMath.Add(jsMath.mList.prototype.Atomize,{ |
|
|
|
/* |
|
* Handle a 4-way choice atom. (Rule 4) |
|
*/ |
|
choice: function (style,mitem,i,mlist) { |
|
if (style.charAt(style.length-1) == "'") {style = style.slice(0,style.length-1)} |
|
var nlist = []; var M = mitem[style]; if (!M) {M = {type: 'mlist', mlist: []}} |
|
if (M.type == 'mlist') { |
|
M = M.mlist.mlist; |
|
for (var k = 0; k < i; k++) {nlist[k] = mlist[k]} |
|
for (k = 0; k < M.length; k++) {nlist[i+k] = M[k]} |
|
for (k = i+1; k < mlist.length; k++) {nlist[nlist.length] = mlist[k]} |
|
return nlist; |
|
} else { |
|
mlist[i] = jsMath.mItem.Atom('ord',M); |
|
return mlist; |
|
} |
|
}, |
|
|
|
/* |
|
* Handle \displaystyle, \textstyle, etc. |
|
*/ |
|
style: function (style,size,mitem,prev,mlist) { |
|
mlist.style = mitem.style; |
|
}, |
|
|
|
/* |
|
* Handle \tiny, \small, etc. |
|
*/ |
|
size: function (style,size,mitem,prev,mlist) { |
|
mlist.size = mitem.size; |
|
}, |
|
|
|
/* |
|
* Create empty boxes of the proper sizes for the various |
|
* phantom-type commands |
|
*/ |
|
phantom: function (style,size,mitem) { |
|
var box = mitem.nuc = jsMath.Box.Set(mitem.phantom,style,size); |
|
if (mitem.h) {box.Remeasured(); box.html = jsMath.HTML.Spacer(box.w)} |
|
else {box.html = '', box.w = 0} |
|
if (!mitem.v) {box.h = box.d = 0} |
|
box.bd = box.bh = 0; |
|
delete mitem.phantom; |
|
mitem.type = 'box'; |
|
}, |
|
|
|
/* |
|
* Create a box of zero height and depth containing the |
|
* contents of the atom |
|
*/ |
|
smash: function (style,size,mitem) { |
|
var box = mitem.nuc = jsMath.Box.Set(mitem.smash,style,size).Remeasured(); |
|
box.h = box.d = box.bd = box.bh = 0; |
|
delete mitem.smash; |
|
mitem.type = 'box'; |
|
}, |
|
|
|
/* |
|
* Move a box up or down vertically |
|
*/ |
|
raise: function (style,size,mitem) { |
|
mitem.nuc = jsMath.Box.Set(mitem.nuc,style,size); |
|
var y = mitem.raise; |
|
mitem.nuc.html = jsMath.HTML.Place(mitem.nuc.html,0,y); |
|
mitem.nuc.h += y; mitem.nuc.d -= y; |
|
mitem.type = 'ord'; mitem.atom = 1; |
|
}, |
|
|
|
/* |
|
* Hide the size of a box so that it laps to the left or right, or |
|
* up or down. |
|
*/ |
|
lap: function (style,size,mitem) { |
|
var box = jsMath.Box.Set(mitem.nuc,style,size).Remeasured(); |
|
var mlist = [box]; |
|
if (mitem.lap == 'llap') {box.x = -box.w} else |
|
if (mitem.lap == 'rlap') {mlist[1] = jsMath.mItem.Space(-box.w)} else |
|
if (mitem.lap == 'ulap') {box.y = box.d; box.h = box.d = 0} else |
|
if (mitem.lap == 'dlap') {box.y = -box.h; box.h = box.d = 0} |
|
mitem.nuc = jsMath.Box.SetList(mlist,style,size); |
|
if (mitem.lap == 'ulap' || mitem.lap == 'dlap') {mitem.nuc.h = mitem.nuc.d = 0} |
|
mitem.type = 'box'; delete mitem.atom; |
|
}, |
|
|
|
/* |
|
* Handle a Bin atom. (Rule 5) |
|
*/ |
|
bin: function (style,size,mitem,prev) { |
|
if (prev) { |
|
var type = prev.type; |
|
if (type == 'bin' || type == 'op' || type == 'rel' || |
|
type == 'open' || type == 'punct' || type == '' || |
|
(type == 'boundary' && prev.left != '')) {mitem.type = 'ord'} |
|
} else {mitem.type = 'ord'} |
|
jsMath.mList.prototype.Atomize.SupSub(style,size,mitem); |
|
}, |
|
|
|
/* |
|
* Handle a Rel atom. (Rule 6) |
|
*/ |
|
rel: function (style,size,mitem,prev) { |
|
if (prev.type == 'bin') {prev.type = 'ord'} |
|
jsMath.mList.prototype.Atomize.SupSub(style,size,mitem); |
|
}, |
|
|
|
/* |
|
* Handle a Close atom. (Rule 6) |
|
*/ |
|
close: function (style,size,mitem,prev) { |
|
if (prev.type == 'bin') {prev.type = 'ord'} |
|
jsMath.mList.prototype.Atomize.SupSub(style,size,mitem); |
|
}, |
|
|
|
/* |
|
* Handle a Punct atom. (Rule 6) |
|
*/ |
|
punct: function (style,size,mitem,prev) { |
|
if (prev.type == 'bin') {prev.type = 'ord'} |
|
jsMath.mList.prototype.Atomize.SupSub(style,size,mitem); |
|
}, |
|
|
|
/* |
|
* Handle an Open atom. (Rule 7) |
|
*/ |
|
open: function (style,size,mitem) { |
|
jsMath.mList.prototype.Atomize.SupSub(style,size,mitem); |
|
}, |
|
|
|
/* |
|
* Handle an Inner atom. (Rule 7) |
|
*/ |
|
inner: function (style,size,mitem) { |
|
jsMath.mList.prototype.Atomize.SupSub(style,size,mitem); |
|
}, |
|
|
|
/* |
|
* Handle a Vcent atom. (Rule 8) |
|
*/ |
|
vcenter: function (style,size,mitem) { |
|
var box = jsMath.Box.Set(mitem.nuc,style,size); |
|
var TeX = jsMath.Typeset.TeX(style,size); |
|
box.y = TeX.axis_height - (box.h-box.d)/2; |
|
mitem.nuc = box; mitem.type = 'ord'; |
|
jsMath.mList.prototype.Atomize.SupSub(style,size,mitem); |
|
}, |
|
|
|
/* |
|
* Handle an Over atom. (Rule 9) |
|
*/ |
|
overline: function (style,size,mitem) { |
|
var TeX = jsMath.Typeset.TeX(style,size); |
|
var box = jsMath.Box.Set(mitem.nuc,jsMath.Typeset.PrimeStyle(style),size).Remeasured(); |
|
var t = TeX.default_rule_thickness; |
|
var rule = jsMath.Box.Rule(box.w,t); |
|
rule.x = -rule.w; rule.y = box.h + 3*t; |
|
mitem.nuc = jsMath.Box.SetList([box,rule],style,size); |
|
mitem.nuc.h += t; |
|
mitem.type = 'ord'; |
|
jsMath.mList.prototype.Atomize.SupSub(style,size,mitem); |
|
}, |
|
|
|
/* |
|
* Handle an Under atom. (Rule 10) |
|
*/ |
|
underline: function (style,size,mitem) { |
|
var TeX = jsMath.Typeset.TeX(style,size); |
|
var box = jsMath.Box.Set(mitem.nuc,jsMath.Typeset.PrimeStyle(style),size).Remeasured(); |
|
var t = TeX.default_rule_thickness; |
|
var rule = jsMath.Box.Rule(box.w,t); |
|
rule.x = -rule.w; rule.y = -box.d - 3*t - t; |
|
mitem.nuc = jsMath.Box.SetList([box,rule],style,size); |
|
mitem.nuc.d += t; |
|
mitem.type = 'ord'; |
|
jsMath.mList.prototype.Atomize.SupSub(style,size,mitem); |
|
}, |
|
|
|
/* |
|
* Handle a Rad atom. (Rule 11 plus stuff for \root..\of) |
|
*/ |
|
radical: function (style,size,mitem) { |
|
var TeX = jsMath.Typeset.TeX(style,size); |
|
var Cp = jsMath.Typeset.PrimeStyle(style); |
|
var box = jsMath.Box.Set(mitem.nuc,Cp,size).Remeasured(); |
|
var t = TeX.default_rule_thickness; |
|
var p = t; if (style == 'D' || style == "D'") {p = TeX.x_height} |
|
var r = t + p/4; |
|
var surd = jsMath.Box.Delimiter(box.h+box.d+r+t,0x270370,style,1); |
|
t = surd.h; // thickness of rule is height of surd character |
|
if (surd.d > box.h+box.d+r) {r = (r+surd.d-box.h-box.d)/2} |
|
surd.y = box.h+r; |
|
var rule = jsMath.Box.Rule(box.w,t); |
|
rule.y = surd.y-t/2; rule.h += 3*t/2; box.x = -box.w; |
|
var Cr = jsMath.Typeset.UpStyle(jsMath.Typeset.UpStyle(style)); |
|
var root = jsMath.Box.Set(mitem.root,Cr,size).Remeasured(); |
|
if (mitem.root) { |
|
root.y = .55*(box.h+box.d+3*t+r)-box.d; surd.x = -(11/18)*surd.w; |
|
root.x = Math.max((11/18)*surd.w - root.w, 0); |
|
} |
|
mitem.nuc = jsMath.Box.SetList([root,surd,rule,box],style,size); |
|
mitem.type = 'ord'; |
|
jsMath.mList.prototype.Atomize.SupSub(style,size,mitem); |
|
}, |
|
|
|
/* |
|
* Handle an Acc atom. (Rule 12) |
|
*/ |
|
accent: function (style,size,mitem) { |
|
var TeX = jsMath.Typeset.TeX(style,size); |
|
var Cp = jsMath.Typeset.PrimeStyle(style); |
|
var box = jsMath.Box.Set(mitem.nuc,Cp,size); |
|
var u = box.w; var s; var Font; |
|
if (mitem.nuc.type == 'TeX') { |
|
Font = jsMath.TeX[mitem.nuc.font]; |
|
if (Font[mitem.nuc.c].krn && Font.skewchar) |
|
{s = Font[mitem.nuc.c].krn[Font.skewchar]} |
|
} |
|
if (s == null) {s = 0} |
|
|
|
var c = mitem.accent & 0xFF; |
|
var font = jsMath.TeX.fam[(mitem.accent&0xF00)>>8]; Font = jsMath.TeX[font]; |
|
while (Font[c].n && Font[Font[c].n].w <= u) {c = Font[c].n} |
|
|
|
var delta = Math.min(box.h,TeX.x_height); |
|
if (mitem.nuc.type == 'TeX') { |
|
var nitem = jsMath.mItem.Atom('ord',mitem.nuc); |
|
nitem.sup = mitem.sup; nitem.sub = mitem.sub; nitem.delta = 0; |
|
jsMath.mList.prototype.Atomize.SupSub(style,size,nitem); |
|
delta += (nitem.nuc.h - box.h); |
|
box = mitem.nuc = nitem.nuc; |
|
delete mitem.sup; delete mitem.sub; |
|
} |
|
var acc = jsMath.Box.TeX(c,font,style,size); |
|
acc.y = box.h - delta; acc.x = -box.w + s + (u-acc.w)/2; |
|
if (Font[c].ic) {acc.x -= Font[c].ic * TeX.scale} |
|
|
|
mitem.nuc = jsMath.Box.SetList([box,acc],style,size); |
|
if (mitem.nuc.w != box.w) { |
|
var space = jsMath.mItem.Space(box.w-mitem.nuc.w); |
|
mitem.nuc = jsMath.Box.SetList([mitem.nuc,space],style,size); |
|
} |
|
mitem.type = 'ord'; |
|
jsMath.mList.prototype.Atomize.SupSub(style,size,mitem); |
|
}, |
|
|
|
/* |
|
* Handle an Op atom. (Rules 13 and 13a) |
|
*/ |
|
op: function (style,size,mitem) { |
|
var TeX = jsMath.Typeset.TeX(style,size); var box; |
|
mitem.delta = 0; var isD = (style.charAt(0) == 'D'); |
|
if (mitem.limits == null && isD) {mitem.limits = 1} |
|
|
|
if (mitem.nuc.type == 'TeX') { |
|
var C = jsMath.TeX[mitem.nuc.font][mitem.nuc.c]; |
|
if (isD && C.n) {mitem.nuc.c = C.n; C = jsMath.TeX[mitem.nuc.font][C.n]} |
|
box = jsMath.Box.Set(mitem.nuc,style,size); |
|
if (C.ic) { |
|
mitem.delta = C.ic * TeX.scale; |
|
if (mitem.limits || !mitem.sub || jsMath.msieIntegralBug) |
|
{box = jsMath.Box.SetList([box,jsMath.mItem.Space(mitem.delta)],style,size)} |
|
} |
|
box.y = -((box.h+box.d)/2 - box.d - TeX.axis_height); |
|
if (Math.abs(box.y) < .0001) (box.y = 0) |
|
} |
|
|
|
if (!box) {box = jsMath.Box.Set(mitem.nuc,style,size).Remeasured()} |
|
if (mitem.limits) { |
|
var W = box.w; var x = box.w; |
|
var mlist = [box]; var dh = 0; var dd = 0; |
|
if (mitem.sup) { |
|
var sup = jsMath.Box.Set(mitem.sup,jsMath.Typeset.UpStyle(style),size).Remeasured(); |
|
sup.x = ((box.w-sup.w)/2 + mitem.delta/2) - x; dh = TeX.big_op_spacing5; |
|
W = Math.max(W,sup.w); x += sup.x + sup.w; |
|
sup.y = box.h+sup.d + box.y + |
|
Math.max(TeX.big_op_spacing1,TeX.big_op_spacing3-sup.d); |
|
mlist[mlist.length] = sup; delete mitem.sup; |
|
} |
|
if (mitem.sub) { |
|
var sub = jsMath.Box.Set(mitem.sub,jsMath.Typeset.DownStyle(style),size).Remeasured(); |
|
sub.x = ((box.w-sub.w)/2 - mitem.delta/2) - x; dd = TeX.big_op_spacing5; |
|
W = Math.max(W,sub.w); x += sub.x + sub.w; |
|
sub.y = -box.d-sub.h + box.y - |
|
Math.max(TeX.big_op_spacing2,TeX.big_op_spacing4-sub.h); |
|
mlist[mlist.length] = sub; delete mitem.sub; |
|
} |
|
if (W > box.w) {box.x = (W-box.w)/2; x += box.x} |
|
if (x < W) {mlist[mlist.length] = jsMath.mItem.Space(W-x)} |
|
mitem.nuc = jsMath.Box.SetList(mlist,style,size); |
|
mitem.nuc.h += dh; mitem.nuc.d += dd; |
|
} else { |
|
if (jsMath.msieIntegralBug && mitem.sub && C && C.ic) |
|
{mitem.nuc = jsMath.Box.SetList([box,jsMath.Box.Space(-C.ic*TeX.scale)],style,size)} |
|
else if (box.y) {mitem.nuc = jsMath.Box.SetList([box],style,size)} |
|
jsMath.mList.prototype.Atomize.SupSub(style,size,mitem); |
|
} |
|
}, |
|
|
|
/* |
|
* Handle an Ord atom. (Rule 14) |
|
*/ |
|
ord: function (style,size,mitem,prev,mList,i) { |
|
if (mitem.nuc.type == 'TeX' && !mitem.sup && !mitem.sub) { |
|
var nitem = mList.mlist[i+1]; |
|
if (nitem && nitem.atom && nitem.type && |
|
(nitem.type == 'ord' || nitem.type == 'op' || nitem.type == 'bin' || |
|
nitem.type == 'rel' || nitem.type == 'open' || |
|
nitem.type == 'close' || nitem.type == 'punct')) { |
|
if (nitem.nuc.type == 'TeX' && nitem.nuc.font == mitem.nuc.font) { |
|
mitem.textsymbol = 1; |
|
var krn = jsMath.TeX[mitem.nuc.font][mitem.nuc.c].krn; |
|
krn *= jsMath.Typeset.TeX(style,size).scale; |
|
if (krn && krn[nitem.nuc.c]) { |
|
for (var k = mList.mlist.length-1; k > i; k--) |
|
{mList.mlist[k+1] = mList.mlist[k]} |
|
mList.mlist[i+1] = jsMath.mItem.Space(krn[nitem.nuc.c]); |
|
} |
|
} |
|
} |
|
} |
|
jsMath.mList.prototype.Atomize.SupSub(style,size,mitem); |
|
}, |
|
|
|
/* |
|
* Handle a generalized fraction. (Rules 15 to 15e) |
|
*/ |
|
fraction: function (style,size,mitem) { |
|
var TeX = jsMath.Typeset.TeX(style,size); var t = 0; |
|
if (mitem.thickness != null) {t = mitem.thickness} |
|
else if (mitem.from.match(/over/)) {t = TeX.default_rule_thickness} |
|
var isD = (style.charAt(0) == 'D'); |
|
var Cn = (style == 'D')? 'T': (style == "D'")? "T'": jsMath.Typeset.UpStyle(style); |
|
var Cd = (isD)? "T'": jsMath.Typeset.DownStyle(style); |
|
var num = jsMath.Box.Set(mitem.num,Cn,size).Remeasured(); |
|
var den = jsMath.Box.Set(mitem.den,Cd,size).Remeasured(); |
|
|
|
var u; var v; var w; |
|
var H = (isD)? TeX.delim1 : TeX.delim2; |
|
var mlist = [jsMath.Box.Delimiter(H,mitem.left,style)] |
|
var right = jsMath.Box.Delimiter(H,mitem.right,style); |
|
|
|
if (num.w < den.w) { |
|
num.x = (den.w-num.w)/2; |
|
den.x = -(num.w + num.x); |
|
w = den.w; mlist[1] = num; mlist[2] = den; |
|
} else { |
|
den.x = (num.w-den.w)/2; |
|
num.x = -(den.w + den.x); |
|
w = num.w; mlist[1] = den; mlist[2] = num; |
|
} |
|
if (isD) {u = TeX.num1; v = TeX.denom1} else { |
|
u = (t != 0)? TeX.num2: TeX.num3; |
|
v = TeX.denom2; |
|
} |
|
if (t == 0) {// atop |
|
var p = (isD)? 7*TeX.default_rule_thickness: 3*TeX.default_rule_thickness; |
|
var r = (u - num.d) - (den.h - v); |
|
if (r < p) {u += (p-r)/2; v += (p-r)/2} |
|
} else {// over |
|
var p = (isD)? 3*t: t; var a = TeX.axis_height; |
|
var r = (u-num.d)-(a+t/2); if (r < p) {u += p-r} |
|
r = (a-t/2)-(den.h-v); if (r < p) {v += p-r} |
|
var rule = jsMath.Box.Rule(w,t); rule.x = -w; rule.y = a - t/2; |
|
mlist[mlist.length] = rule; |
|
} |
|
num.y = u; den.y = -v; |
|
|
|
mlist[mlist.length] = right; |
|
mitem.nuc = jsMath.Box.SetList(mlist,style,size); |
|
mitem.type = 'ord'; mitem.atom = 1; |
|
delete mitem.num; delete mitem.den; |
|
jsMath.mList.prototype.Atomize.SupSub(style,size,mitem); |
|
}, |
|
|
|
/* |
|
* Add subscripts and superscripts. (Rules 17-18f) |
|
*/ |
|
SupSub: function (style,size,mitem) { |
|
var TeX = jsMath.Typeset.TeX(style,size); |
|
var nuc = mitem.nuc; |
|
var box = mitem.nuc = jsMath.Box.Set(mitem.nuc,style,size,0); |
|
if (box.format == 'null') |
|
{box = mitem.nuc = jsMath.Box.Text('','normal',style,size)} |
|
|
|
if (nuc.type == 'TeX') { |
|
if (!mitem.textsymbol) { |
|
var C = jsMath.TeX[nuc.font][nuc.c]; |
|
if (C.ic) { |
|
mitem.delta = C.ic * TeX.scale; |
|
if (!mitem.sub) { |
|
box = mitem.nuc = jsMath.Box.SetList([box,jsMath.Box.Space(mitem.delta)],style,size); |
|
mitem.delta = 0; |
|
} |
|
} |
|
} else {mitem.delta = 0} |
|
} |
|
|
|
if (!mitem.sup && !mitem.sub) return; |
|
mitem.nuc.Styled(); |
|
|
|
var Cd = jsMath.Typeset.DownStyle(style); |
|
var Cu = jsMath.Typeset.UpStyle(style); |
|
var q = jsMath.Typeset.TeX(Cu,size).sup_drop; |
|
var r = jsMath.Typeset.TeX(Cd,size).sub_drop; |
|
var u = 0; var v = 0; var p; |
|
if (nuc.type != 'text' && nuc.type != 'TeX' && nuc.type != 'null') |
|
{u = box.h - q; v = box.d + r} |
|
|
|
if (mitem.sub) { |
|
var sub = jsMath.Box.Set(mitem.sub,Cd,size); |
|
sub = jsMath.Box.SetList([sub,jsMath.mItem.Space(TeX.scriptspace)],style,size); |
|
} |
|
|
|
if (!mitem.sup) { |
|
sub.y = -Math.max(v,TeX.sub1,sub.h-(4/5)*jsMath.Typeset.TeX(Cd,size).x_height); |
|
mitem.nuc = jsMath.Box.SetList([box,sub],style,size).Styled(); delete mitem.sub; |
|
return; |
|
} |
|
|
|
var sup = jsMath.Box.Set(mitem.sup,Cu,size); |
|
sup = jsMath.Box.SetList([sup,jsMath.mItem.Space(TeX.scriptspace)],style,size); |
|
if (style == 'D') {p = TeX.sup1} |
|
else if (style.charAt(style.length-1) == "'") {p = TeX.sup3} |
|
else {p = TeX.sup2} |
|
u = Math.max(u,p,sup.d+jsMath.Typeset.TeX(Cu,size).x_height/4); |
|
|
|
if (!mitem.sub) { |
|
sup.y = u; |
|
mitem.nuc = jsMath.Box.SetList([box,sup],style,size); delete mitem.sup; |
|
return; |
|
} |
|
|
|
v = Math.max(v,jsMath.Typeset.TeX(Cd,size).sub2); |
|
var t = TeX.default_rule_thickness; |
|
if ((u-sup.d) - (sub.h -v) < 4*t) { |
|
v = 4*t + sub.h - (u-sup.d); |
|
p = (4/5)*TeX.x_height - (u-sup.d); |
|
if (p > 0) {u += p; v -= p} |
|
} |
|
sup.Remeasured(); sub.Remeasured(); |
|
sup.y = u; sub.y = -v; sup.x = mitem.delta; |
|
if (sup.w+sup.x > sub.w) |
|
{sup.x -= sub.w; mitem.nuc = jsMath.Box.SetList([box,sub,sup],style,size)} else |
|
{sub.x -= (sup.w+sup.x); mitem.nuc = jsMath.Box.SetList([box,sup,sub],style,size)} |
|
|
|
delete mitem.sup; delete mitem.sub; |
|
} |
|
|
|
}); |
|
|
|
|
|
/***************************************************************************/ |
|
|
|
/* |
|
* The Typeset object handles most of the TeX-specific processing |
|
*/ |
|
|
|
jsMath.Typeset = function (mlist) { |
|
this.type = 'typeset'; |
|
this.mlist = mlist; |
|
} |
|
|
|
jsMath.Add(jsMath.Typeset,{ |
|
|
|
/* |
|
* The "C-uparrow" style table (TeXbook, p. 441) |
|
*/ |
|
upStyle: { |
|
D: "S", T: "S", "D'": "S'", "T'": "S'", |
|
S: "SS", SS: "SS", "S'": "SS'", "SS'": "SS'" |
|
}, |
|
|
|
/* |
|
* The "C-downarrow" style table (TeXbook, p. 441) |
|
*/ |
|
downStyle: { |
|
D: "S'", T: "S'", "D'": "S'", "T'": "S'", |
|
S: "SS'", SS: "SS'", "S'": "SS'", "SS'": "SS'" |
|
}, |
|
|
|
/* |
|
* Get the various styles given the current style |
|
* (see TeXbook, p. 441) |
|
*/ |
|
UpStyle: function (style) {return this.upStyle[style]}, |
|
DownStyle: function (style) {return this.downStyle[style]}, |
|
PrimeStyle: function (style) { |
|
if (style.charAt(style.length-1) == "'") {return style} |
|
return style + "'" |
|
}, |
|
|
|
/* |
|
* A value scaled to the appropriate size for scripts |
|
*/ |
|
StyleValue: function (style,v) { |
|
if (style == "S" || style == "S'") {return .7*v} |
|
if (style == "SS" || style == "SS'") {return .5*v} |
|
return v; |
|
}, |
|
|
|
/* |
|
* Return the font parameter table for the given style |
|
*/ |
|
TeX: function (style,size) { |
|
if (style == "S" || style == "S'") {size = Math.max(0,size-2)} |
|
else if (style == "SS" || style == "SS'") {size = Math.max(0,size-4)} |
|
return jsMath.TeXparams[size]; |
|
}, |
|
|
|
|
|
/* |
|
* Add the CSS class for the given TeX style |
|
*/ |
|
AddStyle: function (style,size,html) { |
|
if (style == "S" || style == "S'") {size = Math.max(0,size-2)} |
|
else if (style == "SS" || style == "SS'") {size = Math.max(0,size-4)} |
|
if (size != 4) {html = '<SPAN CLASS="size'+size+'">' + html + '</SPAN>'} |
|
return html; |
|
}, |
|
|
|
/* |
|
* Add the font class, if needed |
|
*/ |
|
AddClass: function (tclass,html) { |
|
if (tclass != '' && tclass != 'normal') {html = jsMath.HTML.Class(tclass,html)} |
|
return html; |
|
} |
|
|
|
}); |
|
|
|
|
|
jsMath.Package(jsMath.Typeset,{ |
|
|
|
/* |
|
* The spacing tables for inter-atom spacing |
|
* (See rule 20, and Chapter 18, p 170) |
|
*/ |
|
DTsep: { |
|
ord: {op: 1, bin: 2, rel: 3, inner: 1}, |
|
op: {ord: 1, op: 1, rel: 3, inner: 1}, |
|
bin: {ord: 2, op: 2, open: 2, inner: 2}, |
|
rel: {ord: 3, op: 3, open: 3, inner: 3}, |
|
open: {}, |
|
close: {op: 1, bin:2, rel: 3, inner: 1}, |
|
punct: {ord: 1, op: 1, rel: 1, open: 1, close: 1, punct: 1, inner: 1}, |
|
inner: {ord: 1, op: 1, bin: 2, rel: 3, open: 1, punct: 1, inner: 1} |
|
}, |
|
|
|
SSsep: { |
|
ord: {op: 1}, |
|
op: {ord: 1, op: 1}, |
|
bin: {}, |
|
rel: {}, |
|
open: {}, |
|
close: {op: 1}, |
|
punct: {}, |
|
inner: {op: 1} |
|
}, |
|
|
|
/* |
|
* The sizes used in the tables above |
|
*/ |
|
sepW: ['','thinmuskip','medmuskip','thickmuskip'], |
|
|
|
|
|
/* |
|
* Find the amount of separation to use between two adjacent |
|
* atoms in the given style |
|
*/ |
|
GetSeparation: function (l,r,style) { |
|
if (l && l.atom && r.atom) { |
|
var table = this.DTsep; if (style.charAt(0) == "S") {table = this.SSsep} |
|
var row = table[l.type]; |
|
if (row && row[r.type] != null) {return jsMath.TeX[this.sepW[row[r.type]]]} |
|
} |
|
return 0; |
|
}, |
|
|
|
/* |
|
* Typeset an mlist (i.e., turn it into HTML). |
|
* Here, text items of the same class and style are combined |
|
* to reduce the number of <SPAN> tags used (though it is still |
|
* huge). Spaces are combined, when possible. |
|
* ### More needs to be done with that. ### |
|
* The width of the final box is recomputed at the end, since |
|
* the final width is not necessarily the sum of the widths of |
|
* the individual parts (widths are in pixels, but the browsers |
|
* puts pieces together using sub-pixel accuracy). |
|
*/ |
|
Typeset: function (style,size) { |
|
this.style = style; this.size = size; var unset = -10000 |
|
this.w = 0; this.h = unset; this.d = unset; |
|
this.bh = this.h; this.bd = this.d; |
|
this.tbuf = ''; this.tx = 0; this.tclass = ''; |
|
this.cbuf = ''; this.hbuf = ''; this.hx = 0; |
|
var mitem = null; var prev; this.x = 0; this.dx = 0; |
|
|
|
for (var i = 0; i < this.mlist.length; i++) { |
|
prev = mitem; mitem = this.mlist[i]; |
|
switch (mitem.type) { |
|
|
|
case 'size': |
|
this.FlushClassed(); |
|
this.size = mitem.size; |
|
mitem = prev; // hide this from TeX |
|
break; |
|
|
|
case 'style': |
|
this.FlushClassed(); |
|
if (this.style.charAt(this.style.length-1) == "'") |
|
{this.style = mitem.style + "'"} else {this.style = mitem.style} |
|
mitem = prev; // hide this from TeX |
|
break; |
|
|
|
case 'space': |
|
if (typeof(mitem.w) == 'object') { |
|
if (this.style.charAt(1) == 'S') {mitem.w = .5*mitem.w[0]/18} |
|
else if (this.style.charAt(0) == 'S') {mitem.w = .7*mitem.w[0]/18} |
|
else {mitem.w = mitem.w[0]/18} |
|
} |
|
this.dx += mitem.w-0; // mitem.w is sometimes a string? |
|
mitem = prev; // hide this from TeX |
|
break; |
|
|
|
case 'html': |
|
this.FlushClassed(); |
|
if (this.hbuf == '') {this.hx = this.x} |
|
this.hbuf += mitem.html; |
|
mitem = prev; // hide this from TeX |
|
break; |
|
|
|
default: // atom |
|
if (!mitem.atom && mitem.type != 'box') break; |
|
mitem.nuc.x += this.dx + this.GetSeparation(prev,mitem,this.style); |
|
if (mitem.nuc.y || mitem.nuc.x) mitem.nuc.Styled(); |
|
this.dx = 0; this.x = this.x + this.w; |
|
this.w += mitem.nuc.w + mitem.nuc.x; |
|
if (mitem.nuc.format == 'text') { |
|
if (this.tclass != mitem.nuc.tclass && this.tclass != '') this.FlushText(); |
|
if (this.tbuf == '' && this.cbuf == '') {this.tx = this.x} |
|
this.tbuf += mitem.nuc.html; this.tclass = mitem.nuc.tclass; |
|
} else { |
|
this.FlushClassed(); |
|
if (mitem.nuc.x || mitem.nuc.y) this.Place(mitem.nuc); |
|
if (this.hbuf == '') {this.hx = this.x} |
|
this.hbuf += mitem.nuc.html; |
|
} |
|
this.h = Math.max(this.h,mitem.nuc.h+mitem.nuc.y); this.bh = Math.max(this.bh,mitem.nuc.bh); |
|
this.d = Math.max(this.d,mitem.nuc.d-mitem.nuc.y); this.bd = Math.max(this.bd,mitem.nuc.bd); |
|
break; |
|
} |
|
} |
|
|
|
this.FlushClassed(); // make sure scaling is included |
|
if (this.dx) {this.hbuf += jsMath.HTML.Spacer(this.dx)} |
|
if (this.hbuf == '') {return jsMath.Box.Null} |
|
if (this.h == unset) {this.h = 0} |
|
if (this.d == unset) {this.d = 0} |
|
var box = new jsMath.Box('html',this.hbuf,this.w,this.h,this.d); |
|
box.bh = this.bh; box.bd = this.bd; |
|
return box; |
|
}, |
|
|
|
/* |
|
* Add the font to the buffered text and move it to the |
|
* classed-text buffer. |
|
*/ |
|
FlushText: function () { |
|
if (this.tbuf == '') return; |
|
this.cbuf += jsMath.Typeset.AddClass(this.tclass,this.tbuf); |
|
this.tbuf = ''; this.tclass = ''; |
|
}, |
|
|
|
/* |
|
* Add the script or scriptscript style to the text and |
|
* move it to the HTML buffer |
|
*/ |
|
FlushClassed: function () { |
|
this.FlushText(); |
|
if (this.cbuf == '') return; |
|
if (this.hbuf == '') {this.hx = this.tx} |
|
this.hbuf += jsMath.Typeset.AddStyle(this.style,this.size,this.cbuf); |
|
this.cbuf = ''; |
|
}, |
|
|
|
/* |
|
* Add a <SPAN> to position an item's HTML, and |
|
* adjust the items height and depth. |
|
* (This may be replaced buy one of the following browser-specific |
|
* versions by InitBrowser().) |
|
*/ |
|
Place: function (item) { |
|
var html = '<SPAN STYLE="position: relative;'; |
|
if (item.x) {html += ' margin-left:'+jsMath.HTML.Em(item.x)+';'} |
|
if (item.y) {html += ' top:'+jsMath.HTML.Em(-item.y)+';'} |
|
item.html = html + '">' + item.html + '</SPAN>'; |
|
item.h += item.y; item.d -= item.y; |
|
item.x = 0; item.y = 0; |
|
}, |
|
|
|
/* |
|
* A replacement for Place() above that fixes a bug in MSIE. |
|
* (A separate <SPAN> is used to backspace, otherwise the |
|
* contents are clipped incorrectly.) |
|
*/ |
|
PlaceSeparateNegative: function (item) { |
|
var html = '<SPAN STYLE="position: relative;'; |
|
// MSIE needs backspacing as separate SPAN |
|
if (item.x < 0) |
|
{html = '<SPAN STYLE="margin-left:'+jsMath.HTML.Em(item.x)+';"></SPAN>'+html} |
|
if (item.x > 0) {html += ' margin-left:'+jsMath.HTML.Em(item.x)+';'} |
|
if (item.y) {html += ' top:'+jsMath.HTML.Em(-item.y)+';'} |
|
item.html = html + '">' + item.html + '</SPAN>'; |
|
item.h += item.y; item.d -= item.y; |
|
item.x = 0; item.y = 0; |
|
}, |
|
|
|
/* |
|
* Here, the horizontal spacing is always done separately. |
|
*/ |
|
PlaceSeparateSkips: function (item) { |
|
if (item.y) |
|
{item.html = '<SPAN STYLE="position: relative; top:'+jsMath.HTML.Em(-item.y)+';' |
|
+ '">' + item.html + '</SPAN>'} |
|
if (item.x) |
|
{item.html = jsMath.msieSpaceFix |
|
+ '<SPAN STYLE="margin-left:'+jsMath.HTML.Em(item.x)+';">' |
|
+ '</SPAN>' + item.html} |
|
item.h += item.y; item.d -= item.y; |
|
item.x = 0; item.y = 0; |
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
/***************************************************************************/ |
|
|
|
/* |
|
* The Parse object handles the parsing of the TeX input string, and creates |
|
* the mList to be typeset by the Typeset object above. |
|
*/ |
|
|
|
jsMath.Parse = function (s,font,size,style) { |
|
var parse = new jsMath.Parser(s,font,size,style); |
|
parse.Parse(); |
|
return parse; |
|
} |
|
|
|
jsMath.Parser = function (s,font,size,style) { |
|
this.string = s; this.i = 0; |
|
this.mlist = new jsMath.mList(null,font,size,style); |
|
} |
|
|
|
jsMath.Package(jsMath.Parser,{ |
|
|
|
// special characters |
|
cmd: '\\', |
|
open: '{', |
|
close: '}', |
|
|
|
// patterns for letters and numbers |
|
letter: /[a-z]/i, |
|
number: /[0-9]/, |
|
|
|
// the \mathchar definitions (see Appendix B of the TeXbook). |
|
mathchar: { |
|
'!': 0x5021, |
|
'(': 0x4028, |
|
')': 0x5029, |
|
'*': 0x2203, // \ast |
|
'+': 0x202B, |
|
',': 0x613B, |
|
'-': 0x2200, |
|
'.': 0x013A, |
|
'/': 0x013D, |
|
':': 0x303A, |
|
';': 0x603B, |
|
'<': 0x313C, |
|
'=': 0x303D, |
|
'>': 0x313E, |
|
'?': 0x503F, |
|
'[': 0x405B, |
|
']': 0x505D, |
|
// '{': 0x4266, |
|
// '}': 0x5267, |
|
'|': 0x026A |
|
}, |
|
|
|
// handle special \catcode characters |
|
special: { |
|
'^': 'HandleSuperscript', |
|
'_': 'HandleSubscript', |
|
' ': 'Space', |
|
"\t": 'Space', |
|
"\r": 'Space', |
|
"\n": 'Space', |
|
"'": 'Prime', |
|
'%': 'HandleComment', |
|
'&': 'HandleEntry' |
|
}, |
|
|
|
// the \mathchardef table (see Appendix B of the TeXbook). |
|
mathchardef: { |
|
// brace parts |
|
braceld: 0x37A, |
|
bracerd: 0x37B, |
|
bracelu: 0x37C, |
|
braceru: 0x37D, |
|
|
|
// Greek letters |
|
alpha: 0x010B, |
|
beta: 0x010C, |
|
gamma: 0x010D, |
|
delta: 0x010E, |
|
epsilon: 0x010F, |
|
zeta: 0x0110, |
|
eta: 0x0111, |
|
theta: 0x0112, |
|
iota: 0x0113, |
|
kappa: 0x0114, |
|
lambda: 0x0115, |
|
mu: 0x0116, |
|
nu: 0x0117, |
|
xi: 0x0118, |
|
pi: 0x0119, |
|
rho: 0x011A, |
|
sigma: 0x011B, |
|
tau: 0x011C, |
|
upsilon: 0x011D, |
|
phi: 0x011E, |
|
chi: 0x011F, |
|
psi: 0x0120, |
|
omega: 0x0121, |
|
varepsilon: 0x0122, |
|
vartheta: 0x0123, |
|
varpi: 0x0124, |
|
varrho: 0x0125, |
|
varsigma: 0x0126, |
|
varphi: 0x0127, |
|
|
|
Gamma: 0x7000, |
|
Delta: 0x7001, |
|
Theta: 0x7002, |
|
Lambda: 0x7003, |
|
Xi: 0x7004, |
|
Pi: 0x7005, |
|
Sigma: 0x7006, |
|
Upsilon: 0x7007, |
|
Phi: 0x7008, |
|
Psi: 0x7009, |
|
Omega: 0x700A, |
|
|
|
// Ord symbols |
|
aleph: 0x0240, |
|
imath: 0x017B, |
|
jmath: 0x017C, |
|
ell: 0x0160, |
|
wp: 0x017D, |
|
Re: 0x023C, |
|
Im: 0x023D, |
|
partial: 0x0140, |
|
infty: 0x0231, |
|
prime: 0x0230, |
|
emptyset: 0x023B, |
|
nabla: 0x0272, |
|
surd: 0x1270, |
|
top: 0x023E, |
|
bot: 0x023F, |
|
triangle: 0x0234, |
|
forall: 0x0238, |
|
exists: 0x0239, |
|
neg: 0x023A, |
|
lnot: 0x023A, |
|
flat: 0x015B, |
|
natural: 0x015C, |
|
sharp: 0x015D, |
|
clubsuit: 0x027C, |
|
diamondsuit: 0x027D, |
|
heartsuit: 0x027E, |
|
spadesuit: 0x027F, |
|
|
|
// big ops |
|
coprod: 0x1360, |
|
bigvee: 0x1357, |
|
bigwedge: 0x1356, |
|
biguplus: 0x1355, |
|
bigcap: 0x1354, |
|
bigcup: 0x1353, |
|
intop: 0x1352, |
|
prod: 0x1351, |
|
sum: 0x1350, |
|
bigotimes: 0x134E, |
|
bigoplus: 0x134C, |
|
bigodot: 0x134A, |
|
ointop: 0x1348, |
|
bigsqcup: 0x1346, |
|
smallint: 0x1273, |
|
|
|
// binary operations |
|
triangleleft: 0x212F, |
|
triangleright: 0x212E, |
|
bigtriangleup: 0x2234, |
|
bigtriangledown: 0x2235, |
|
wedge: 0x225E, |
|
land: 0x225E, |
|
vee: 0x225F, |
|
lor: 0x225F, |
|
cap: 0x225C, |
|
cup: 0x225B, |
|
ddagger: 0x227A, |
|
dagger: 0x2279, |
|
sqcap: 0x2275, |
|
sqcup: 0x2274, |
|
uplus: 0x225D, |
|
amalg: 0x2271, |
|
diamond: 0x2205, |
|
bullet: 0x220F, |
|
wr: 0x226F, |
|
div: 0x2204, |
|
odot: 0x220C, |
|
oslash: 0x220B, |
|
otimes: 0x220A, |
|
ominus: 0x2209, |
|
oplus: 0x2208, |
|
mp: 0x2207, |
|
pm: 0x2206, |
|
circ: 0x220E, |
|
bigcirc: 0x220D, |
|
setminus: 0x226E, // for set difference A\setminus B |
|
cdot: 0x2201, |
|
ast: 0x2203, |
|
times: 0x2202, |
|
star: 0x213F, |
|
|
|
// Relations |
|
propto: 0x322F, |
|
sqsubseteq: 0x3276, |
|
sqsupseteq: 0x3277, |
|
parallel: 0x326B, |
|
mid: 0x326A, |
|
dashv: 0x3261, |
|
vdash: 0x3260, |
|
leq: 0x3214, |
|
le: 0x3214, |
|
geq: 0x3215, |
|
ge: 0x3215, |
|
succ: 0x321F, |
|
prec: 0x321E, |
|
approx: 0x3219, |
|
succeq: 0x3217, |
|
preceq: 0x3216, |
|
supset: 0x321B, |
|
subset: 0x321A, |
|
supseteq: 0x3213, |
|
subseteq: 0x3212, |
|
'in': 0x3232, |
|
ni: 0x3233, |
|
owns: 0x3233, |
|
gg: 0x321D, |
|
ll: 0x321C, |
|
not: 0x3236, |
|
sim: 0x3218, |
|
simeq: 0x3227, |
|
perp: 0x323F, |
|
equiv: 0x3211, |
|
asymp: 0x3210, |
|
smile: 0x315E, |
|
frown: 0x315F, |
|
|
|
// Arrows |
|
Leftrightarrow: 0x322C, |
|
Leftarrow: 0x3228, |
|
Rightarrow: 0x3229, |
|
leftrightarrow: 0x3224, |
|
leftarrow: 0x3220, |
|
gets: 0x3220, |
|
rightarrow: 0x3221, |
|
to: 0x3221, |
|
mapstochar: 0x3237, |
|
leftharpoonup: 0x3128, |
|
leftharpoondown: 0x3129, |
|
rightharpoonup: 0x312A, |
|
rightharpoondown: 0x312B, |
|
nearrow: 0x3225, |
|
searrow: 0x3226, |
|
nwarrow: 0x322D, |
|
swarrow: 0x322E, |
|
|
|
hbarchar: 0x0016, // for \hbar |
|
lhook: 0x312C, |
|
rhook: 0x312D, |
|
|
|
ldotp: 0x613A, // ldot as a punctuation mark |
|
cdotp: 0x6201, // cdot as a punctuation mark |
|
colon: 0x603A, // colon as a punctuation mark |
|
|
|
'#': 0x7023, |
|
'$': 0x7024, |
|
'%': 0x7025, |
|
'&': 0x7026 |
|
}, |
|
|
|
// The delimiter table (see Appendix B of the TeXbook) |
|
delimiter: { |
|
'(': 0x0028300, |
|
')': 0x0029301, |
|
'[': 0x005B302, |
|
']': 0x005D303, |
|
'<': 0x026830A, |
|
'>': 0x026930B, |
|
'/': 0x002F30E, |
|
'|': 0x026A30C, |
|
'.': 0x0000000, |
|
'\\': 0x026E30F, |
|
'\\lmoustache': 0x437A340, // top from (, bottom from ) |
|
'\\rmoustache': 0x537B341, // top from ), bottom from ( |
|
'\\lgroup': 0x462833A, // extensible ( with sharper tips |
|
'\\rgroup': 0x562933B, // extensible ) with sharper tips |
|
'\\arrowvert': 0x026A33C, // arrow without arrowheads |
|
'\\Arrowvert': 0x026B33D, // double arrow without arrowheads |
|
// '\\bracevert': 0x077C33E, // the vertical bar that extends braces |
|
'\\bracevert': 0x026A33E, // we don't load tt, so use | instead |
|
'\\Vert': 0x026B30D, |
|
'\\|': 0x026B30D, |
|
'\\vert': 0x026A30C, |
|
'\\uparrow': 0x3222378, |
|
'\\downarrow': 0x3223379, |
|
'\\updownarrow': 0x326C33F, |
|
'\\Uparrow': 0x322A37E, |
|
'\\Downarrow': 0x322B37F, |
|
'\\Updownarrow': 0x326D377, |
|
'\\backslash': 0x026E30F, // for double coset G\backslash H |
|
'\\rangle': 0x526930B, |
|
'\\langle': 0x426830A, |
|
'\\rbrace': 0x5267309, |
|
'\\lbrace': 0x4266308, |
|
'\\}': 0x5267309, |
|
'\\{': 0x4266308, |
|
'\\rceil': 0x5265307, |
|
'\\lceil': 0x4264306, |
|
'\\rfloor': 0x5263305, |
|
'\\lfloor': 0x4262304 |
|
}, |
|
|
|
/* |
|
* The basic macros for plain TeX. |
|
* |
|
* When the control sequence on the left is called, the JavaScript |
|
* funtion on the right is called, with the name of the control sequence |
|
* as its first parameter (this way, the same function can be called by |
|
* several different control sequences to do similar actions, and the |
|
* function can still tell which TeX command was issued). If the right |
|
* is an array, the first entry is the routine to call, and the |
|
* remaining entries in the array are parameters to pass to the function |
|
* as the second parameter (they are in an array reference). |
|
* |
|
* Note: TeX macros as defined by the user are discussed below. |
|
*/ |
|
macros: { |
|
displaystyle: ['HandleStyle','D'], |
|
textstyle: ['HandleStyle','T'], |
|
scriptstyle: ['HandleStyle','S'], |
|
scriptscriptstyle: ['HandleStyle','SS'], |
|
|
|
rm: ['HandleFont',0], |
|
mit: ['HandleFont',1], |
|
oldstyle: ['HandleFont',1], |
|
cal: ['HandleFont',2], |
|
it: ['HandleFont',4], |
|
bf: ['HandleFont',6], |
|
|
|
left: 'HandleLeft', |
|
right: 'HandleRight', |
|
|
|
arcsin: ['NamedOp',0], |
|
arccos: ['NamedOp',0], |
|
arctan: ['NamedOp',0], |
|
arg: ['NamedOp',0], |
|
cos: ['NamedOp',0], |
|
cosh: ['NamedOp',0], |
|
cot: ['NamedOp',0], |
|
coth: ['NamedOp',0], |
|
csc: ['NamedOp',0], |
|
deg: ['NamedOp',0], |
|
det: 'NamedOp', |
|
dim: ['NamedOp',0], |
|
exp: ['NamedOp',0], |
|
gcd: 'NamedOp', |
|
hom: ['NamedOp',0], |
|
inf: 'NamedOp', |
|
ker: ['NamedOp',0], |
|
lg: ['NamedOp',0], |
|
lim: 'NamedOp', |
|
liminf: ['NamedOp',null,'lim<SPAN STYLE="margin-left: '+1/6+'em"></SPAN>inf'], |
|
limsup: ['NamedOp',null,'lim<SPAN STYLE="margin-left: '+1/6+'em"></SPAN>sup'], |
|
ln: ['NamedOp',0], |
|
log: ['NamedOp',0], |
|
max: 'NamedOp', |
|
min: 'NamedOp', |
|
Pr: 'NamedOp', |
|
sec: ['NamedOp',0], |
|
sin: ['NamedOp',0], |
|
sinh: ['NamedOp',0], |
|
sup: 'NamedOp', |
|
tan: ['NamedOp',0], |
|
tanh: ['NamedOp',0], |
|
|
|
vcenter: ['HandleAtom','vcenter'], |
|
overline: ['HandleAtom','overline'], |
|
underline: ['HandleAtom','underline'], |
|
over: 'HandleOver', |
|
overwithdelims: 'HandleOver', |
|
atop: 'HandleOver', |
|
atopwithdelims: 'HandleOver', |
|
above: 'HandleOver', |
|
abovewithdelims: 'HandleOver', |
|
brace: ['HandleOver','\\{','\\}'], |
|
brack: ['HandleOver','[',']'], |
|
choose: ['HandleOver','(',')'], |
|
|
|
overbrace: ['HandleLeaders','downbrace',1], |
|
underbrace: ['HandleLeaders','upbrace',1,1], |
|
overrightarrow: ['HandleLeaders','rightarrow'], |
|
overleftarrow: ['HandleLeaders','leftarrow'], |
|
|
|
llap: 'HandleLap', |
|
rlap: 'HandleLap', |
|
ulap: 'HandleLap', |
|
dlap: 'HandleLap', |
|
raise: 'RaiseLower', |
|
lower: 'RaiseLower', |
|
moveleft: 'MoveLeftRight', |
|
moveright: 'MoveLeftRight', |
|
|
|
frac: 'Frac', |
|
root: 'Root', |
|
sqrt: 'Sqrt', |
|
|
|
// TeX substitution macros |
|
hbar: ['Macro','\\hbarchar\\kern-.5em h'], |
|
ne: ['Macro','\\not='], |
|
neq: ['Macro','\\not='], |
|
notin: ['Macro','\\mathrel{\\rlap{\\kern2mu/}}\\in'], |
|
cong: ['Macro','\\mathrel{\\lower2mu{\\mathrel{{\\rlap{=}\\raise6mu\\sim}}}}'], |
|
bmod: ['Macro','\\mathbin{\\rm mod}'], |
|
pmod: ['Macro','\\kern 18mu ({\\rm mod}\\,\\,#1)',1], |
|
'int': ['Macro','\\intop\\nolimits'], |
|
oint: ['Macro','\\ointop\\nolimits'], |
|
doteq: ['Macro','\\buildrel\\textstyle.\\over='], |
|
ldots: ['Macro','\\mathinner{\\ldotp\\ldotp\\ldotp}'], |
|
cdots: ['Macro','\\mathinner{\\cdotp\\cdotp\\cdotp}'], |
|
vdots: ['Macro','\\mathinner{\\rlap{\\raise8pt{\\rule 0pt 6pt 0pt .}}\\rlap{\\raise4pt{.}}.}'], |
|
ddots: ['Macro','\\mathinner{\\kern1mu\\raise7pt{\\rule 0pt 7pt 0pt .}\\kern2mu\\raise4pt{.}\\kern2mu\\raise1pt{.}\\kern1mu}'], |
|
joinrel: ['Macro','\\mathrel{\\kern-4mu}'], |
|
relbar: ['Macro','\\mathrel{\\smash-}'], // \smash, because - has the same height as + |
|
Relbar: ['Macro','\\mathrel='], |
|
bowtie: ['Macro','\\mathrel\\triangleright\\joinrel\\mathrel\\triangleleft'], |
|
models: ['Macro','\\mathrel|\\joinrel='], |
|
mapsto: ['Macro','\\mapstochar\\rightarrow'], |
|
rightleftharpoons: ['Macro','\\vcenter{\\mathrel{\\rlap{\\raise3mu{\\rightharpoonup}}}\\leftharpoondown}'], |
|
hookrightarrow: ['Macro','\\lhook\\joinrel\\rightarrow'], |
|
hookleftarrow: ['Macro','\\leftarrow\\joinrel\\rhook'], |
|
Longrightarrow: ['Macro','\\Relbar\\joinrel\\Rightarrow'], |
|
longrightarrow: ['Macro','\\relbar\\joinrel\\rightarrow'], |
|
longleftarrow: ['Macro','\\leftarrow\\joinrel\\relbar'], |
|
Longleftarrow: ['Macro','\\Leftarrow\\joinrel\\Relbar'], |
|
longmapsto: ['Macro','\\mapstochar\\char{cmsy10}{0}\\joinrel\\rightarrow'], |
|
longleftrightarrow: ['Macro','\\leftarrow\\joinrel\\rightarrow'], |
|
Longleftrightarrow: ['Macro','\\Leftarrow\\joinrel\\Rightarrow'], |
|
iff: ['Macro','\\;\\Longleftrightarrow\\;'], |
|
mathrm: ['Macro','{\\rm #1}',1], |
|
mathbf: ['Macro','{\\bf #1}',1], |
|
mathbb: ['Macro','{\\bf #1}',1], |
|
mathit: ['Macro','{\\it #1}',1], |
|
|
|
TeX: ['Macro','T\\kern-.1667em\\lower.5ex{E}\\kern-.125em X'], |
|
|
|
limits: ['Limits',1], |
|
nolimits: ['Limits',0], |
|
|
|
',': ['Spacer',1/6], |
|
':': ['Spacer',1/6], // for LaTeX |
|
'>': ['Spacer',2/9], |
|
';': ['Spacer',5/18], |
|
'!': ['Spacer',-1/6], |
|
enspace: ['Spacer',1/2], |
|
quad: ['Spacer',1], |
|
qquad: ['Spacer',2], |
|
thinspace: ['Spacer',1/6], |
|
negthinspace: ['Spacer',-1/6], |
|
|
|
hskip: 'Hskip', |
|
kern: 'Hskip', |
|
rule: ['Rule','black'], |
|
space: ['Rule','blank'], |
|
|
|
big: ['MakeBig','ord',0.85], |
|
Big: ['MakeBig','ord',1.15], |
|
bigg: ['MakeBig','ord',1.45], |
|
Bigg: ['MakeBig','ord',1.75], |
|
bigl: ['MakeBig','open',0.85], |
|
Bigl: ['MakeBig','open',1.15], |
|
biggl: ['MakeBig','open',1.45], |
|
Biggl: ['MakeBig','open',1.75], |
|
bigr: ['MakeBig','close',0.85], |
|
Bigr: ['MakeBig','close',1.15], |
|
biggr: ['MakeBig','close',1.45], |
|
Biggr: ['MakeBig','close',1.75], |
|
bigm: ['MakeBig','rel',0.85], |
|
Bigm: ['MakeBig','rel',1.15], |
|
biggm: ['MakeBig','rel',1.45], |
|
Biggm: ['MakeBig','rel',1.75], |
|
|
|
mathord: ['HandleAtom','ord'], |
|
mathop: ['HandleAtom','op'], |
|
mathopen: ['HandleAtom','open'], |
|
mathclose: ['HandleAtom','close'], |
|
mathbin: ['HandleAtom','bin'], |
|
mathrel: ['HandleAtom','rel'], |
|
mathpunct: ['HandleAtom','punct'], |
|
mathinner: ['HandleAtom','inner'], |
|
|
|
mathchoice: 'MathChoice', |
|
buildrel: 'BuildRel', |
|
|
|
hbox: 'HBox', |
|
text: 'HBox', |
|
mbox: 'HBox', |
|
fbox: 'FBox', |
|
|
|
strut: 'Strut', |
|
mathstrut: ['Macro','\\vphantom{(}'], |
|
phantom: ['Phantom',1,1], |
|
vphantom: ['Phantom',1,0], |
|
hphantom: ['Phantom',0,1], |
|
smash: 'Smash', |
|
|
|
acute: ['MathAccent', 0x7013], |
|
grave: ['MathAccent', 0x7012], |
|
ddot: ['MathAccent', 0x707F], |
|
tilde: ['MathAccent', 0x707E], |
|
bar: ['MathAccent', 0x7016], |
|
breve: ['MathAccent', 0x7015], |
|
check: ['MathAccent', 0x7014], |
|
hat: ['MathAccent', 0x705E], |
|
vec: ['MathAccent', 0x017E], |
|
dot: ['MathAccent', 0x705F], |
|
widetilde: ['MathAccent', 0x0365], |
|
widehat: ['MathAccent', 0x0362], |
|
|
|
'_': ['Replace','ord','_','normal',-.4,.1], |
|
' ': ['Replace','ord',' ','normal'], |
|
angle: ['Replace','ord','∠','normal'], |
|
|
|
matrix: 'Matrix', |
|
array: 'Matrix', // ### still need to do alignment options ### |
|
pmatrix: ['Matrix','(',')','c'], |
|
cases: ['Matrix','\\{','.',['l','l']], |
|
cr: 'HandleRow', |
|
'\\': 'HandleRow', |
|
|
|
// LaTeX |
|
begin: 'Begin', |
|
end: 'End', |
|
tiny: ['HandleSize',0], |
|
Tiny: ['HandleSize',1], // non-standard |
|
scriptsize: ['HandleSize',2], |
|
small: ['HandleSize',3], |
|
normalsize: ['HandleSize',4], |
|
large: ['HandleSize',5], |
|
Large: ['HandleSize',6], |
|
LARGE: ['HandleSize',7], |
|
huge: ['HandleSize',8], |
|
Huge: ['HandleSize',9], |
|
dots: ['Macro','\\ldots'], |
|
|
|
// Extensions to TeX |
|
color: 'Color', |
|
href: 'Href', |
|
'class': 'Class', |
|
style: 'Style', |
|
unicode: 'Unicode', |
|
|
|
// debugging and test routines |
|
'char': 'Char', |
|
test: 'Test' |
|
}, |
|
|
|
/* |
|
* LaTeX environments |
|
*/ |
|
environments: { |
|
array: 'Array', |
|
matrix: ['Array',null,null,'c'], |
|
pmatrix: ['Array','(',')','c'], |
|
bmatrix: ['Array','[',']','c'], |
|
Bmatrix: ['Array','\\{','\\}','c'], |
|
vmatrix: ['Array','\\vert','\\vert','c'], |
|
Vmatrix: ['Array','\\Vert','\\Vert','c'], |
|
cases: ['Array','\\{','.','ll'], |
|
eqnarray: ['Array',null,null,'rcl',[5/18,5/18]] |
|
}, |
|
|
|
/* |
|
* The horizontally stretchable delimiters |
|
*/ |
|
leaders: { |
|
downbrace: {left: 0x37A, lmid: 0x37D, rmid: 0x37C, right: 0x37B}, |
|
upbrace: {left: 0x37C, lmid: 0x37B, rmid: 0x37A, right: 0x37D}, |
|
leftarrow: {left: 0x220, rep: 0x200}, |
|
rightarrow: {rep: 0x200, right: 0x221} |
|
}, |
|
|
|
|
|
/***************************************************************************/ |
|
|
|
/* |
|
* Add special characters to list above. (This makes it possible |
|
* to define them in a variable that the user can change.) |
|
*/ |
|
AddSpecial: function (obj) { |
|
for (var id in obj) { |
|
jsMath.Parser.prototype.special[jsMath.Parser.prototype[id]] = obj[id]; |
|
} |
|
}, |
|
|
|
/* |
|
* Throw an error |
|
*/ |
|
Error: function (s) { |
|
this.i = this.string.length; |
|
if (s.error) {this.error = s.error} else { |
|
if (!this.error) {this.error = s} |
|
} |
|
}, |
|
|
|
/***************************************************************************/ |
|
|
|
/* |
|
* Check if the next character is a space |
|
*/ |
|
nextIsSpace: function () { |
|
return this.string.charAt(this.i) == ' '; |
|
}, |
|
|
|
/* |
|
* Parse a substring to get its mList, and return it. |
|
* Check that no errors occured |
|
*/ |
|
Process: function (arg) { |
|
var data = this.mlist.data; |
|
arg = jsMath.Parse(arg,data.font,data.size,data.style); |
|
if (arg.error) {this.Error(arg); return} |
|
if (arg.mlist.Length() == 0) {return null} |
|
if (arg.mlist.Length() == 1) { |
|
var atom = arg.mlist.Last(); |
|
if (atom.atom && atom.type == 'ord' && atom.nuc && |
|
!atom.sub && !atom.sup && (atom.nuc.type == 'text' || atom.nuc.type == 'TeX')) |
|
{return atom.nuc} |
|
} |
|
return {type: 'mlist', mlist: arg.mlist}; |
|
}, |
|
|
|
/* |
|
* Get and return a control-sequence name from the TeX string |
|
*/ |
|
GetCommand: function () { |
|
var letter = /^([a-z]+|.) ?/i; |
|
var cmd = letter.exec(this.string.slice(this.i)); |
|
if (cmd) {this.i += cmd[1].length; return cmd[1]} |
|
this.Error("Missing control sequnece name at end of string or argument"); return |
|
}, |
|
|
|
/* |
|
* Get and return a TeX argument (either a single character or control sequence, |
|
* or the contents of the next set of braces). |
|
*/ |
|
GetArgument: function (name,noneOK) { |
|
while (this.nextIsSpace()) {this.i++} |
|
if (this.i >= this.string.length) {if (!noneOK) this.Error("Missing argument for "+name); return} |
|
if (this.string.charAt(this.i) == this.close) {if (!noneOK) this.Error("Extra close brace"); return} |
|
if (this.string.charAt(this.i) == this.cmd) {this.i++; return this.cmd+this.GetCommand()} |
|
if (this.string.charAt(this.i) != this.open) {return this.string.charAt(this.i++)} |
|
var j = ++this.i; var pcount = 1; var c = ''; |
|
while (this.i < this.string.length) { |
|
c = this.string.charAt(this.i++); |
|
if (c == this.cmd) {this.i++} |
|
else if (c == this.open) {pcount++} |
|
else if (c == this.close) { |
|
if (pcount == 0) {this.Error("Extra close brace"); return} |
|
if (--pcount == 0) {return this.string.slice(j,this.i-1)} |
|
} |
|
} |
|
this.Error("Missing close brace"); |
|
}, |
|
|
|
/* |
|
* Get an argument and process it into an mList |
|
*/ |
|
ProcessArg: function (name) { |
|
var arg = this.GetArgument(name); if (this.error) return; |
|
return this.Process(arg); |
|
}, |
|
|
|
/* |
|
* Get the name of a delimiter (check it in the delimiter list). |
|
*/ |
|
GetDelimiter: function (name) { |
|
while (this.nextIsSpace()) {this.i++} |
|
var c = this.string.charAt(this.i); |
|
if (this.i < this.string.length) { |
|
this.i++; |
|
if (c == this.cmd) {c = '\\'+this.GetCommand(name); if (this.error) return} |
|
if (this.delimiter[c] != null) {return this.delimiter[c]} |
|
} |
|
this.Error("Missing or unrecognized delimiter for "+name); |
|
}, |
|
|
|
/* |
|
* Get a dimension (including its units). |
|
* Convert the dimen to em's, except for mu's, which must be |
|
* converted when typeset. |
|
*/ |
|
GetDimen: function (name,nomu) { |
|
var rest = this.string.slice(this.i); |
|
var match = rest.match(/^\s*([-+]?(\.\d+|\d+(\.\d*)?))(pt|em|ex|mu|px)/); |
|
if (!match) {this.Error("Missing dimension or its units for "+name); return} |
|
this.i += match[0].length; |
|
if (this.nextIsSpace()) {this.i++} |
|
var d = match[1]-0; |
|
if (match[4] == 'px') {d /= jsMath.em} |
|
else if (match[4] == 'pt') {d /= 10} |
|
else if (match[4] == 'ex') {d *= jsMath.TeX.x_height} |
|
else if (match[4] == 'mu') {if (nomu) {d = d/18} else {d = [d,'mu']}} |
|
return d; |
|
}, |
|
|
|
/* |
|
* Get the next non-space character |
|
*/ |
|
GetNext: function () { |
|
while (this.nextIsSpace()) {this.i++} |
|
return this.string.charAt(this.i); |
|
}, |
|
|
|
/* |
|
* Get an optional LaTeX argument in brackets |
|
*/ |
|
GetBrackets: function (name) { |
|
var c = this.GetNext(); if (c != '[') return ''; |
|
var start = ++this.i; var pcount = 0; |
|
while (this.i < this.string.length) { |
|
var c = this.string.charAt(this.i++); |
|
if (c == '{') {pcount++} |
|
else if (c == '}') { |
|
if (pcount == 0) |
|
{this.Error("Extra close brace while looking for ']'"); return} |
|
pcount --; |
|
} else if (c == this.cmd) { |
|
this.i++; |
|
} else if (c == ']') { |
|
if (pcount == 0) {return this.string.slice(start,this.i-1)} |
|
} |
|
} |
|
this.Error("Couldn't find closing ']' for argument to "+this.cmd+name); |
|
}, |
|
|
|
/* |
|
* Get everything up to the given control sequence name (token) |
|
*/ |
|
GetUpto: function (name,token) { |
|
while (this.nextIsSpace()) {this.i++} |
|
var start = this.i; var pcount = 0; |
|
while (this.i < this.string.length) { |
|
var c = this.string.charAt(this.i++); |
|
if (c == '{') {pcount++} |
|
else if (c == '}') { |
|
if (pcount == 0) |
|
{this.Error("Extra close brace while looking for "+this.cmd+token); return} |
|
pcount --; |
|
} else if (c == this.cmd) { |
|
// really need separate counter for begin/end |
|
// and it should really be a stack (new pcount for each begin) |
|
if (this.string.slice(this.i,this.i+5) == "begin") {pcount++; this.i+=4} |
|
else if (this.string.slice(this.i,this.i+3) == "end") { |
|
if (pcount > 0) {pcount--; this.i += 2} |
|
} |
|
if (pcount == 0) { |
|
if (this.string.slice(this.i,this.i+token.length) == token) { |
|
c = this.string.charAt(this.i+token.length); |
|
if (c.match(/[^a-z]/i) || !token.match(/[a-z]/i)) { |
|
var arg = this.string.slice(start,this.i-1); |
|
this.i += token.length; |
|
return arg; |
|
} |
|
} |
|
} |
|
this.i++; |
|
} |
|
} |
|
this.Error("Couldn't find "+this.cmd+token+" for "+name); |
|
}, |
|
|
|
/* |
|
* Get a parameter delimited by a control sequence, and |
|
* process it to get its mlist |
|
*/ |
|
ProcessUpto: function (name,token) { |
|
var arg = this.GetUpto(name,token); if (this.error) return; |
|
return this.Process(arg); |
|
}, |
|
|
|
/* |
|
* Get everything up to \end{env} |
|
*/ |
|
GetEnd: function (env) { |
|
var body = ''; var name = ''; |
|
while (name != env) { |
|
body += this.GetUpto('begin{'+env+'}','end'); if (this.error) return; |
|
name = this.GetArgument(this.cmd+'end'); if (this.error) return; |
|
} |
|
return body; |
|
}, |
|
|
|
|
|
/***************************************************************************/ |
|
|
|
|
|
/* |
|
* Ignore spaces |
|
*/ |
|
Space: function () {}, |
|
|
|
/* |
|
* Collect together any primes and convert them to a superscript |
|
*/ |
|
Prime: function (c) { |
|
var base = this.mlist.Last(); |
|
if (base == null || (!base.atom && base.type != 'box' && base.type != 'frac')) |
|
{base = this.mlist.Add(jsMath.mItem.Atom('ord',null))} |
|
if (base.sup) {this.Error("Prime causes double exponent: use braces to clarify"); return} |
|
var sup = ''; |
|
while (c == "'") {sup += '\\prime'; c = this.GetNext(); if (c == "'") {this.i++}} |
|
base.sup = this.Process(sup); |
|
}, |
|
|
|
/* |
|
* Raise or lower its parameter by a given amount |
|
* @@@ Note that this is different from TeX, which requires an \hbox @@@ |
|
* ### make this work with mu's ### |
|
*/ |
|
RaiseLower: function (name) { |
|
var h = this.GetDimen(this.cmd+name,1); if (this.error) return; |
|
var box = this.ProcessArg(this.cmd+name); if (this.error) return; |
|
if (name == 'lower') {h = -h} |
|
this.mlist.Add(new jsMath.mItem('raise',{nuc: box, raise: h})); |
|
}, |
|
|
|
/* |
|
* Shift an expression to the right or left |
|
* @@@ Note that this is different from TeX, which requires a \vbox @@@ |
|
* ### make this work with mu's ### |
|
*/ |
|
MoveLeftRight: function (name) { |
|
var x = this.GetDimen(this.cmd+name,1); if (this.error) return; |
|
var box = this.ProcessArg(this.cmd+name); if (this.error) return; |
|
if (name == 'moveleft') {x = -x} |
|
this.mlist.Add(jsMath.mItem.Space(x)); |
|
this.mlist.Add(jsMath.mItem.Atom('ord',box)); |
|
this.mlist.Add(jsMath.mItem.Space(-x)); |
|
}, |
|
|
|
/* |
|
* Show the argument in a particular color |
|
* ### doesn't affect horizontal rules; can we fix that? ### |
|
*/ |
|
Color: function (name) { |
|
var color = this.GetArgument(this.cmd+name); if (this.error) return; |
|
// check that it looks like a color? |
|
this.AddHTML(name,['<SPAN STYLE="color: '+color+'">','</SPAN>']); |
|
}, |
|
|
|
/* |
|
* Make the argument be a link |
|
*/ |
|
Href: function (name) { |
|
var href = this.GetArgument(this.cmd+name); if (this.error) return; |
|
this.AddHTML(name,['<A CLASS="mathlink" HREF="'+href+'">','</A>']); |
|
}, |
|
|
|
/* |
|
* Apply a CSS class to the argument |
|
*/ |
|
Class: function (name) { |
|
var clss = this.GetArgument(this.cmd+name); if (this.error) return; |
|
this.AddHTML(name,['<SPAN CLASS="'+clss+'">','</SPAN>']); |
|
}, |
|
|
|
/* |
|
* Apply a CSS style to the argument |
|
*/ |
|
Style: function (name) { |
|
var style = this.GetArgument(this.cmd+name); if (this.error) return; |
|
this.AddHTML(name,['<SPAN STYLE="'+style+'">','</SPAN>']); |
|
}, |
|
|
|
/* |
|
* Insert some raw HTML around the argument (this will not affect |
|
* the spacing or other TeX features) |
|
*/ |
|
AddHTML: function (name,params) { |
|
var data = this.mlist.data; |
|
var arg = this.GetArgument(this.cmd+name); if (this.error) return; |
|
arg = jsMath.Parse(arg,data.font,data.size,data.style); |
|
if (arg.error) {this.Error(arg); return} |
|
this.mlist.Add(jsMath.mItem.HTML(params[0])); |
|
for (var i = 0; i < arg.mlist.Length(); i++) {this.mlist.Add(arg.mlist.Get(i))} |
|
this.mlist.Add(jsMath.mItem.HTML(params[1])); |
|
}, |
|
|
|
/* |
|
* Insert a unicode reference as an Ord atom. Its argument should |
|
* be the unicode code point, e.g. \unicode{8211}, or \unicode{x203F}. |
|
* You can also specify the height and depth in ems, e.g., |
|
* \unicode{8211,.6,-.3} |
|
*/ |
|
Unicode: function (name) { |
|
var arg = this.GetArgument(this.cmd+name); if (this.error) return; |
|
arg = arg.split(','); arg[0] = '&#'+arg[0]+';'; |
|
if (!arg[1]) {arg[1] = 'normal'} |
|
this.mlist.Add(jsMath.mItem.TextAtom('ord',arg[0],arg[1],arg[2],arg[3])); |
|
}, |
|
|
|
/* |
|
* Implements \frac{num}{den} |
|
*/ |
|
Frac: function (name) { |
|
var num = this.ProcessArg(this.cmd+name); if (this.error) return; |
|
var den = this.ProcessArg(this.cmd+name); if (this.error) return; |
|
this.mlist.Add(jsMath.mItem.Fraction('over',num,den)); |
|
}, |
|
|
|
/* |
|
* Implements \sqrt[n]{...} |
|
*/ |
|
Sqrt: function (name) { |
|
var n = this.GetBrackets(this.cmd+name); if (this.error) return; |
|
var arg = this.ProcessArg(this.cmd+name); if (this.error) return; |
|
box = jsMath.mItem.Atom('radical',arg); |
|
if (this.n != '') {box.root = this.Process(n); if (this.error) return} |
|
this.mlist.Add(box); |
|
}, |
|
|
|
/* |
|
* Implements \root...\of{...} |
|
*/ |
|
Root: function (name) { |
|
var n = this.ProcessUpto(this.cmd+name,'of'); if (this.error) return; |
|
var arg = this.ProcessArg(this.cmd+name); if (this.error) return; |
|
box = jsMath.mItem.Atom('radical',arg); |
|
box.root = n; this.mlist.Add(box); |
|
}, |
|
|
|
|
|
/* |
|
* Implements \mathchoice{}{}{}{} |
|
*/ |
|
MathChoice: function (name) { |
|
var D = this.ProcessArg(this.cmd+name); if (this.error) return; |
|
var T = this.ProcessArg(this.cmd+name); if (this.error) return; |
|
var S = this.ProcessArg(this.cmd+name); if (this.error) return; |
|
var SS = this.ProcessArg(this.cmd+name); if (this.error) return; |
|
var box = new jsMath.mItem('choice',{D: D, T: T, S: S, SS: SS}); |
|
this.mlist.Add(new jsMath.mItem('choice',{D: D, T: T, S: S, SS: SS})); |
|
}, |
|
|
|
/* |
|
* Implements \buildrel...\over{...} |
|
*/ |
|
BuildRel: function (name) { |
|
var top = this.ProcessUpto(this.cmd+name,'over'); if (this.error) return; |
|
var bot = this.ProcessArg(this.cmd+name); if (this.error) return; |
|
var op = jsMath.mItem.Atom('op',bot); |
|
op.limits = 1; op.sup = top; |
|
this.mlist.Add(op); |
|
}, |
|
|
|
/* |
|
* Create a delimiter of the type and size specified in the parameters |
|
*/ |
|
MakeBig: function (name,data) { |
|
var type = data[0]; var h = data[1] * jsMath.p_height; |
|
var delim = this.GetDelimiter(this.cmd+name); if (this.error) return; |
|
this.mlist.Add(jsMath.mItem.Atom(type,jsMath.Box.Delimiter(h,delim,'T'))); |
|
}, |
|
|
|
/* |
|
* Insert the specified character in the given font. |
|
*/ |
|
Char: function (name) { |
|
var font = this.GetArgument(this.cmd+name); if (this.error) return; |
|
var n = this.GetArgument(this.cmd+name); if (this.error) return; |
|
this.mlist.Add(jsMath.mItem.Typeset(jsMath.Box.TeX(n-0,font,'T',this.mlist.data.size))); |
|
return; |
|
}, |
|
|
|
/* |
|
* Create an array or matrix. |
|
*/ |
|
Matrix: function (name,delim) { |
|
var data = this.mlist.data; |
|
var arg = this.GetArgument(this.cmd+name); if (this.error) return; |
|
var parse = new jsMath.Parser(arg+'\\\\',null,data.size); |
|
parse.matrix = name; parse.row = []; parse.table = []; |
|
parse.Parse(); if (parse.error) {this.Error(parse); return} |
|
parse.HandleRow(name,1); // be sure the last row is recorded |
|
var box = jsMath.Box.Layout(data.size,parse.table,delim[2]); |
|
// Add parentheses, if needed |
|
if (delim[0] && delim[1]) { |
|
var left = jsMath.Box.Delimiter(box.h+box.d,this.delimiter[delim[0]],'T'); |
|
var right = jsMath.Box.Delimiter(box.h+box.d,this.delimiter[delim[1]],'T'); |
|
box = jsMath.Box.SetList([left,box,right],data.style,data.size); |
|
} |
|
this.mlist.Add(jsMath.mItem.Atom((delim[0]? 'inner': 'ord'),box)); |
|
}, |
|
|
|
/* |
|
* When we see an '&', try to add a matrix entry to the row data. |
|
* (Use all the data in the current mList, and then clear it) |
|
*/ |
|
HandleEntry: function (name) { |
|
if (!this.matrix) |
|
{this.Error(name+" can only appear in a matrix or array"); return} |
|
if (this.mlist.data.openI != null) { |
|
var open = this.mlist.Get(this.mlist.data.openI); |
|
if (open.left) {this.Error("Missing "+this.cmd+"right")} |
|
else {this.Error("Missing close brace")} |
|
} |
|
if (this.mlist.data.overI != null) {this.mlist.Over()} |
|
var data = this.mlist.data; |
|
this.mlist.Atomize('T',data.size); var box = this.mlist.Typeset('T',data.size); |
|
this.row[this.row.length] = box; |
|
this.mlist = new jsMath.mList(null,null,data.size); |
|
}, |
|
|
|
/* |
|
* When we see a \cr or \\, try to add a row to the table |
|
*/ |
|
HandleRow: function (name,last) { |
|
if (!this.matrix) |
|
{this.Error(this.cmd+name+" can only appear in a matrix or array"); return} |
|
this.HandleEntry(name); |
|
if (!last || this.row.length > 1 || this.row[0].format != 'null') |
|
{this.table[this.table.length] = this.row} |
|
this.row = []; |
|
}, |
|
|
|
/* |
|
* LaTeX array environment |
|
*/ |
|
Array: function (name,delim) { |
|
var columns = delim[2]; var cspacing = delim[3]; |
|
if (!columns) { |
|
columns = this.GetArgument(this.cmd+'begin{'+name+'}'); |
|
if (this.error) return; |
|
} |
|
columns = columns.replace(/[^clr]/g,''); |
|
columns = columns.split(''); |
|
var data = this.mlist.data; |
|
var arg = this.GetEnd(name); if (this.error) return; |
|
var parse = new jsMath.Parser(arg+'\\\\',null,data.size); |
|
parse.matrix = name; parse.row = []; parse.table = []; |
|
parse.Parse(); if (parse.error) {this.Error(parse); return} |
|
parse.HandleRow(name,1); // be sure the last row is recorded |
|
var box = jsMath.Box.Layout(data.size,parse.table,columns,cspacing); |
|
// Add parentheses, if needed |
|
if (delim[0] && delim[1]) { |
|
var left = jsMath.Box.Delimiter(box.h+box.d,this.delimiter[delim[0]],'T'); |
|
var right = jsMath.Box.Delimiter(box.h+box.d,this.delimiter[delim[1]],'T'); |
|
box = jsMath.Box.SetList([left,box,right],data.style,data.size); |
|
} |
|
this.mlist.Add(jsMath.mItem.Atom((delim[0]? 'inner': 'ord'),box)); |
|
}, |
|
|
|
/* |
|
* LaTeX \begin{env} |
|
*/ |
|
Begin: function (name) { |
|
var env = this.GetArgument(this.cmd+name); if (this.error) return; |
|
if (env.match(/[^a-z*]/i)) {this.Error('Invalid environment name "'+env+'"'); return} |
|
if (!this.environments[env]) {this.Error('Unknown environment "'+env+'"'); return} |
|
var cmd = this.environments[env]; |
|
if (typeof(cmd) == "string") {cmd = [cmd]} |
|
this[cmd[0]](env,cmd.slice(1)); |
|
}, |
|
|
|
/* |
|
* LaTeX \end{env} |
|
*/ |
|
End: function (name) { |
|
var env = this.GetArgument(this.cmd+name); if (this.error) return; |
|
this.Error(this.cmd+name+'{'+env+'} without matching '+this.cmd+'begin'); |
|
}, |
|
|
|
/* |
|
* Debugging routine to test stretchable delimiters |
|
*/ |
|
Test: function () { |
|
var delim = this.GetDelimiter(this.cmd+'test'); if (this.error) return; |
|
var H = this.GetArgument(this.cmd+'test'); if (this.error) return; |
|
this.mlist.Add(jsMath.mItem.Typeset(jsMath.Box.Delimiter(H,delim,'T'))); |
|
return; |
|
|
|
var leader = this.GetArgument(this.cmd+'test'); if (this.error) return; |
|
var W = this.GetArgument(this.cmd+'test'); if (this.error) return; |
|
if (this.leaders[leader] == null) |
|
{this.Error('Unknown leaders "'+leader+'"'); return} |
|
this.mlist.Add(jsMath.mItem.Typeset(jsMath.Box.Leaders(W,this.leaders[leader]))); |
|
return; |
|
}, |
|
|
|
/* |
|
* Add a fixed amount of horizontal space |
|
*/ |
|
Spacer: function (name,w) { |
|
this.mlist.Add(jsMath.mItem.Space(w-0)); |
|
}, |
|
|
|
/* |
|
* Add horizontal space given by the argument |
|
*/ |
|
Hskip: function (name) { |
|
var w = this.GetDimen(this.cmd+name); if (this.error) return; |
|
this.mlist.Add(jsMath.mItem.Space(w)); |
|
}, |
|
|
|
/* |
|
* Typeset the argument as plain text rather than math. |
|
*/ |
|
HBox: function (name) { |
|
var text = this.GetArgument(this.cmd+name); if (this.error) return; |
|
var box = jsMath.Box.InternalMath(text,this.mlist.data.size); |
|
this.mlist.Add(jsMath.mItem.Typeset(box)); |
|
}, |
|
|
|
/* |
|
* Implement \fbox{...} |
|
*/ |
|
FBox: function (name) { |
|
var text = this.GetArgument(this.cmd+name); if (this.error) return; |
|
var arg = jsMath.Box.InternalMath(text,this.mlist.data.size); |
|
var f = 0.25 * jsMath.sizes[this.mlist.data.size]/100; |
|
var box = jsMath.Box.Set(arg,this.mlist.data.style,this.mlist.data.size,1).Remeasured(); |
|
var frame = jsMath.HTML.Frame(-f,-box.d-f,box.w+2*f,box.h+box.d+2*f); |
|
box.html = frame + box.html + jsMath.HTML.Spacer(f); |
|
box.h += f; box.d += f; box.w +=2*f; box.x += f; |
|
box.bh = Math.max(box.bh,box.h); box.bd = Math.max(box.bd,box.d); |
|
this.mlist.Add(jsMath.mItem.Atom('ord',box)); |
|
}, |
|
|
|
/* |
|
* Insert a rule of a particular width, height and depth |
|
* This replaces \hrule and \vrule |
|
* @@@ not a standard TeX command, and all three parameters must be given @@@ |
|
*/ |
|
Rule: function (name,gif) { |
|
var w = this.GetDimen(this.cmd+name,1); if (this.error) return; |
|
var h = this.GetDimen(this.cmd+name,1); if (this.error) return; |
|
var d = this.GetDimen(this.cmd+name,1); if (this.error) return; |
|
h += d; |
|
if (h != 0) {h = Math.max(1.05/jsMath.em,h)} |
|
if (h == 0 || w == 0) {gif = "blank"} |
|
var html = '<IMG SRC="'+jsMath[gif]+'" STYLE="height: '+jsMath.HTML.Em(h)+'; ' |
|
+ 'width: '+jsMath.HTML.Em(w)+'">'; |
|
if (d) { |
|
html = '<SPAN STYLE="vertical-align:'+jsMath.HTML.Em(-d)+'">' |
|
+ html + '</SPAN>'; |
|
} |
|
this.mlist.Add(jsMath.mItem.Typeset(new jsMath.Box('html',html,w,h-d,d))); |
|
}, |
|
|
|
/* |
|
* Inserts an empty box of a specific height and depth |
|
*/ |
|
Strut: function () { |
|
var size = this.mlist.data.size; |
|
var box = jsMath.Box.Text('','normal','T',size).Styled(); |
|
box.bh = box.bd = 0; box.h = .8; box.d = .3; box.w = 0; |
|
this.mlist.Add(jsMath.mItem.Typeset(box)); |
|
}, |
|
|
|
/* |
|
* Handles \phantom, \vphantom and \hphantom |
|
*/ |
|
Phantom: function (name,data) { |
|
var arg = this.ProcessArg(this.cmd+name); if (this.error) return; |
|
this.mlist.Add(new jsMath.mItem('phantom',{phantom: arg, v: data[0], h: data[1]})); |
|
}, |
|
|
|
/* |
|
* Implements \smash |
|
*/ |
|
Smash: function (name,data) { |
|
var arg = this.ProcessArg(this.cmd+name); if (this.error) return; |
|
this.mlist.Add(new jsMath.mItem('smash',{smash: arg})); |
|
}, |
|
|
|
/* |
|
* Puts an accent on the following argument |
|
*/ |
|
MathAccent: function (name,accent) { |
|
var c = this.ProcessArg(this.cmd+name); if (this.error) return; |
|
var atom = jsMath.mItem.Atom('accent',c); atom.accent = accent[0]; |
|
this.mlist.Add(atom); |
|
}, |
|
|
|
/* |
|
* Handles functions and operators like sin, cos, sum, etc. |
|
*/ |
|
NamedOp: function (name,data) { |
|
var a = (name.match(/[^acegm-su-z]/)) ? 1: 0; |
|
var d = (name.match(/[gjpqy]/)) ? 1: 0; |
|
if (data[1]) {name = data[1]} |
|
var box = jsMath.mItem.TextAtom('op',name,'cmr10',a,d); |
|
if (data[0] != null) {box.limits = data[0]} |
|
this.mlist.Add(box); |
|
}, |
|
|
|
/* |
|
* Implements \limits |
|
*/ |
|
Limits: function (name,data) { |
|
var atom = this.mlist.Last(); |
|
if (!atom || atom.type != 'op') |
|
{this.Error(this.cmd+name+" is allowed only on operators"); return} |
|
atom.limits = data[0]; |
|
}, |
|
|
|
/* |
|
* Implements macros like those created by \def. The named control |
|
* sequence is replaced by the string given as the first data value. |
|
* If there is a second data value, this specifies how many arguments |
|
* the macro uses, and in this case, those arguments are substituted |
|
* for #1, #2, etc. within the replacement string. |
|
* |
|
* See the jsMath.Macro() command below for more details. |
|
*/ |
|
Macro: function (name,data) { |
|
var text = data[0] |
|
if (data[1]) { |
|
var args = []; |
|
for (var i = 0; i < data[1]; i++) |
|
{args[args.length] = this.GetArgument(this.cmd+name); if (this.error) return} |
|
text = ''; var c; var i = 0; |
|
while (i < data[0].length) { |
|
c = data[0].charAt(i++); |
|
if (c == '\\') {text += c + data[0].charAt(i++)} |
|
else if (c == '#') { |
|
c = data[0].charAt(i++); |
|
if (c == "#") {text += c} else { |
|
if (!c.match(/[1-9]/) || c > args.length) |
|
{this.Error("Illegal macro argument reference"); return} |
|
text += args[c-1]; |
|
} |
|
} else {text += c} |
|
} |
|
} |
|
this.string = text + this.string.slice(this.i); |
|
this.i = 0; |
|
}, |
|
|
|
/* |
|
* Replace the control sequence with the given text |
|
*/ |
|
Replace: function (name,data) { |
|
this.mlist.Add(jsMath.mItem.TextAtom(data[0],data[1],data[2],data[3])); |
|
}, |
|
|
|
/* |
|
* Implements \overbrace, \underbrace, etc. |
|
*/ |
|
HandleLeaders: function (name,data) { |
|
var box = this.ProcessArg(this.cmd+name); if (this.error) return; |
|
box = jsMath.Box.Set(box,'D',this.mlist.data.size).Remeasured(); |
|
var leader = jsMath.Box.Leaders(box.w,this.leaders[data[0]]); |
|
if (data[2]) {leader.y = -leader.h - box.d} else {leader.y = box.h + leader.d} |
|
leader.x = -(leader.w + box.w)/2; |
|
box = jsMath.mItem.Atom(data[1]? 'op': 'inner', |
|
jsMath.Box.SetList([box,leader],'T',this.mlist.data.size)); |
|
box.limits = (data[1]? 1: 0); |
|
this.mlist.Add(box); |
|
}, |
|
|
|
/* |
|
* Implements \llap, \rlap, etc. |
|
*/ |
|
HandleLap: function (name) { |
|
var box = this.ProcessArg(); if (this.error) return; |
|
box = this.mlist.Add(new jsMath.mItem('lap',{nuc: box, lap: name})); |
|
}, |
|
|
|
/* |
|
* Adds the argument as a specific type of atom (for commands like |
|
* \overline, etc.) |
|
*/ |
|
HandleAtom: function (name,data) { |
|
var arg = this.ProcessArg(this.cmd+name); if (this.error) return; |
|
this.mlist.Add(jsMath.mItem.Atom(data,arg)); |
|
}, |
|
|
|
|
|
/* |
|
* Process the character associated with a specific \mathcharcode |
|
*/ |
|
HandleMathCode: function (name,code) { |
|
var type = (code & 0xF000) >> 12; |
|
var font = (code & 0x0F00) >> 8; |
|
var code = code & 0x00FF; |
|
this.HandleTeXchar(type,font,code); |
|
}, |
|
|
|
/* |
|
* Add a specific character from a TeX font (use the current |
|
* font if the type is 7 (variable) or the font is not specified) |
|
*/ |
|
HandleTeXchar: function (type,font,code) { |
|
if (type == 7 && this.mlist.data.font != null) {font = this.mlist.data.font} |
|
font = jsMath.TeX.fam[font]; |
|
this.mlist.Add(jsMath.mItem.TeXAtom(jsMath.TeX.atom[type],code,font)); |
|
}, |
|
|
|
/* |
|
* Add a TeX variable character or number |
|
*/ |
|
HandleVariable: function (c) {this.HandleTeXchar(7,1,c.charCodeAt(0))}, |
|
HandleNumber: function (c) {this.HandleTeXchar(7,0,c.charCodeAt(0))}, |
|
|
|
/* |
|
* For unmapped characters, just add them in as normal |
|
* (non-TeX) characters |
|
*/ |
|
HandleOther: function (c) { |
|
this.mlist.Add(jsMath.mItem.TextAtom('ord',c,'normal')); |
|
}, |
|
|
|
/* |
|
* Ignore comments in TeX data |
|
* ### Some browsers remove the newlines, so this might cause |
|
* extra stuff to be ignored; look into this ### |
|
*/ |
|
HandleComment: function () { |
|
var c; |
|
while (this.i < this.string.length) { |
|
c = this.string.charAt(this.i++); |
|
if (c == "\r" || c == "\n") return; |
|
} |
|
}, |
|
|
|
/* |
|
* Add a style change (e.g., \displaystyle, etc) |
|
*/ |
|
HandleStyle: function (name,style) { |
|
this.mlist.data.style = style[0]; |
|
this.mlist.Add(new jsMath.mItem('style',{style: style[0]})); |
|
}, |
|
|
|
/* |
|
* Implements \small, \large, etc. |
|
*/ |
|
HandleSize: function (name,size) { |
|
this.mlist.data.size = size[0]; |
|
this.mlist.Add(new jsMath.mItem('size',{size: size[0]})); |
|
}, |
|
|
|
/* |
|
* Set the current font (e.g., \rm, etc) |
|
*/ |
|
HandleFont: function (name,font) { |
|
this.mlist.data.font = font[0]; |
|
}, |
|
|
|
/* |
|
* Look for and process a control sequence |
|
*/ |
|
HandleCS: function () { |
|
var cmd = this.GetCommand(); if (this.error) return; |
|
if (this.macros[cmd]) { |
|
var macro = this.macros[cmd]; |
|
if (typeof(macro) == "string") {macro = [macro]} |
|
this[macro[0]](cmd,macro.slice(1)); return; |
|
} |
|
if (this.mathchardef[cmd]) { |
|
this.HandleMathCode(cmd,this.mathchardef[cmd]); |
|
return; |
|
} |
|
if (this.delimiter[this.cmd+cmd]) { |
|
this.HandleMathCode(cmd,this.delimiter[this.cmd+cmd]>>12) |
|
return; |
|
} |
|
this.Error("Unknown control sequence '"+this.cmd+cmd+"'"); |
|
}, |
|
|
|
/* |
|
* Process open and close braces |
|
*/ |
|
HandleOpen: function () {this.mlist.Open()}, |
|
HandleClose: function () { |
|
if (this.mlist.data.openI == null) {this.Error("Extra close brace"); return} |
|
var open = this.mlist.Get(this.mlist.data.openI); |
|
if (!open || open.left == null) {this.mlist.Close()} |
|
else {this.Error("Extra close brace or missing "+this.cmd+"right"); return} |
|
}, |
|
|
|
/* |
|
* Implements \left |
|
*/ |
|
HandleLeft: function (name) { |
|
var left = this.GetDelimiter(this.cmd+name); if (this.error) return; |
|
this.mlist.Open(left); |
|
}, |
|
|
|
/* |
|
* Implements \right |
|
*/ |
|
HandleRight: function (name) { |
|
var right = this.GetDelimiter(this.cmd+name); if (this.error) return; |
|
var open = this.mlist.Get(this.mlist.data.openI); |
|
if (open && open.left != null) {this.mlist.Close(right)} |
|
else {this.Error("Extra open brace or missing "+this.cmd+"left");} |
|
}, |
|
|
|
/* |
|
* Implements generalized fractions (\over, \above, etc.) |
|
*/ |
|
HandleOver: function (name,data) { |
|
if (this.mlist.data.overI != null) |
|
{this.Error('Ambiguous use of '+this.cmd+name); return} |
|
this.mlist.data.overI = this.mlist.Length(); |
|
this.mlist.data.overF = {name: name}; |
|
if (data.length > 0) { |
|
this.mlist.data.overF.left = this.delimiter[data[0]]; |
|
this.mlist.data.overF.right = this.delimiter[data[1]]; |
|
} else if (name.match(/withdelims$/)) { |
|
this.mlist.data.overF.left = this.GetDelimiter(this.cmd+name); if (this.error) return; |
|
this.mlist.data.overF.right = this.GetDelimiter(this.cmd+name); if (this.error) return; |
|
} |
|
if (name.match(/^above/)) |
|
{ |
|
this.mlist.data.overF.thickness = this.GetDimen(this.cmd.name,1); |
|
if (this.error) return; |
|
} |
|
}, |
|
|
|
/* |
|
* Add a superscript to the preceeding atom |
|
*/ |
|
HandleSuperscript: function () { |
|
var base = this.mlist.Last(); |
|
if (base == null || (!base.atom && base.type != 'box' && base.type != 'frac')) |
|
{base = this.mlist.Add(jsMath.mItem.Atom('ord',null))} |
|
if (base.sup) {this.Error("Double exponent: use braces to clarify"); return} |
|
base.sup = this.ProcessArg('superscript'); if (this.error) return; |
|
}, |
|
|
|
/* |
|
* Adda subscript to the preceeding atom |
|
*/ |
|
HandleSubscript: function () { |
|
var base = this.mlist.Last(); |
|
if (base == null || (!base.atom && base.type != 'box' && base.type != 'frac')) |
|
{base = this.mlist.Add(jsMath.mItem.Atom('ord',null))} |
|
if (base.sub) {this.Error("Double subscripts: use braces to clarify"); return} |
|
base.sub = this.ProcessArg('subscript'); if (this.error) return; |
|
}, |
|
|
|
/* |
|
* Parse a TeX math string, handling macros, etc. |
|
*/ |
|
Parse: function () { |
|
var c; |
|
while (this.i < this.string.length) { |
|
c = this.string.charAt(this.i++); |
|
if (this.mathchar[c]) {this.HandleMathCode(c,this.mathchar[c])} |
|
else if (this.special[c]) {this[this.special[c]](c)} |
|
else if (this.letter.test(c)) {this.HandleVariable(c)} |
|
else if (this.number.test(c)) {this.HandleNumber(c)} |
|
else {this.HandleOther(c)} |
|
} |
|
if (this.mlist.data.openI != null) { |
|
var open = this.mlist.Get(this.mlist.data.openI); |
|
if (open.left) {this.Error("Missing "+this.cmd+"right")} |
|
else {this.Error("Missing close brace")} |
|
} |
|
if (this.mlist.data.overI != null) {this.mlist.Over()} |
|
}, |
|
|
|
/* |
|
* Perform the processing of Appendix G |
|
*/ |
|
Atomize: function () { |
|
var data = this.mlist.init; |
|
if (!this.error) this.mlist.Atomize(data.style,data.size) |
|
}, |
|
|
|
/* |
|
* Produce the final HTML. |
|
* |
|
* We have to wrap the HTML it appropriate <SPAN> tags to hide its |
|
* actual dimensions when these don't match the TeX dimensions of the |
|
* results. We also include an image to force the results to take up |
|
* the right amount of space. The results may need to be vertically |
|
* adjusted to make the baseline appear in the correct place. |
|
* |
|
* This is where the touchiest browser-dependent code appears. |
|
*/ |
|
Typeset: function () { |
|
var data = this.mlist.init; |
|
var box = this.typeset = this.mlist.Typeset(data.style,data.size); |
|
if (this.error) {return '<SPAN CLASS="error">'+this.error+'</SPAN>'} |
|
if (box.format == 'null') {return ''}; |
|
var rules = ''; var html |
|
|
|
box.Styled().Remeasured(); var isSmall = 0; var isBig = 0; |
|
var w = box.w; var h = box.bh; var d = box.bd; |
|
if (box.bh > box.h && box.bh > jsMath.h+.001) {isSmall = 1} |
|
if (box.bd > box.d && box.bd > jsMath.d+.001) {isSmall = 1} |
|
if (box.h > jsMath.h) {isBig = 1; h = box.h} |
|
if (box.d > jsMath.d) {isBig = 1; d = box.d} |
|
|
|
if (jsMath.show.BBox) {rules += jsMath.HTML.Frame(0,-box.d,w,box.h+box.d,'green')} |
|
if (jsMath.show.Top) {rules += jsMath.HTML.Line(0,box.h,w,'red')} |
|
if (jsMath.show.Baseline) {rules += jsMath.HTML.Line(0,0,w,'blue')} |
|
|
|
html = box.html; |
|
if (isSmall) {// hide the extra size |
|
if (jsMath.allowAbsolute) { |
|
var y = jsMath.absoluteOffsetY; |
|
if (jsMath.absoluteHeightVaries || box.bh > jsMath.h+.001) {y += (jsMath.h - box.bh)} |
|
html = jsMath.HTML.Absolute(html,w,jsMath.h,0,y,jsMath.h); |
|
isBig = 1; h = box.h; d = box.d; |
|
} else {// remove line height and try to hide the depth |
|
var dy = jsMath.HTML.Em(Math.max(0,box.bd-jsMath.hd)/3); |
|
html = '<SPAN STYLE="line-height: 0;' |
|
+ ' position: relative; top: '+dy+'; vertical-align: '+dy |
|
+ '">' |
|
+ html |
|
+ '</SPAN>'; |
|
} |
|
} |
|
html = '<NOBR>' + rules + html; |
|
if (isBig) {// add height and depth to the line (force a little |
|
// extra to separate lines if needed) |
|
html += '<IMG SRC="'+jsMath.blank+'" CLASS="mathHD" ' |
|
+ 'STYLE="height: '+jsMath.HTML.Em(h+d+.2)+'; ' |
|
+ 'vertical-align: '+jsMath.HTML.Em(-d-.1)+';">' |
|
} |
|
html += '<NOBR>' |
|
return html; |
|
} |
|
|
|
}); |
|
|
|
/* |
|
* Make these characters special (and call the given routines) |
|
*/ |
|
jsMath.Parser.prototype.AddSpecial({ |
|
cmd: 'HandleCS', |
|
open: 'HandleOpen', |
|
close: 'HandleClose' |
|
}); |
|
|
|
|
|
/* |
|
* The web-page author can call jsMath.Macro to create additional |
|
* TeX macros for use within his or her mathematics. jsMath.Macro |
|
* has two required and one optional parameter. The first parameter |
|
* is the control sequence name that will trigger the macro, and the |
|
* second is the replacement string for that control sequence. |
|
* NOTE: since the backslash (\) has special meaning in JavaScript, |
|
* you must double the backslash in order to include control sequences |
|
* within your replacement string. E.g., |
|
* |
|
* <SCRIPT> jsMath.Macro('R','{\\rm R}') </SCRIPT> |
|
* |
* |
* would make \R produce a bold-faced R. |
* Licensed under the Apache License, Version 2.0 (the "License"); |
* |
* you may not use this file except in compliance with the License. |
* The optional parameter tells how many arguments the macro |
* You may obtain a copy of the License at |
* requires. These are substituted for #1, #2, etc. within the |
* |
* replacement string of the macro. For example |
* http://www.apache.org/licenses/LICENSE-2.0 |
* |
* |
* <SCRIPT> jsMath.Macro('x','{\vec x}_{#1}',1) </SCRIPT> |
* Unless required by applicable law or agreed to in writing, software |
* |
* distributed under the License is distributed on an "AS IS" BASIS, |
* would make \x1 produce {\vec x}_{1} and \x{i+1} produce {\vec x}_{i+1}. |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
* |
* See the License for the specific language governing permissions and |
* You can put several jsMath.Macro calls together into one .js file, and |
* limitations under the License. |
* then include that into your web page using a command of the form |
|
* |
|
* <SCRIPT SRC="..."></SCRIPT> |
|
* |
|
* in your main HTML page. This way you can include the same macros |
|
* into several web pages, for example. |
|
*/ |
|
|
|
jsMath.Add(jsMath,{ |
|
Macro: function (name) { |
|
var macro = jsMath.Parser.prototype.macros; |
|
macro[name] = ['Macro']; |
|
for (var i = 1; i < arguments.length; i++) |
|
{macro[name][macro[name].length] = arguments[i]} |
|
} |
|
}); |
|
|
|
|
|
/***************************************************************************/ |
|
|
|
/* |
|
* These routines look through the web page for math elements to process. |
|
* There are two main entry points you can call: |
|
* |
* |
* <SCRIPT> jsMath.Process() </SCRIPT> |
*****************************************************************************/ |
* or |
|
* <SCRIPT> jsMath.ProcessBeforeShowing() </SCRIPT> |
|
* |
|
* The first will process the page asynchronously (so the user can start |
|
* reading the top of the file while jsMath is still processing the bottom) |
|
* while the second does not update until all the mathematics is typeset. |
|
*/ |
|
|
|
jsMath.Add(jsMath,{ |
|
|
|
/* |
|
* Typeset a string in \textstyle and return the HTML for it |
|
*/ |
|
TextMode: function (s) { |
|
var parse = jsMath.Parse(s,null,null,'T'); |
|
parse.Atomize(); |
|
var html = parse.Typeset(); |
|
return html; |
|
}, |
|
|
|
/* |
|
* Typeset a string in \displaystyle and return the HTML for it |
|
* ### need to give more control over whether to center, etc. ### |
|
*/ |
|
DisplayMode: function (s) { |
|
var parse = jsMath.Parse(s,null,null,'D'); |
|
parse.Atomize(); |
|
var html = parse.Typeset(); |
|
return html; |
|
}, |
|
|
|
/* |
|
* Return the text of a given DOM element |
|
*/ |
|
GetElementText: function (element) { |
|
var text = element.innerText; |
|
if (text == null) { |
|
text = element.textContent; |
|
if (text == null) { |
|
text = element.innerHTML; |
|
} |
|
} |
|
if (text.search('&')) { |
|
text = text.replace(/</g,'<'); |
|
text = text.replace(/>/g,'>'); |
|
text = text.replace(/"/g,'"'); |
|
text = text.replace(/&/g,'&'); |
|
} |
|
return text; |
|
}, |
|
|
|
/* |
|
* Typeset the contents of an element in \textstyle |
|
*/ |
|
ConvertText: function (element) { |
|
var text = this.GetElementText(element); |
|
element.innerHTML = this.TextMode(text); |
|
element.className = 'typeset'; |
|
}, |
|
|
|
/* |
|
* Typeset the contents of an element in \displaystyle |
|
*/ |
|
ConvertDisplay: function (element) { |
|
var text = this.GetElementText(element); |
|
element.innerHTML = this.DisplayMode(text); |
|
element.className = 'typeset'; |
|
}, |
|
|
|
/* |
|
* Call this at the bottom of your HTML page to have the |
|
* mathematics typeset before the page is displayed. |
|
* This can take a long time, so the user could cancel the |
|
* page before it is complete; use it with caution, and only |
|
* when there is a relatively small amount of math on the page. |
|
*/ |
|
ProcessBeforeShowing: function () { |
|
if (!jsMath.initialized) {jsMath.Init()} |
|
var element = jsMath.GetMathElements(); |
|
for (var i = 0; i < element.length; i++) |
|
{jsMath.ProcessElement(element[i])} |
|
jsMath.ProcessComplete(); |
|
}, |
|
|
|
/* |
|
* Process a math element |
|
*/ |
|
ProcessElement: function (element) { |
|
window.status = 'Processing Math...'; |
|
if (element.tagName == 'DIV') { |
|
this.ConvertDisplay(element); |
|
} else if (element.tagName == 'SPAN') { |
|
this.ConvertText(element); |
|
} |
|
}, |
|
|
|
/* |
|
* Asynchronously process all the math elements starting with |
|
* the k-th one |
|
*/ |
|
ProcessElements: function (k) { |
|
if (k >= this.element.length) { |
|
this.ProcessComplete(); |
|
} else { |
|
this.ProcessElement(this.element[k]) |
|
setTimeout('jsMath.ProcessElements('+(k+1)+')',jsMath.delay); |
|
} |
|
}, |
|
|
|
/* |
|
* Call this at the bottom of your HTML page to have the |
|
* mathematics typeset asynchronously. This lets the user |
|
* start reading the mathematics while the rest of the page |
|
* is being processed. |
|
*/ |
|
Process: function () { |
|
if (!jsMath.initialized) {jsMath.Init()} |
|
this.element = this.GetMathElements(); |
|
window.status = 'Processing Math...'; |
|
setTimeout('jsMath.ProcessElements(0)',jsMath.delay); |
|
}, |
|
|
|
element: [], // the list of math elements on the page |
|
|
|
/* |
|
* Look up all the math elements on the page and |
|
* put them in a list sorted from top to bottom of the page |
|
*/ |
|
GetMathElements: function () { |
|
var element = []; |
|
var math = document.getElementsByTagName('DIV'); |
|
for (var k = 0; k < math.length; k++) { |
|
if (math[k].className == 'math') { |
|
if (jsMath.renameOK) {math[k].setAttribute('NAME','_jsMath_')} |
|
else {element[element.length] = math[k]} |
|
} |
|
} |
|
math = document.getElementsByTagName('SPAN'); |
|
for (var k = 0; k < math.length; k++) { |
|
if (math[k].className == 'math') { |
|
if (jsMath.renameOK) {math[k].setAttribute('NAME','_jsMath_')} |
|
else {element[element.length] = math[k]} |
|
} |
|
} |
|
// this gets the SPAN and DIV elements interleaved in order |
|
if (jsMath.renameOK) { |
|
element = document.getElementsByName('_jsMath_') |
|
} else if (jsMath.hidden.sourceIndex) { |
|
element.sort(function (a,b) {return a.sourceIndex - b.sourceIndex}); |
|
} |
|
return element; |
|
}, |
|
|
|
/* |
|
* Remove the window message about processing math |
|
* and clean up any marked <SPAN> or <DIV> tags |
|
*/ |
|
ProcessComplete: function () { |
|
if (jsMath.renameOK) { |
|
var element = document.getElementsByName('_jsMath_'); |
|
for (var i = element.length-1; i >= 0; i--) { |
|
element[i].removeAttribute('NAME'); |
|
} |
|
} |
|
jsMath.element = []; |
|
window.status = 'Done'; |
|
} |
|
|
|
}); |
|
|
|
/***************************************************************************/ |
|
|
|
/* |
|
* We use a hidden <DIV> for measuring the BBoxes of things |
|
*/ |
|
jsMath.hidden = '<DIV CLASS="normal" ID="jsMath.Hidden" ' + |
|
'STYLE="position:absolute; top:0 left:0;"></DIV>'; |
|
if (document.body.insertAdjacentHTML) { |
|
document.body.insertAdjacentHTML('AfterBegin',jsMath.hidden); |
|
} else { |
|
document.write(jsMath.hidden); |
|
} |
|
jsMath.hidden = document.getElementById("jsMath.Hidden"); |
|
|
|
/* |
|
* Initialize everything |
|
*/ |
|
jsMath.InitSource(); |
|
jsMath.InitBrowser(); |
|
jsMath.InitStyles(); |
|
|
|
//make sure browser-specific loads are done before this |
|
document.write('<SCRIPT>jsMath.CheckFonts()</SCRIPT>'); |
|
|
|
} |
if (!window.jsMath) {jsMath = {}} |
|
if (!jsMath.Script) {jsMath.Script = {}} |
|
|
} |
jsMath.Script.Uncompress = function (data) { |
|
for (var k = 0; k < data.length; k++) { |
|
var d = data[k]; var n = d.length; |
|
for (var i = 0; i < n; i++) {if (typeof(d[i]) == 'number') {d[i] = d[d[i]]}} |
|
data[k] = d.join(''); |
|
} |
|
eval(data.join('')); |
|
} |
|
|
|
//start = new Date().getTime(); |
|
jsMath.Script.Uncompress([ |
|
['if(!','window.','jsMath','||!',1,'jsMath.','loaded','){if(',1,'parent','&&',1,9,'.',2,'){',2,'=',1,9,'.',2,';}var ','jsMath_old','=',1,2,';',0,'document.','getElementById','||!',29,'childNodes||!',29,'createElement','){','alert("','The',' mathematics ','on this page requires W3C DOM support in its JavaScript. "+"Unfortunately, your ','browser',' doesn\'t seem to have this.");}','else{',2,'={version:"3.2",document:document,window:window,','sizes',':[50,60,70,85,100,120,144,173,207,249],styles:{".math','":"font-family: serif; font-style: normal; font-weight: normal','",".typeset',48,'","div.typeset','":"text-align: ','center; margin: 1em 0px;","span.typeset',52,'left',49,' span',52,'left','; border:0px','; margin:0px; padding:0px','",".typeset .','normal',48,62,'size0','":"font-size: ','50','%",".typeset .','size1',67,'60',69,'size2',67,'70',69,'size3',67,'85',69,'size4',67,'100',69,'size5',67,'120',69,'size6',67,'144',69,'size7',67,'173',69,'size8',67,'207',69,'size9',67,'249',69,'cmr10','":"font-family: jsMath-',106,', serif',62,'cmbx10',107,111,', ',2,'-cmr10',62,'cmti10',107,118,', ',2,116,62,'cmmi10',107,125,62,'cmsy10',107,129,62,'cmex10',107,133,62,'textit','":"font-family: serif; font-','style:italic',62,'textbf',138,'weight:bold',62,'link":"','text-decoration',': none',62,'error',67,'10pt; font-style: italic; "+"','background-color',': #FFFFCC','; padding: ','1px; "+"','border: ','1px solid',' #CC0000',62,'blank":"','display:inline-block','; ','overflow:hidden',60,' none; width:0px; height:0px;",".typeset .','spacer','":"',161,'","#jsMath_message','":"position:fixed; bottom:','1px; left:2px; ',152,':#E6E6E6','; "+"border: solid 1px #959595; margin:0px; padding: ','1px 8px','; "+"z-index:102; color',': black','; font-size:small; width:auto;","#','jsMath_panel',170,'1.5em; right:1.5em',154,'10px 20px','; "+"',152,':#DDDDDD; border: outset ','2px; "+"z-index:103; width:auto;","#','jsMath_button',170,'1px; right:2px; ',152,':white',174,'0px 3px 1px 3px',176,':black; ',146,':none','; font-size',':x-small; "+"','width:auto; cursor:pointer; cursor:hand',';","#jsMath_float','":"','position:absolute','; top:0px; left:0px; max-width:80%; "+"z-index:101; ','width:auto; height:auto',202,' .drag":"',152,186,'1px; height:12px',199,': 1px',202,' .close":"',152,173,'; border: ','inset 1px; width:8px; height:8px; margin: 1px 2px',202,' .source":"',152,':#E2E2E2',218,'outset ',155,206,154,'8px 15px; "+"','font-family',': courier, fixed',199,': 90%","#','jsMath_noFont',52,'center',154,183,218,'3px solid #DD0000; "+"',152,': #FFF8F8; color: #AA0000',178,234,' .link":"padding: 0px 5px 2px 5px',218,'2px outset; ',152,':#E8E8E8; "+"color:black',199,':80%; ',201,';","@media print":"#',188,' {','display:none','}"},Element',':function(','_1){return ',5,29,30,'("jsMath_"+_1);},','BBoxFor',258,'s','){this.','hidden.innerHTML','="<nobr><span class=\\"typeset\\"><span class=\\"scale\\">"+s+"</span></span></nobr>";var _3={w:this.','hidden','.offsetWidth',',h:this.',270,'.offsetHeight','};this.',268,'="";return _3;},EmBoxFor',258,'s){var _5','=this.BBoxFor','(s);return {w:_5.w/this.em,h:_5','.h/this.em};},','EmBoxForItalics',258,'s){var _7',280,'(s);if(s.match(/<i>|class=\\"(icm|italic|igreek|iaccent)/i)){_7.w',280,'(s+',5,'Browser.','italicString',').w-',5,291,'italicCorrection',';}return {w:_7.w/this.em,h:_7',282,'Init',':function(){','if(',5,'Setup.inited','!=1',7,5,303,'){',37,'It looks like ',2,' failed to set up properly (error code "+',5,303,'+"). "+"I\'ll will try to keep going, but it could get ugly.");',5,303,'=1;}',43,37,'You must call ',5,'Setup.','Body() explicitly when ',2,' is"+"',6,' as part of the <HEAD> section");}',5,323,'Body();}this.em',280,'("<span style=\\""+',5,291,'block+";','width:10em;height:1em','\\"></span>").','w/10;if(this.em==0',267,'em',280,'("<img src=\\""+',5,'blank+"\\" style=\\"',337,'\\"/>").w/10;}if(',5,291,292,'){',5,291,296,'=',5,264,'(',5,291,292,').w;}var bb',280,'("x");var h=bb.h;var d',280,'("x"+',5,'HTML.Rule(1,','h/',5,'em)).h-h;this.h=(h-d)/this.em;this.d=d/this.em;this.hd=this.h+this.d;this.xWidth=bb.w;this.',323,'TeXfonts','();var _b=this.','EmBoxFor("<span class','=\\"',106,'\\">M</span>").w/2;this.TeX.M_height=_b*(26/14);this.TeX.h=this.h;this.TeX.d=this.d;this.TeX.hd=this.hd;this.Img.Scale();',0,'this.initialized',267,323,'Sizes','();this.','Img.UpdateFonts();}this.p_height=(this.','TeX.cmex10[','0].h+this.',386,'0].d)/0.85;',380,'=1;},ReInit',300,'var w',280,'("x").w;if(w!=this.xWidth',267,'Init();}},Loaded',300,'if(',23,'){var _d=["Process","ProcessBeforeShowing","ConvertTeX","ConvertTeX2","ConvertLaTeX","ConvertCustom","CustomSearch","Synchronize","Macro","document"];','for(var i=0;i<','_d','.length;','i++){if(',23,'[_d[i]]){',23,'[_d[i]]=null;}}}if(',23,267,'Insert(',2,',',23,');}',23,'=null;',5,6,'=1;},Add',258,'_f,src){','for(var id in ','src){_f[id]=src[id];}},Insert',258,'dst,src){',424,'src',7,'dst[id]&&typeof (src[id])=="object"&&(','typeof (dst[id])=="','object"||',432,'function")){this.',412,'dst[id],src[id]);}',43,'dst[id]=src[id];}}},Package',258,'obj,def',267,412,'obj.prototype,def);}};',5,'Script={request:null,Init',300,'if(!(',5,'Controls.cookie','.asynch&&',5,450,'.progress',')){if(',1,'XMLHttpRequest','){','this.request','=new ',457,';}',43,'if(',1,'ActiveXObject','){try{',459,'=new ',466,'("Microsoft.XMLHTTP");}catch(err){}}}}',0,459,'||',5,323,'domainChanged',267,'Load=this.delayedLoad;this.needsBody=1;}},Load',258,'url,_18',7,'_18){',5,'Message.Set("Loading "+url);',5,'Script.','Delay(1);',5,'Script.Push(','this,"xmlRequest",url',');',5,490,5,'Message',',"Clear");}',43,5,490,491,');}},','xmlRequest',258,'url){','this.debug("',503,': "+url);','try{',459,'.open("GET",url,false);',459,'.send(null);}catch(err','){throw "jsMath can\'t load the file \'"+url+"\'\\n"+"',496,': "+err.message;}if(',459,'.status','&&',459,518,'>=400',514,'Error status: "+',459,518,';}this.','Start();','this.blocking','=1;',5,1,'eval(',459,'.responseText);this.End();',529,'=0;this.Process','();},cancelTimeout:30*1000,iframe:null,blocking:0,cancelTimer:null,needsBody:0,queue:[],queueAt:0,Synchronize',258,'_1a,_1b){','if(typeof (','_1a)!="string"){',5,490,'null,_1a,_1b);}',43,5,490,5,'window,"eval",_1a);}},Push',258,'_1c,_1d,_1e){',506,'Pushing: "+_1d+" at "+','this.queueAt',');this.queue=[].concat(','this.queue.slice(','0,',555,'),[[_1c,_1d,_1e]],',557,555,'));',555,'++;if(!(',529,'||(this.needsBody&&!',5,29,'body))){this.Process();}},Process',300,'while(','this.queue.length','&&!',529,267,528,'var _1f=this.queue[0];this.queue=',557,'1);var _20=_1f[0];var _21=_1f[1];var _22=_1f[2];',506,'Calling: "+_21);if(_20){_20[_21](_22);}',43,'if(_21){_21(_22);}}',506,'Done: "+_21);}this.End();},Start',300,555,'=0;},End',300,555,'=',573,';},delayedLoad',258,'url){',506,'Loading',508,'this.Push(this,"startLoad",url);},startLoad',258,'url){','this.iframe','=',5,29,35,'("iframe");','this.iframe.style.','visibility="',270,'";',609,'position="absolute";',609,'width="0px";',609,'height="0px";if(',5,29,'body.firstChild','){',5,29,'body.insertBefore(',603,',',5,29,621,');}',43,5,29,'body','.appendChild(',603,');}',529,'=1;this.','url=url;',0,'url.match(/\\.js$/)){',603,'.src=url;}',43,603,'.src=',5,'root+"',2,'-loader.html";}if(url.substr(0,',5,'root.length',')==',5,'root){url=url.substr(',5,654,');}',5,485,506,'Starting',508,'this.cancelTimer','=setTimeout("',5,487,'cancelLoad','()",this.cancelTimeout);},endLoad',258,'_25){',506,'Ending: "+this.url);if(',666,'){clearTimeout(',666,');',666,'=null;}',5,496,'.Clear();if(_25!="cancel"){',529,537,'();}},',670,300,666,'=null;',5,496,'.Set("Can\'t load file");this.endLoad("cancel");},Delay',258,'_26){',529,'=1;setTimeout("',5,487,'endDelay','()",_26);},',701,300,506,701,'");',529,537,'();},','WaitForImage',258,'_27){',529,'=1;if(this.img==null',267,'img=[];}var img=new Image',384,'img[this.img.length]=img;img.onload=function(){',5,487,701,'();};img.onerror','=img.onload;img.','onabort',724,'src=_27;},Uncompress',258,'_29){','for(var k=0;k<','_29',404,'k++){var d=_29[k];var n=d',404,402,'n;',405,'typeof (d[i])=="number"){d[i]=d[d[i]];}}_29[k]=d.join("");}',1,'eval(_29.join(""));},debug',258,'_2e){}};',5,496,'={blank:null,message:null,text:null,clear:null,Init',300,0,5,29,'body||!',5,450,454,'){return;}','if(',5,323,'stylesReady){','this.message','=',5,'Setup.DIV("message",{visibility:"hidden','"});}',43,759,'=',5,762,'",position:"absolute",','bottom:"1px",left:"2px",','backgroundColor',':"#E6E6E6",border:"solid 1px #959595",margin:"0px",padding:"1px 8px",zIndex:102,color:"black",fontSize:"small",width:"auto"});}','this.text','=',5,29,'createTextNode','("");',759,636,773,');',759,'.onmousedown=',5,'Translate.Cancel;},Set',258,'_2f,_30){','if(this.clear){clearTimeout(this.clear',');','this.clear',681,'if(',5,450,454,'){',0,773,267,'Init();',0,773,'){return;}}if(',5,291,'textNodeBug','){',759,'.innerHTML','=_2f;}',43,773,'.nodeValue',811,759,'.style.visibility="','visible";if(_30){',759,'.style.cursor','="pointer";',0,759,820,'){',759,820,'="hand";}',759,'.title=" Cancel Processing of Math ";}',43,759,820,';',759,'.title="";}}',43,'if(_2f.substr(0,8)!="Loading "){',5,1,'status=_2f;}}},Clear',300,789,');}',791,'=setTimeout("',5,496,'.doClear()",1000);},doClear',300,'if(',791,267,'clear=null;',5,1,'status="";if(',773,'){',773,814,'="";}if(',759,'){',759,817,270,'";}}},Blank',300,'if(','this.blank','||!',5,29,'body',754,871,'=',5,323,'DIV("blank",{position:(',5,291,'msiePositionFixedBug','?"absolute":"fixed"),top:"0px",left:"0px",bottom:"0px",right:"0px",zIndex:101,',771,':"white"});if(',5,291,'msieBlankBug','){',871,810,'=" ";',871,'.style.width="110%";',871,'.style.height="110%";}},UnBlank',300,'if(',871,'){',5,29,'body.removeChild(',871,');}',871,'=null;}};',5,'Setup={',6,':[],DIV',258,'id,_32){var div=',5,29,35,'("div");div.id="jsMath_"+id;','for(var i in ','_32){div.style[i]=_32[i];}',0,5,29,'body.hasChildNodes){',5,29,'body',636,'div);}',43,5,29,625,'div,',5,29,621,');}return div;},Script',258,'_35,_36',7,'this.loaded[_35',']){','return;}',43,943,']=1;}',0,'_35.match("^([a-zA-Z]+:/)?/")){_35=',5,'root+_35;}',5,487,'Load(_35,_36);},Hidden',300,5,270,'=this.DIV("Hidden",{visibility:"',270,769,'top:0,left:0,border:0,padding:0,margin:0});',5,'hiddenTop=',5,270,';return;},Source',300,'if(',5,'Autoload&&',5,'Autoload.root','){',5,'root=',5,973,';}',43,5,'root="";var _37=',5,29,'getElementsByTagName("','script");if(_37){',402,'_37',404,'i++){var ','src=_37[i].src;if(src&&src.match("(^|/)',5,'js$")){',5,'root=src.replace','(/',5,'js$/,"");if(',5,'root.charAt(0)=="/"){',5,976,5,29,'location','.protocol+"//"+',5,29,1005,'.host+',5,'root;}',43,0,5,'root.match','(/^[a-z]+:/i)){src','=new String(',5,29,1005,');',5,995,'(new RegExp("[^/]*$"),"")+',5,'root;',572,5,1016,'("/[^/]*/\\\\.\\\\./")){',5,976,5,'root.replace(new RegExp("/[^/]*/\\\\.\\\\./"),"/");}}}i=_37.length;}}}}',5,'Img.',976,5,650,'fonts/";',5,'blank=',5,650,'blank.gif";this.Domain();},Domain',300,'var _3a="";var _3b=',5,29,'domain;if(',5,1016,'("://([^/]*)/")){_3a=RegExp.$1;}_3a=_3a.replace(/:\\d+$/,"");if(_3a==""||_3a==_3b',754,'if(navigator.','appName=="Microsoft Internet Explorer"&&','navigator.','platform=="','MacPPC"&&',1058,'onLine&&',1058,'userProfile&&',5,29,'all',754,'_3a=_3a.split(/\\./);_3b=_3b.split(/\\./);if(_3a.length<2||_3b.length<2||','_3a[_3a.length-','1',']!=_3b[_3b.length-','1]||',1070,'2',1072,'2]){this.','DomainWarning','();',945,'var _3c=',1070,'2]+"."+',1070,'1];for(var i=3;i<=_3a.length&&i<=_3b',404,405,1070,'i',1072,'i]){break;}_3c=',1070,'i]+"."+_3c;}',5,29,'domain=_3c;this.',477,'=1;},',1078,300,37,'In order for ',2,' to be able to load the additional "+"components that it may need, the ',5,'js file must be "+"',6,' from a server in the same domain as the page that "+"contains it. Because that is not the case for this page, "+"the',39,'displayed here may not appear correctly.");},','EncodeFont',258,'_3e){var _3f=',5,'TeX[_3e];if(_3f[0].c!=null',754,730,'128;k++){var _41=_3f[k];_3f[k]=_41[3];if(_3f[k]==null){_3f[k]={};}_3f[k].w=_41[0];_3f[k].h=_41[1];if(_41[2]!=null){_3f[k].d=_41[2];}_3f[k].c=',5,'TeX.encoding[k];}},Fonts',300,402,5,'TeX.fam.length;',990,'_43=',5,'TeX.fam[i','];if(_43',267,1111,'(_43);}}},TeXfont',258,'_44){var _45=',5,'TeX[_44];if(_45==null',754,'var WH=',5,375,'=\\""+_44+"\\">"+_45[65','].c+"</span>");','_45.hd=WH.h;_45.dh=0.05;_45.d=',5,375,'=\\""+_44+"\\">"+_45[65].c+',5,368,'_45.hd)+"</span>").h-_45.hd;_45.h=_45.hd-_45.d;','if(_44=="',125,'"){_45.skewchar=','127;}',43,1150,129,1152,'48;}}},',373,300,402,5,1124,405,5,1128,']){this.TeXfont(',5,1128,']);}}},Sizes',300,5,'TeXparams','=[];for(var j=0;j<',5,46,404,'j++){',5,1173,'[j]={};}',920,5,'TeX){',541,5,'TeX[i])!="object"){for(var j=0;j<',5,46,404,'j++){',5,1173,'[j][i]=',5,46,'[j]*',5,'TeX[i]/100;}}}},Styles',258,'_4b){',0,'_4b){_4b=',5,'styles;_4b[".typeset .scale"]="font-size:"+',5,450,'.scale+"%";this.stylesReady=1;}',5,490,'this,"','AddStyleSheet','",_4b);if(',5,291,'styleChangeDelay','){',5,490,5,'Script,"','Delay",1);}},',1212,258,'_4c){var _4d=',5,29,985,'head")[0];var _4e="";',424,'_4c){_4e+=id+" {"+_4c[id]+"}\\n";}if(',5,29,'createStyleSheet){_4d.insertAdjacentHTML("beforeEnd","<','span style=\\"',256,'\\">x</span','><style type=\\"text/css\\">"+_4e+"</style>");}',43,'var _50=',5,29,35,'("style");_50.type="text/css";_50',636,5,29,777,'(_4e));_4d',636,'_50);}},Body',300,'if(this.inited',754,'this.inited=-','1;',5,323,'Hidden();',1255,'2;',5,291,801,1255,'3;if(',5,450,'.blank){',5,496,'.Blank();}',1255,'4;',5,323,'Styles();',1255,'5;',5,'Controls.',801,1255,'6;',5,490,5,'Setup,"User","pre-font");',1255,'7;',5,490,5,'Font,"Check");this.inited=1;},User',258,'_51){}};',5,'Update={',373,258,'_52){for(var ','_53 in ',1301,'_54 in _52[_53]){',424,'_52[_53][_54',']){',5,'TeX[_53][_54][id]=',1306,'][id];}}}},TeXfontCodes',258,'_56){for(var _57 in _56){',402,'_56[_57].length;i++){',5,'TeX[_57][i].c=_56[_57][i];}}}};',5,'Browser={allowAbsolute:1,allowAbsoluteDelim:0,separateSkips:0,valignBug:0,operaHiddenFix:"",','msieCenterBugFix',':"",','msieInlineBlockFix',':"",imgScale:1,renameOK:1,',1216,':0,delay:1,version:0,','TestSpanHeight',300,5,268,'="<span><','span style=\\""+this.block+";','height:2em;width:','1px\\"></','span></span>";var ','_59=',5,'hidden.firstChild;','var img=_59.firstChild;','this.spanHeightVaries','=(_59',274,'>=img',274,'&&_59',274,'>0);','this.spanHeightTooBig','=(_59',274,'>img',274,');',5,268,'="";},','TestInlineBlock',300,'this.block','="',161,'";','this.hasInlineBlock','=',5,'BBoxFor("<span style=\\""+this.block+";','width:10px;height:5px\\"></span>").w>0;if(!this.hasInlineBlock){',1358,'="display:-moz-inline-box";',1362,'=',5,1365,1366,945,5,'styles[".typeset .','blank"]=',5,1376,'blank','"].replace(/',161,'/,',1358,');}',1358,'+=";',163,'";var h=',5,264,'("x").h;this.mozInlineBlockBug=',5,1365,'height:"+h+"px;width:1px','\\"></span>x','"+"<',1331,1395,';vertical-align:-"+h+"px',338,'h>2*h;this.widthAddsBorder=',5,1365,163,';height:1px;width:10px',';border-left:','10px solid',338,'w>10;','this.msieBorderBug','=',5,1365,1395,1396,'").h!=',5,1365,1395,1407,157,1396,'").h;this.blankWidthBug=',1411,'||',5,1365,1332,'0px',338,'h==0;},','TestRenameOK',300,5,268,'="<',1334,'_5c=',5,1337,'_5c.setAttribute("name","','jsMath_test','");this.renameOK=(',5,29,'getElementsByName("',1443,'").length>0);',5,268,1355,'TestStyleChange',300,5,268,'="<span ID=\\"',1443,1237,'>";var _5d=',5,1337,'var w=_5d',271,';',5,323,1212,'({"#',1443,'":"font-size:200%"});this.',1216,'=(_5d',271,'==w);',5,268,1355,'VersionAtLeast',258,'v){var bv',1018,'this.version).split(".");v',1018,'v).split(".");if(v[1]==null){v[1]="0";}return bv[0]>v[0]||(bv[0]==v[0]&&bv[1]>=v[1]);},Init',300,5,41,'="unknown";this.',1356,384,1326,384,1433,384,1453,384,'MSIE',384,'Mozilla',384,'Opera',384,'OmniWeb',384,'Safari',384,'Konqueror','();if(','this.allowAbsoluteDelim','){',5,'Box.DelimExtend=',5,'Box.DelimExtendAbsolute;',5,'Box.Layout=',5,'Box.LayoutAbsolute;}',43,5,'Box.DelimExtend=',5,'Box.DelimExtendRelative;',5,'Box.Layout=',5,'Box.LayoutRelative;}if(','this.separateSkips','){',5,'HTML.Place=',5,'HTML.','PlaceSeparateSkips',';',5,'Typeset.prototype.','Place=',5,1538,1535,';}},MSIE',300,'if(',1339,'&&!',1347,'){',5,41,'="MSIE";',1056,1059,'Win32"){',1510,'=1;',1529,'=1',';this.buttonCheck=1;this.',890,'=1;this.msieDivWidthBug=1;this.',884,640,'msieIntegralBug',640,'waitForImages',640,'msieAlphaBug=1;','this.alphaPrintBug=1',';this.',1320,'="position:relative; ";this.',1322,'=" ',161,';";',5,'Macro("joinrel","\\\\mathrel{\\\\kern-5mu}"),',5,1376,'arial"]="',230,': \'Arial unicode MS\'";',5,'styles["#jsMath_message','"]=',5,1586,1381,'position:fixed','/,"',204,'").','replace(/width:auto','/,"");',5,'styles["#jsMath_panel','"]=',5,1598,1381,1591,'/,"',204,'").',1595,1596,5,'styles["#jsMath_button','"]="width:','1px; "+',5,1610,1381,1591,'/,"',204,'").',1595,1596,5,1,'onscroll=',5,1281,'MoveButton;',5,1376,166,'"]=',5,1376,166,1381,161,1596,'if(','screen.deviceXDPI','&&','screen.logicalXDPI','&&',1639,'!=',1641,267,'imgScale*=',1641,'/',1639,';',5,450,'.alpha=0',527,292,'="<i>x</i>";',5,'EmBoxFor=',5,283,';}',43,1056,1059,'MacPPC"){this.msieAbsoluteBug',640,'msieButtonBug',1562,890,'=1;',5,'Setup.Script("jsMath-','msie-mac.js");',5,'Parser.prototype.macros.angle=["Replace","ord","<font face=\\"Symbol\\">‹</font>","normal"];',5,1598,1611,'25em; "+',5,1598,'"].',1595,1596,5,1610,1611,1612,5,1610,'"].',1595,'/,"");}}',5,'Macro("not","\\\\mathrel{\\\\rlap{\\\\kern3mu','/}}");}},Mozilla',300,'if(',5,270,'.ATTRIBUTE_NODE){',5,41,'="Mozilla";',1056,1059,'Win32"){',1570,';}',1510,'=1;',5,1696,'/}}");',1056,'vendor=="Firefox"){',5,291,'version=',1058,'vendorSub;}',43,1056,'userAgent.match','(" Firefox/([0-9.]+)( |$)")){',5,291,1720,'RegExp.$1;}}}},',1504,300,1056,'accentColorName){',5,41,'="',1504,'";','this.allowAbsolute','=',1362,';',1510,'=',1740,';this.valignBug=',1740,1560,807,'=1;',0,1362,'){',5,1673,'old-browsers.js','");}}},Opera',300,'if(',1347,'){',5,41,'="Opera";var _61=',1058,1725,'("Opera 7");',1740,'=0;this.delay=10;this.operaHiddenFix="[Processing]";if(_61){',5,1673,1757,'");}}},Safari',300,1056,'appVersion.match(/Safari\\//)){',5,41,'="Safari";var _62=',1058,1725,'("Safari/([0-9]+)");_62=(_62)?_62[1]:400;',402,5,1124,405,5,1128,']){',5,'TeX[',5,1128,']].dh=0.1;}}',5,'TeX.axis_height+=0.05;',1510,'=_62>=125;this.safariIFRAMEbug=_62>=312&&_62<412;this.safariImgBug',640,807,'=1',1560,1216,'=1;}},',1508,300,1056,'product&&',1058,'product.match("',1508,'")){',5,41,'="',1508,'";',1740,'=0;',1510,'=0;',1056,1725,'(/',1508,'\\/(\\d+)\\.(\\d+)/)){if(RegExp.$1<3||(RegExp.$1==3&&RegExp.$2<3)){',1529,'=1',1747,'1;',5,1673,1757,'");}}}}};',5,'Font={fallback:"symbol",message:"<b>No ',2,' TeX fonts found</b> -- using',' image fonts instead','.<br/>\\n"+"These',' may be slow and might not print well.<br/>\\n"+"Use the jsMath control panel to get additional information.",','extra_message:"Extra TeX fonts not found: <b><span id=\\"jsMath_ExtraFonts\\"></span></b><br/>"+"Using',1840,'. This',1842,'Test1',258,'_64,n,_66,_67','){if(n==null){n=124;}if(','_66==null){_66=2;}if(_67==null){_67="";}var wh1=',5,'BBoxFor("<span style=\\"font-family',': "+_67+_64+", serif\\">"+',5,'TeX[_64][n',1142,'var wh2=',5,1853,': serif\\">"+',5,'TeX[_64][n',1142,'return (wh1.w>_66*wh2','.w&&wh1.h!=0);},','Test2',258,'_6a,n,_6c,_6d',1850,'_6c==null){_6c=2;}if(_6d==null){_6d="";}var wh1=',5,1853,': "+_6d+_6a+", serif\\">"+',5,'TeX[_6a][n',1142,'var wh2=',5,1853,': serif\\">"+',5,'TeX[_6a][n',1142,'return (wh2.w>_6c*wh1',1866,'CheckTeX',300,'var wh=',5,1853,': ',2,'-',133,109,'\\">"+',5,386,'1',1142,5,'nofonts=((wh.w*3>wh.h||wh.h==0)&&!this.Test1("cmr10','",null,null,"',2,'-"));if(',5,'nofonts&&(',1058,'platform!="MacPPC"||',5,41,'!="Mozilla"||!',5,291,1479,'(1.5))){wh=',5,1853,': ',133,109,'\\">"+',5,386,'1',1142,5,1903,'"));',0,5,'nofonts){',5,1673,'BaKoMa-fonts.js");}}},Check',300,'var _71=',5,450,';this.CheckTeX();if(',5,1933,'if(_71.autofont','||_71.font=="tex"){_71.font=this.fallback;if(_71.warn){',5,'nofontMessage=1;_71.warn=0;',5,1281,'SetCookie(0);if(',5,1,'NoFontMessage','){',5,1,1953,'();}',43,'this.',496,'(',759,');}}}}',43,1944,'){_71.font="','tex";}','if(_71.font=="','tex"){return;}}if(',5,'noImgFonts',1967,'unicode";}',1969,'unicode"){var _72=({Win32:"pc",MacPPC:"mac"})[',1058,'platform]||"unix";',5,1673,'fallback-"+_72+".js");',5,'Box.TeXnonfallback=',5,'Box.TeX',';',5,1985,'=',5,'Box.TeXfallback;return;}','if(',5,291,1567,'){',5,490,5,1221,711,'",',5,'blank);}',1969,'symbol"){',5,1673,'fallback-symbols.js");',5,'Box.TeXnonfallback=',5,1985,';',5,1985,'=',5,1991,5,'Img.SetFont({',106,':["all"],',125,2023,129,2023,133,2023,111,2023,118,':["all"]});',5,'Img.LoadFont("cm-fonts");},',496,258,'_73',7,5,'Element("Warning','")){',945,'var div=',5,323,'DIV("Warning",{});div',810,'="<center><table><tr><td>"+"<div id=\\"',234,'\\">"+_73+"<','div style=\\"','text-align:left\\"><',1235,'float:left; ','margin: 8px ','0px 0px 20px\\">"+"<span onclick=\\"',5,1281,'Panel()\\" title=\\" Open the ',2,' Control Panel',' \\" class=\\"link\\">',2,2062,'</span>"+"</span','><',1235,2056,'20px 0px 0px; float:right\\">"+"<span onclick=\\"',5,'Font.HideMessage()\\" title=\\" Remove this font warning message',2063,'Hide this ',496,2066,'></div><',2052,'height:6px\\"></div><br clear=\\"all\\"/></div>"+"<',2052,'width:22em; height:1px\\"></div>"+"</td></tr></table></center><hr/>";},HideMessage',300,'var _75=',5,2041,'");if(_75){_75.style.display="none";}},Register',258,'_76){',5,487,528,541,'_76)=="string"){_76={name:_76};}var _77=_76.name;var _78=_77.replace(/10$/,"");var _79=',5,1124,'if(_76.prefix==null){_76.prefix="";}',0,'_76.style){_76.style="',230,': "+_76.prefix+_77+", serif";}',0,'_76.styl'], |
|
['es){','_76.styles','={};}','if(!','_76.macros','){',4,2,'jsMath.','TeX.fam[_79]=_77;',8,'TeX.famName[_77]=_79;',4,'[_78]=["HandleFont",_79];',8,'Add(',8,'Parser.prototype.macros,',4,');',1,'[".typeset ."+_77]=_76.style;',8,'Setup.','Styles(',1,');','jsMath.Script.Push(jsMath.','Setup,"TeXfont",_77);var _7a=!',8,'nofonts&&_76.test(_77,_76.testChar,_76.testFactor,_76.prefix);if(_7a&&','jsMath.Controls','.cookie.font=="','tex"){if(_76.tex){_76.tex','(_77,_79,_76);}jsMath.Script.End();return;}',3,'_7a&&',31,'.cookie.warn&&',31,32,'tex"&&!',8,'nofonts){',3,8,'Element("','Warning")){this.Message(this.extra_message);}var _7b=',8,46,'ExtraFonts");if(_7b){if(','_7b.innerHTML','!=""){',51,'+=",";}',51,'+=" "+_76.prefix+_77;}}if(',31,32,'unicode"){if(','_76.fallback','){',60,34,'var _7c={};_7c[_77]=["all"];',8,'Img.SetFont(_7c);',8,'Img.LoadFont(_77);',27,'Img,"Scale");',27,'Img,"UpdateFonts");',8,'Script','.End();},Load',':function(','_7d){',8,23,74,'(this.URL(_7d));},URL',76,'_7e){return ',8,'Img.root+_7e+"/def.js";}};',31,'={cookie:{scale:100,font:"tex",autofont:1,scaleImg:0,alpha:1,warn:1,button:1,progress:1,asynch:0,blank:0,print:0,keep:"0D"},cookiePath:"/",Init',':function(){','this.panel=',8,23,'DIV("panel",{display:"none"});',3,8,'Browser.msieButtonBug){this.Button();}else{setTimeout("',31,'.Button()",500);}},Panel',88,8,'Translate.Cancel();if(this.loaded){this.Main();}else{',8,74,'.delayedLoad(',8,'root+"jsMath-controls.html");}},Button',88,'var _7f=',8,23,'DIV("button",{});_7f.title=" Open jsMath Control Panel ";_7f.innerHTML="jsMath";if(_7f.offsetWidth<2*',8,'em){_7f.style.width="auto";}_7f.onclick=new Function("',31,'.Panel()");',3,'this.cookie','.button){_7f.style.display="none";}},MoveButton',88,3,'this.button','){',120,'=',8,46,'button");}','this.button.style.visibility="','hidden";',127,'visible";},GetCookie',88,'var _80=',8,'document.cookie',';if(','jsMath.window.location.','protocol=="file:"){','_80=unescape(',136,'search.substr(1));}if(_80','.match(/jsMath','=([^;]*)/)){var _81=RegExp.$1.split(/,/);for(var i=0;i<_81.length;i++){var x=_81[i].match(/(.*):(.*)/);if(x[2].match(/^\\d+$/)){x[2]=1*x[2];}',116,'[x[1]]=x[2];}}},SetCookie',76,'_84){var _85=[];','for(var id in ',116,'){_85[_85.length]=id+":"+',116,'[id];}_85=_85.join(",");if(',136,137,3,'_84){return;}this.loaded=0;var _87=',136,'href;_87=_87.replace(/\\?.*/,"")+"?jsMath="+escape(_85);if(_87!=',136,'href){',136,'replace(_87);}}else{if(','this.cookiePath','){_85+="; ','path="+',162,';}if(','this.cookieDomain',163,'domain="+',167,166,116,'.keep!="0D"){var ms={D',':1000*60*60*24',',W',174,'*7,M',174,'*30,Y',174,'*365};var exp=new Date;exp.setTime(exp.getTime()+',116,'.keep.substr(','0,1)*ms[',116,183,'1,1)]);_85+="; expires="+exp.toGMTString();}',8,134,'="jsMath="+_85;var _8a=',8,134,';if(_84&&!_8a',141,'=/)){alert("Cookies must be enabled in order to save jsMath options");}}}};',8,'Click={CheckClick',76,'_8b){',3,'_8b){_8b=',8,'window.event',166,'_8b.altKey){',31,'.Panel();}},CheckDblClick',76,'_8c){',3,'_8c){_8c=',8,'window.event;}',3,8,'Click.DblClick){',8,'Extension.Require("double-click",1);var _8d=_8c;_8c={};',147,'_8d){_8c[id]=_8d[id];}}',27,'Click,"DblClick",[_8c,this.alt]);}};',8,'TeX={thinmuskip:3/18,medmuskip:4/18,thickmuskip:5/18,x_height:0.430554,quad:1,num1:0.676508,num2:0.393732,num3:0.44373,denom1:0.685951,denom2:0.344841,sup1:0.412892,sup2:0.362892,sup3:0.288888,sub1:0.15,sub2:0.247217,sup_drop:0.386108,sub_drop:0.05,delim1:2.39,delim2:1,axis_height:0.25,default_rule_thickness:0.04,big_op_spacing1:0.111111,big_op_spacing2:0.166666,big_op_spacing3:0.2,big_op_spacing4:0.6,big_op_spacing5:0.1,integer:6553.6,scriptspace:0.05,nulldelimiterspace:0.12,delimiterfactor:901,delimitershortfall:0.5,scale:1,atom:["ord","op","bin","rel","open","close","punct","ord"],fam:["cmr10","cmmi10","cmsy10","cmex10","cmti10","","cmbx10",""],famName:{cmr10:0,cmmi10:1,cmsy10:2,cmex10:3,cmti10:4,cmbx10:6},encoding:["À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","°","Ñ","Ò","Ó","Ô","Õ","Ö","·","Ø","Ù","Ú","Û","Ü","µ","¶","ß","ï","!",""","#","$","%","&","'","(",")","*","+",",","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","\","]","^","_","`","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}","~","ÿ"],cmr10:[[0.625',',0.683],[0.','833',225,'778',225,'694',225,'667',225,'75',225,'722',225,'778',225,'722',225,'778',225,'722',225,'583',',0.694,0,{ic:0.','0778,krn:{"39":0.0778,"63":0.0778,"33":0.0778,"41":0.0778,"93":0.0778},lig:{"105":','14,"108":15}}],[0.','556',',0.694],[0.','556',251,'833',251,'833',251,'278',',0.431],[0.','306',',0.431,0.194','],[0.5',251,'5',251,'5,0.628],[0.5',251,'5,0.568],[0.75',251,'444,0,0.17],[0.5',251,'722',259,'778',259,'5,0.528,0.0972],[0.903,0.683],[1.01',225,'778,0.732,0.0486],[0.278',',0.431,0,{krn:{"','108":-0.278,"76":-0.319}}],[0.278',',0.694,0,{lig:{"96":','60}}],[0.','5',251,'833',',0.694,0.194],[','0.5',',0.75,0.0556],[0.','833',288,'778',251,'278',',0.694,0,{krn:{"','63":0.111,"33":0.111','},lig:{"39":34}}],[0.','389',',0.75,0.25],[0.','389',298,'5,0.75],[','0.778,0.583,0.0833],[','0.278,0.106',',0.194],[0.','333',',0.431,0,{','lig:{"45":','123}}],[',303,'],[0.5',298,'5',',0.644','],[0.5,0.644],[0.','5',313,314,'5',313,314,'5',313,314,'5',313,314,'278',259,'278',261,'],[0.278,0.5',304,'778',',0.367,-0.133],[','0.472,0.5',304,'472',281,'62}}],[0.778',251,'75',',0.683,0,{krn:{"','116','":-0.0278,"','67',344,'79',344,'71',344,'85',344,'81',344,'84":-0.0833,"89":-0.0833,"86":-0.111,"87":-0.111}}],[0.','708',225,'722',225,'764',342,'88',344,'87',344,'65',344,'86',344,'89":-','0.0278}}],[0.','681',225,'653',',0.683,0,{','krn:{"111":-0.0833,"101":-0.0833,"117":-0.0833,"114":-0.0833,"97":-0.0833,"65":-0.111,"79":-0.0278,"67":-0.0278,"71":-0.0278,"81":-0.0278}}],[','0.785',225,'75',225,'361',342,'73":',371,'514',225,'778',342,'79',344,'67',344,'71',344,'81":-',371,'625',342,355,'917',225,'75',225,'778',342,'88',344,'87',344,'65',344,'86',344,'89":-',371,'681',342,'65','":-0.0833,"','111',344,'101',344,'97',344,'46',419,'44":-0.','0833}}],[0.','778,0.683',304,'736',342,'116',344,'67',344,'79',344,'71',344,'85',344,'81',344,355,'556',225,'722',342,'121',344,'101',419,'111',419,'114',419,'97',419,'65',419,'117":-0.',429,'75',225,'75',',0.683,0,{ic:0.','0139,',376,'1.03',468,'0139,',376,'0.75',342,'79',344,'67',344,'71',344,'81":-',371,'75',468,'025,','krn:{"101',419,'111',419,'114',419,'97',419,'65',419,463,429,'611',225,'278',298,'5',251,'278',298,'5',251,'278,0.668],[0.','278',281,'92}}],[0.','5',279,'118',344,'106":0.0556,"121',344,'119":-',371,'556',',0.694',',0',',{krn:{"101":0.0278,"111":0.0278,"120":-0.0278,"100":0.0278,"99":0.0278,"113":0.0278,"118":-0.0278,"106":0.0556,"121":-0.0278,"119":-0.0278}}],[0.','444',279,'104',344,'107":-',371,'556',251,'444',259,'306',247,248,'12,"102":11,"108":13}}],[0.','5,0.431',',0.194,{ic:0.','0139,krn:{"','106":',371,'556',294,'116',344,'117',344,'98',344,'121',344,'118',344,'119":-',371,510,'306,0.668',304,'528',294,'97','":-0.0556,"','101',344,'97',344,'111',344,'99":-',371,'278',251,'833',279,'116',344,'117',344,'98',344,'121',344,'118',344,'119":-',371,'556',279,'116',344,'117',344,'98',344,'121',344,'118',344,'119":-',371,540,',0',525,'556',261,525,'528',261,'],[0.392',259,'394',259,'389,0.615,0,{krn:{"121',344,'119":-',371,'556',279,'119":-',371,'528',',0.431,0,{ic:0.',542,'97',565,'101',344,'97',344,'111',344,'99":-',371,'722',625,542,'101',344,'97',344,'111',344,'99":-',371,'528',259,'528',',0.431',541,542,'111',344,'101',344,'97',344,'46',419,'44":-0.',429,'444',259,'5',625,'0278,',307,'124}}],[1',625,'0278}],[0.','5',251,'5,0.668],[0.5,0.668]],cmmi10:[[0.615',468,'139',',krn:{"61":-0.0556,"59":-0.111,"58":-0.111,"127":0.',429,'833',342,'127":0.167}}],[0.','763',468,668,'krn:{"127":0.0833}}],[0.','694',342,682,'742',468,'0757,',686,'831',468,'0812,krn:{"61',565,'59":-0.0556,"58":-0.0556,"127":0.','0556}}],[0.','78',468,'0576,',686,'583',468,'139',678,699,'667',375,686,'612',468,'11,krn:{"61',565,698,699,'772',468,'0502,',686,'64',625,'0037,','krn:{"127":',371,'566',523,541,'0528,',686,'518',651,541,'0556}],[0.444',247,'0378,krn:{"',698,699,'406',306,'krn:{"127":0.0556}}],[0.','438',523,541,'0738,',686,'497',651,541,'0359,',742,'469',247,668,686,'354',306,742,'576',259,'583',251,'603',261,',{',725,371,'494',625,'0637,krn:{"',698,'0278}}],[0.','438',523,541,'046,','krn:{"127":0.111}}],[0.','57',625,'0359}],[0.','517',261,',{',686,'571',625,'0359,krn:{"59',565,'58":-0.',699,'437',625,'113,krn:{"',698,773,'54',625,'0359,',725,371,'596',523,',0.194,{',686,'626',261,',{',742,'651',523,541,'0359,',778,'622',625,781,'466',306,686,'591',',0.694,0,{',686,'828',625,672,'517',261,',{',686,'363',651,',0.0972,{ic:0.','0799,',686,'654',261,',{',725,'0.0833}}],[1',334,'1',334,'1',334,'1',334,'0.278',',0.464,-0.0363],[','0.278',849,'0.5,0.465,-0.0347],[',852,'0.5',259,'5',259,'5',259,'5',261,'],[0.5',261,'],[0.5',261,314,'5',261,314,'5',261,'],[',303,'],[',303,304,'778',',0.539,0.0391],[','0.5,0.75,0.25,{krn:{"1',565,'65',565,'77',565,'78',565,'89":0.0556,"90":-0.',699,'778',878,852,'0.531',247,'0556,',686,'75',342,'127":','0.','139}}],[0.','759',468,'0502,',686,'715',468,'0715,krn:{"61',344,698,429,'828',468,668,742,'738',468,'0576,',686,'643',468,'139',678,429,'786',375,686,'831',468,'0812,krn:{"61',565,698,699,'44',468,'0785,',778,'555',468,'0962',678,'167}}],[0.','849',468,'0715,krn:{"61',565,698,699,'681',342,898,371,'97',468,'109,krn:{"','61',565,698,429,'803',468,954,'61',419,'61',344,698,429,'763',468,668,686,'642',468,'139',678,429,'791,0.683',804,686,'759',468,'00773,',686,'613',468,'0576,krn:{"61',565,698,429,'584',468,'139,krn:{"61',344,698,429,'683',468,954,'59":-0.111,"',790,'111,"61',565,898,371,'583',468,'222',',krn:{"59":-0.167,"58":-0.167,"61":-0.111}}],[0.','944',468,'139',1008,'828',468,'0785,krn:{"61',419,'61',344,698,429,'581',468,'222',1008,'683',468,'0715,krn:{"61',565,698,429,'389,0.75],[0.389',286,'0.389',286,'1,0.358,-0.142],[',1035,'0.417',822,778,'529',259,'429',251,'433',306,742,'52',294,'89":0.0556,"90',565,'106":-0.111,"102":-0.167,"',682,'466',306,742,'49',523,541,'108,krn:{"',698,941,'477',651,541,'0359,',725,371,'576',294,'127":-',371,'345,0.66],[0.412,0.66',541,'0572,krn:{"59',565,790,699,'521',247,'0315}],[0.298',247,'0197,',686,'878',259,'6',259,'485',306,742,'503',261,',{',686,'446',651,541,'0359,',686,'451',625,668,'krn:{"',698,699,'469',306,742,'361,0.615,0,{',686,'572',279,898,371,'485',625,'0359,',725,371,'716',625,'0269,',686,'572',279,898,371,'49',651,541,'0359,',742,'465',625,'044,',742,'322',279,898,371,'384',261,',{',686,'636',261,',{',778,'5,0.714',',0,{ic:0.','154}],[0.278',247,'399}]],cmsy10:[[',302,'0.278,0.444,-0.0556],[',302,852,302,'0.5,0.444,-0.0556],[',302,302,302,302,302,302,302,'1',286,1159,1159,'0.778',849,'0.778,0.464,-0.0363','],[0.778,0.636,0.136',1174,1174,1174,1174,1174,'],[0.778',334,'0.778,0.483,-0.0169],[0.778',878,'0.778',878,'1',878,'1',878,'0.778',878,'0.778',878,'1',334,'1',334,'0.5',286,'0.5',286,'1',334,'1',286,'1',286,'0.778',849,'1',334,'1',334,'0.611',286,'0.611',286,'1',334,'1',286,'1',286,'0.778',259,'275,0.556],[1',259,'667',878,'0.667',878,'0.889',286,'0.889',286,'0',286,'0',334,'0.556',251,'556',251,'667',259,'5',288,'722',251,'722',251,'778',251,'778',251,'611',251,'798',342,'48":0.','194}}],[0.657',468,'0304',',krn:{"48":0.',900,'527',468,'0583',1264,900,'771',468,'0278',1264,429,'528',468,'0894',1264,'111}}],[0.','719',468,'0993',1264,1280,'595',',0.683,0.0972,{ic:0.','0593',1264,1280,'845',468,'00965',1264,1280,'545',468,'0738,krn:{"48":',371,'678',1287,'185',1264,941,'762',468,'0144',1264,699,'69',342,1260,'139}}],[1.2',342,1260,900,'82',468,'147',1264,429,'796',468,1273,1264,1280,'696',468,'0822',1264,429,'817,0.683,0.0972,{krn:{"',1260,1280,'848',342,1260,429,'606',468,'075',1264,900,'545',468,'254,krn:{"48":',371,'626',468,'0993',1264,429,'613',468,'0822,krn:{"48":',371,'988',468,'0822',1264,429,'713',468,'146',1264,900,'668',1287,'0822',1264,429,'725',468,'0794',1264,900,'667,0.556],[0.',1377,1377,1377,1377,'611',251,'611',251,'444',298,'444',298,'444',298,'444',298,'5',298,'5',298,'389',298,'389',298,'278',298,'5',298,'5',298,'611',298,'5',298,'278',286,'0.833,0.04,0.96],[0.75',225,'833',225,'417',523,541,'111}],[0.',1377,'667,0.556',1174,1174,'],[0.444',286,'0.444',286,'0.444',286,'0.611',286,'0.778,0.694,0.13','],[',1434,'],[',1434,'],[',1434,']],cmex10:[[0.458',',0.04,1.16,{n:','16}],[0.458',1442,'17}],[0.417',1442,'104}],[0.417',1442,'105}],[0.','472',1442,'106}],[0.472',1442,'107}],[0.472',1442,'108}],[0.','472',1442,'109}],[0.583',1442,'110}],[0.583',1442,1421,'472',1442,'68}],[0.472',1442,'69}],[0.333',',0,0.6,{delim:{','rep:12}}],[0.556',1469,'rep:13}}],[0.578',1442,'46}],[0.578',1442,'47}],[0.597',',0.04,1.76,{','n:18}],[0.597',1477,'n:19}],[0.736',',0.04,2.36,{n:','32}],[0.736',1481,'33}],[0.528',1481,'34}],[0.528',1481,'35}],[0.583',1481,'36}],[0.583',1481,'37}],[0.583',1481,'38}],[0.583',1481,'39}],[0.75',1481,'40}],[0.75',1481,'41}],[0.75',1481,'42}],[0.75',1481,'43}],[1.04',1481,'44}],[1.04',1481,'45}],[0.792',',0.04,2.96,{n:','48}],[0.792',1509,'49}],[0.583',1509,'50}],[0.583',1509,'51}],[0.639',1509,'52}],[0.639',1509,'53}],[0.639',1509,'54}],[0.639',1509,'55}],[0.806',1509,'56}],[0.806',1509,'57}],[0.806',',0.04,2.96],[','0.806',1529,'1.28',1529,'1.28',1529,'0.811',1477,'n:30}],[0.811',1477,'n:31}],[0.875',1477,'delim:{top:','48,bot:64,rep:66}}],[0.875',1477,1542,'49,bot:65,','rep:67}}],[0.','667',1477,1542,'50,bot:52,rep:54}}],[0.667',1477,1542,'51,bot:53,rep:55}}],[0.667',1477,'delim:{bot:','52,rep:54}}],[0.667',1477,1556,'53,rep:55}}],[0.667',1469,'top:50,rep:54}}],[0.667',1469,'top:51,rep:55','}}],[0.889,0,0.9,{delim:{top:','56,mid:60,bot:58,rep:62',1565,'57,mid:61,bot:59,rep:62',1565,'56,bot:58,rep:62',1565,'57,bot:59,rep:62','}}],[0.889,0,1.8,{delim:{rep:','63',1573,'119}}],[0.889,0,0.3,{delim:{','rep:62}}],[0.','667',1469,'top:120,','bot:121,rep:63}}],[0.','875',1477,1542,'56,bot:59,',1577,'875',1477,1542,'57,bot:58,',1577,'875',1469,'rep:66}}],[0.875',1469,1547,'611',1477,'n:28}],[0.611',1477,'n:29','}],[0.833,0,1,{n:','71}],[1.','11,0.1,1.5],[','0.472,0,1.11,{ic:0.194,n:','73}],[0.556,0,2.22,{ic:0.444}],[1.','11,0,1,{n:','75}],[1.51',',0.1,1.5],[1.',1607,'77}],[1.51',1609,1607,'79}],[1.51',1609,'06,0,1,{n:88}],[','0.944,0,1,{n:','89}],[',1605,'90',1602,'91',1602,'92',1602,'93',1602,'94',1602,'95}],[1.44',1609,'28,0.1,1.5],[0.556,0',',2.22,{ic:0.444}],[1.11',1609,'11',1609,'11',1609,'11',1609,1604,1617,'97}],[1.',1632,'.722,0,{n:99','}],[1,0.75,0,{n:','100','}],[1.44,0.75],[0.','556,0.722,0,{n:102',1646,'103',1648,'472',1477,'n:20}],[0.472',1477,'n:21}],[0.528',1477,'n:22}],[0.528',1477,'n:23}],[0.528',1477,'n:24}],[0.528',1477,'n:25}],[0.667',1477,'n:26}],[0.667',1477,'n:27}],[1',1442,'113}],[1',1477,'n:114}],[1',1481,'115}],[1',1509,'116}],[1.06,0,1.8,{',1542,'118,bot:116,rep:117}}],[1.06,0,0.6],[1.06,0.04,0.56],[0.778',1469,'top:126,','bot:127,rep:119','}}],[0.667',1469,1580,'rep:63}}],[0.667',1469,1581,'45,0.12],[0.',1689,1689,1689,'778',1469,1681,'rep:119}}],[0.778',1469,1682,'}}]],cmti10:[[0.627',468,'133}],[0.818',225,'767',468,'094}],[0.692',225,'664',468,'153}],[0.743',468,'164}],[0.','716',468,'12}],[0.','767',468,1421,'716',468,'0599}],[0.767',468,1421,'716',468,'103}],[0.','613',523,541,'212,krn:{"39":0.104,"63":0.104,"33":0.104,"41":0.104,"93":0.104},lig:{"105":',249,'562',523,541,1725,'588',523,541,1725,'882',523,541,1725,'894',523,541,1725,'307',625,'0767}],[0.','332',651,541,'0374}],[0.511',251,'511',247,'0969','}],[0.511,0.','628',1150,'083}],[0.511',247,'108',1758,'562',1150,1725,'831',251,'46,0,0.17],[0.537',523,541,1449,'716',625,'0751}],[0.716',625,'0751',1758,'528',833,'0919}],[0.883',468,1714,'985',468,1714,'767,0.732,0.0486,{ic:0.094}],[0.256',279,'108":-0.256,"76":-0.321}}],[0.307',247,'124,lig:{"96":',282,'514',247,'0696}],[0.818',523,541,'0662}],[0.769',251,'818,0.75,0.0556,{ic:0.136}],[0.767',247,'0969}],[0.307',247,'124,krn:{"63":0.102,"33":0.102',296,'409',',0.75,0.25,{ic:0.','162}],[0.409',1808,'0369',1758,'75',1150,'149}],[0.767,0.562,0.0567,{ic:0.0369','}],[0.307,0.','106',304,'358',625,'0283,',307,'123}}],[0.307,0.106],[0.511',1808,'162}],[','0.511,0.644,0,{ic:0.136}],[',1826,1826,1826,'0.511',313,541,'136}],[',1826,1826,'0.511',313,541,'136}],[',1826,1826,'0.307',625,'0582',1816,'431',541,'0582',1816,'5',541,'0756}],[0.767,0.367,-0.133,{ic:0.0662',1758,'5',304,'511',247,'122,lig:{"96":62}}],[0.767',247,'096}],[0.743',375,'krn:{"110":-0.0256,"108":-0.0256,"114":-0.0256,"117":-0.0256,"109":-0.0256,"116":-0.0256,"105":-0.0256,"67":-0.0256,"79":-0.0256,"71":-0.0256,"104":-0.0256,"98":-0.0256,"85":-0.0256,"107":-0.0256,"118":-0.0256,"119":-0.0256,"81":-','0.0256,"84','":-0.0767,"','89',1864,'86','":-0.102,"','87',1868,'101":-0.0511,"97":-0.0511,"111":-0.0511,"100":-0.0511,"99":-0.0511,"103":-0.0511,"113":-0.0511}}],[0.','704',468,1725,'716',468,'145}],[0.','755',468,'094,krn:{"88','":-0.0256,"','87',1881,'65',1881,'86',1881,'89','":-0.0256}}],[0.','678',468,1714,'653',468,'133,krn:{"','111','":-0.0767,"101":-0.0767,"','117','":-0.0767,"114":-0.0767,"97":-0.0767,"','65',1868,'79":-0.0256,"67":-0.0256,"71":-0.0256,"81":-0.0256}}],[0.','774',468,'0872}],[0.743',468,1711,'386',468,'158}],[0.525',468,'14}],[0.769',468,'145,krn:{"',1902,'627',342,'84',1864,'89',1864,'86',1868,'87',1868,1871,'897',468,1711,'743',468,1711,'767',468,'094,krn:{"88',1881,'87',1881,'65',1881,'86',1881,'89',1889,'678',468,'103',',krn:{"65":-0.0767}}],[0.','767,0.683',541,'094}],[0.729',468,'0387,',1862,'0.0256,"84',1864,'89',1864,'86',1868,'87',1868,1871,'562',468,1714,'716',468,1895,'121',1897,'111',1899,'117":-0.0767,"65":-0.0767}}],[0.','743',468,1711,'743',468,'184,krn:{"111',1897,'117',1899,'65',1868,1902,'999',468,'184',1948,'743',468,'158,krn:{"',1902,'743',468,'194,',488,1864,'111',1899,1974,'613',468,1877,'307',1808,'188}],[0.514',247,'169}],[0.307',1808,1449,'511',247,'0665',1816,'668',1150,'118}],[0.307',247,1792,513,'511',625,1749,'46',247,'0631,krn:{"',1871,'46',625,'0565,krn:{"',1871,'511',247,'103,krn:{"108":0.0511}}],[0.46',625,'0751,krn:{"',1871,'307',523,541,1729,539,'46',651,541,'0885}],[0.511',247,'0767',1816,'655',1150,'102',1816,'655',541,1877,'46',247,1456,'256',822,'i'], |
|
['c:0.103',',krn:{"108":0.0511}}],[0.','818',',0.431,0,{ic:0.','0767}],[0.','562',3,'0767,krn:{"39":-0.102','}}],[0.','511',3,'0631',',krn:{"101":-0.0511,"97":-0.0511,"111":-0.0511,"100":-0.0511,"99":-0.0511,"103":-0.0511,"113":-0.0511}}],[0.','511',',0.431,0.194,{ic:0.','0631',12,'46',14,'0885}],[0.','422',3,'108',12,'409',3,'0821}],[0.332,0.615,0,{ic:0.0949}],[0.537',3,4,'46',3,'108}],[0.664',3,'108',1,'464',3,'12}],[0.486',14,19,'409',3,'123}],[0.511',3,'0921',',lig:{"45":124}}],[1.','02',3,'0921}],[0.511,0.694,0,{ic:0.122','}],[0.511,0.668,0,{ic:0.','116',49,'105}]],cmbx10:[[0.692',',0.686],[0.','958',53,'894',53,'806',53,'767',53,'9',53,'831',53,'894',53,'831',53,'894',53,'831',53,'671',',0.694,0,{ic:0.109,krn:{"39":0.109,"63":0.109,"33":0.109,"41":0.109,"93":0.109},lig:{"105":','14,"108":15',8,'639',',0.694],[0.','639',79,'958',79,'958',79,'319',',0.444],[0.','351',',0.444,0.194','],[0.575,0.','694',90,'694',90,'632',90,'694',90,'596],[0.869',79,'511,0,0.17],[0.597',79,'831',87,'894,0.444',90,'542,0.0972],[1.04,0.686],[1.17',53,'894,0.735,0.0486],[0.319',',0.444,0,{krn:{"','108":-0.319,"76":-0.378',8,'35',',0.694,0,{lig:{"96":','60',8,'603',79,'958,0.','694,0.194',90,'75,0.0556],[0.',119,122,'894',79,'319',',0.694,0,{krn:{"','63":0.128,"33":0.128},lig:{"39":34',8,'447',',0.75,0.25],[0.','447,0.75,0.25',90,'75],[0.894,0.633,0.133],[','0.319,0.156',',0.194],[0.','383',',0.444,0',',{lig:{"45":123}}],[',136,90,'75,0.25',90,'644',90,'644',90,'644',90,'644',90,'644',90,'644',90,'644',90,'644',90,'644',90,'644],[0.319',87,'319',89,'],[0.35,0.5',137,'894,0.391,-0.109],[0.543,0.5',137,'543',114,'62',8,'894',79,'869',',0.686,0,{krn:{"','116','":-0.0319,"','67',180,'79',180,'71',180,'85',180,'81',180,'84":-0.0958,"89":-0.0958,"86":-0.128,"87":-0.128}}],[','0.818',53,'831',53,'882',178,'88',180,'87',180,'65',180,'86',180,'89','":-0.0319}}],[0.','756',53,'724,0.686,0,{','krn:{"111":-0.0958,"101":-0.0958,"117":-0.0958,"114":-0.0958,"97":-0.0958,"65":-0.128,"79":-0.0319,"67":-0.0319,"71":-0.0319,"81":-0.0319}}],[','0.904',53,'9',53,'436',178,'73":0.0319',8,'594',53,'901',178,'79',180,'67',180,'71',180,'81',207,'692',178,191,'1.09',53,'9',53,'864',178,'88',180,'87',180,'65',180,'86',180,'89',207,'786',178,'65":-0.0958,"111',180,'101',180,'97',180,'46":-0.0958,"44":-0.0958}}],[0.','864,0.686',137,'862',178,'116',180,'67',180,'79',180,'71',180,'85',180,'81',180,191,'0.639',53,'8',178,'121',180,'101":-0.0958,"111":-0.0958,"114":-0.0958,"97":-0.0958,"65":-0.0958,"117":-0.0958}}],[0.','885',53,'869,0.686,0,{ic:0.','016,',211,'1.19,0.686,0,{ic:0.016,',211,'0.869',178,'79',180,'67',180,'71',180,'81',207,286,'0287,krn:{"',283,'703',53,'319',132,'603',79,'319,0.75,0.25',90,'694],[0.319',79,'319',114,'92',8,'559',110,'118',180,'106":0.0639,"121',180,'119',207,'639,0.694,0',',{krn:{"101":0.0319,"111":0.0319,"120":-0.0319,"100":0.0319,"99":0.0319,"113":0.0319,"118":-0.0319,"106":0.0639,"121":-0.0319,"119":-0.0319}}],[0.','511',110,'104',180,'107',207,'639',79,'527',87,'351',75,'12,"102":11,"108":13',8,'575',89,',{ic:0.016,krn:{"','106":0.0319',8,'639',128,'116',180,'117',180,'98',180,'121',180,'118',180,'119',207,'319',79,'351,0.694',137,'607',128,'97":-0.0639,"101',180,'97',180,'111',180,'99',207,'319',79,'958',110,'116',180,'117',180,'98',180,'121',180,'118',180,'119',207,'639',110,'116',180,'117',180,'98',180,'121',180,'118',180,'119',207,'575',139,327,'639',89,327,'607',89,'],[0.474',87,'454',87,'447,0.635,0,{krn:{"121',180,'119',207,'639',110,'119',207,'607',139,344,'97":-0.0639,"101',180,'97',180,'111',180,'99',207,'831',139,344,'101',180,'97',180,'111',180,'99',207,'607',87,'607',89,344,'111',180,'101',180,'97',180,259,'511,0.444',90,'444,0,{ic:0.0319',45,'15,0.',461,'}],[0.575,0.694',90,'694',90,'694]]};','jsMath.Img','={fonts:[50,60,70,85,100,120,144,173,207,249,298,358,430],w:{"50":6.9,"60":8.3,"70":9.7,"85":11.8,"100":13.9,"120":16.7,"144":20,"173":24,"207":28.8,"249":34.6,"298":41.4,"358":49.8,"430":59.8},best:4,update:{},factor:1,loaded:0,SetFont',':function(','_8f){for(var _90 in _8f){if(!','this.update[_90',']){',474,']=[];}',474,']=',474,'].concat(_8f[_90]);}},AddFont',472,'_91,def){if(!',470,'[_91]){',470,'[_91]={};}','jsMath.Add(',470,'[_91],def);},UpdateFonts',':function(){','var _93=this.update;','if(!this.loaded){','return;}var ','_94=this[','jsMath.Img.fonts','[this.best]];','for(var _95 in _93){','for(var i=0;i<','_93[_95].length;i++){var c=_93[_95][i];if(c=="all"){for(c in ','jsMath.TeX[','_95]){',501,'_95][c].img','={};}}else{',501,504,'={};}}}this.update={};},BestSize',491,'var w=jsMath.em*this.factor;var m=','this.w[this.fonts[','0]];for(var i=1;i<','this.fonts','.length;i++){','if(w<(',511,'i]]+2*m)/3){','return ','i-1;}m=',511,'i]];}',518,'i-1;},Scale',491,493,'return;}this.best=this.BestSize();this.em=',470,'.w[',513,497,'this.scale','=(jsMath.em/this.em);','if(Math.abs(',531,'-1)<0.12){',531,'=1;}},URL',472,'_9b,_9c,C){var _9e=(','jsMath.Controls.cookie.','alpha)?"/alpha/":"/plain/";if(C==null){C="def.js";}else{C="char"+C+".png";}if(_9c!=""){_9c+="/";}','return this.','root+_9b+_9e+_9c+C;},LoadFont',472,'_9f){',493,'this.Init();}jsMath.Setup.Script(this.URL(_9f,""));},Init',491,'if(',540,'print){',540,'print=0;this.factor*=3;if(jsMath.window.location.protocol!="file:"){jsMath.Controls.SetCookie(0);}if(','jsMath.Browser.','alphaPrintBug){',540,'alpha=0;}}var _a0="0123456789ABCDEF";this.HexCode=[];',499,'128;i++){var h=Math.floor(i/16);var l=i-16*h;this.HexCode[i]=_a0.charAt(h)+_a0.charAt(l);}this.loaded=1;}};jsMath.HTML={Em',472,'m){var n=5;if(m<0){n++;}',533,'m)<0.000001){m=0;}var s=String(m);s=s.replace(/(\\.\\d\\d\\d).+/,"$1");',518,'s+"em";},Spacer',472,'w){if(w==0){return "";}return "<','span class=\\"spacer\\" style=\\"margin-','left:"+this.Em(','w)+"\\"></span>";},Blank',472,'w,h,d,_ab){var _ac="";var _ad="";if(_ab){_ad+="border-',569,'w)+" solid;";if(',554,'widthAddsBorder){w=0;}}if(w==0){if(',554,'blankWidthBug){_ad+="width:1px;";_ac="<',568,'right:-1px\\"></span>";}}else{_ad+="width:"+this.Em(w)+";";}if(d==null){d=0;}if(h){var H=this.Em(h+d);if(_ab&&h>0&&h*jsMath.em<1.5){H="1px";h=1/jsMath.em;}_ad+="height:"+H+";";}if(',554,'mozInlineBlockBug){d=-h;}if(',554,'msieBorderBug&&!_ab){d-=jsMath.d;}if(d){_ad+="','vertical-align:"+','this.Em(-d);}',518,'_ac+"<span class=\\"blank\\" ','style=\\""+','_ad+"\\"></span>";},Rule',472,'w,h){if(h==null){h=jsMath.TeX.default_rule_thickness;}',542,'Blank(w,h,0,1);},Class',472,'_b1,_b2){return "<span class=\\""+_b1+"\\">"+_b2+"</span>";},Place',472,'_b3',',x,y){if(Math.abs(x)<0.0001){x=0;}if(Math.abs(y)<0.0001){y=0;}','if(x||y){var _b6','="<span style=\\"position',': relative',';";if(x){_b6+=" margin-',569,'x)+";";}if(y){_b6+=" ','top:"+this.Em','(-y)+";";}_b3=_b6+"\\">"+_b3','+"</span>";}',518,'_b3;},PlaceSeparateSkips',472,'_b7',599,'if(y){_b7',601,602,'; ',606,'(-y)+";"+"\\">"+_b7',608,'if(x){_b7=this.Spacer(x)+_b7',';}return ','_b7;},PlaceAbsolute',472,'_ba',599,'_ba',601,':absolute','; ',569,'x)+"; "+"',606,'(y)+";\\">"+_ba+" </span>";',518,'_ba;},Absolute',472,'_bd,w,h,d,y,H){if(y!="none"){',533,'y)<0.0001){y=0;}_bd',601,629,'; "+"top:"+','jsMath.HTML.','Em(y)+"; left:0em',';\\">"+_bd','+" "+"</span>";}if(d=="none"){d=0;}_bd+=this.Blank(w,h-d,d);if(',554,'msieAbsoluteBug){_bd',601,':relative',646,608,'_bd',601,651,';"+" width: "+',644,'Em(w)+";"+" height: "+',644,'Em(H)+";"+',554,'msieInlineBlockFix+"\\">"+_bd+"</span>";',518,'_bd;}};','jsMath.Box','=function(','_c3,_c4,w,h,d){if(d==null){d=jsMath.d;}this.type="typeset";this.w=w;this.h=h;this.d=d;this.bh=h;this.bd=d;this.x=0;this.y=0;','this.html=','_c4;this.format=_c3;};',488,666,',{defaultH:0,Null:','new jsMath.Box("','null","",0,0,0),Text',472,'_c8,_c9,_ca,_cb,a,d){var _ce=','jsMath.Typeset.AddClass(','_c9,_c8);_ce=','jsMath.Typeset.','AddStyle(','_ca,_cb,_ce);var BB','=jsMath.EmBoxFor(','_ce);var TeX=',680,'TeX(_ca,_cb);var bd=((_c9=="cmsy10"||_c9=="cmex10")?BB.h-TeX.h:TeX.d*BB.h/TeX.hd);','var box=',674,'text",_c8,BB.w,BB.h-bd,bd);box.style=_ca;box.size=_cb;','box.tclass','=_c9;if(d','!=null){box.','d=d','*TeX.scale;}else{box.','d=0;}if(a==null||a==1){box.h=0.9*TeX.M_height;}else{box.h=1.1*TeX.x_height+TeX.scale*a;}','return box;},','TeX',472,'C,_d4,_d5,_d6){var c=',501,'_d4][C];if(','c.d==null){c.d=0;}','if(c.h','==null){c.','h=0',';}if(c.img!=null','&&c.c!=""){this.TeXIMG(_d4,C,',680,'StyleSize(_d5,_d6));}var _d8=',680,'TeX(_d5,_d6).scale;var h=c.h+',501,'_d4].dh;',687,674,'text",c.c,c.w*_d8,h*_d8,c.d*_d8);box.style=_d5;box.size=_d6;if(c.tclass){',690,'=c.tclass;if(c.img){box.bh=c.img.bh;box.bd=c.img.bd;}else{box.bh=_d8*jsMath.h;box.bd=_d8*jsMath.d;}}else{',690,'=_d4;box.bh=_d8*',501,'_d4].h;box.bd=_d8*',501,'_d4].d;if(',554,'msieFontBug&&box.html.match(/&#/)){box.html+="<span style=\\"display',': none\\">x</span>";}}',696,'TeXfallback',472,'C,_dc,_dd,_de','){c=',501,'_dc][C];if(!c.tclass){c.tclass=_dc',706,'){',542,'TeXnonfallback(',731,');}if(c.h!=null&&c.a',704,'a=c.h-1.1*jsMath.TeX.x_height;}',687,'this.Text(c.c,c.tclass,_dd,_de,c.a,c.d);var _e0=',680,'TeX(_dd,_de).scale;if(c.bh',692,'bh=c.bh*_e0;box.bd=c.bd*_e0;}else{var h=box.bd+box.bh;var _e2=',678,690,',box.html);_e2=',680,681,'_dd,_de,_e2);box.bd',683,'_e2+',644,'Blank(1,h)).h-h;box.bh=h-box.bd;if(_e0==1){c.bh=box.bh;c.bd=box.bd;}}if(jsMath.',726,':none\\">x</span>";}',696,'TeXIMG',472,'_e3,C,_e5){var c=',501,'_e3][C];if(c.img.size!=null&&c.img.size==_e5&&c.img.best!=null&&c.img.best==','jsMath.Img.best','){',494,'_e7=(',470,'.scale!=1);var id=',767,'+_e5-4;if(id<0){id=0;_e7=1;}else{if(id>=',496,'.length){','id=',496,'.length-1',';_e7=1;}}var _e9=',470,'[',496,'[id]];var img=_e9[_e3][C];var _eb=1/',470,'.w[',496,'[id]];if(id!=',767,'+_e5-4){if(c.w!=null){_eb=c.w/img[0];}else{_eb*=',496,'[_e5]/',496,'[4]*',496,'[',767,']/',496,'[id];}}var w=img[0]*_eb;var h=img[1]*_eb;var d=-img[2]*_eb;var v;var _f0=(c.w==null||Math.abs(c.w-w)<0.01)?"":" margin-right:"+',644,'Em(c.w-w)+";";var _f1="";C=',470,'.HexCode[C];if(!_e7&&!',540,'scaleImg){if(2*w<h||(',554,'msieAlphaBug&&',540,'alpha)){_f1="height',':"+(img[1]*',554,'imgScale',')+"px;";}_f1+=" width:"+(img[0]*',554,813,')+"px;";v=-img[2]+"px";}else{if(2*w<h||(',554,'msieAlphaBug&&',540,810,':"+',644,'Em(h*',554,813,')+";";}_f1+=" width:"+',644,'Em(w*',554,813,')+";";v=',644,'Em(d);}var _f2=(Math.abs(d)<0.01&&!',554,'valignBug)?"":" ',585,'v+";";var URL=',470,'.URL(_e3,',496,'[id],C);if(',554,'msieAlphaBug&&',540,'alpha){','c.c="<img src=\\""+','jsMath.blank+"\\" "+"',589,554,'msieCenterBugFix+_f1+_f2+_f0','+" filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+"\'"+URL+"\', sizingMethod=\'scale\'"+");\\" />";}else{',847,'URL+"\\" ',589,554,851,'+"\\" />";}c.tclass="normal";c.img.bh=h+d;c.img.bd=-d;c.img.size=_e5;c.img.best=',767,';},Space',472,'w){',518,674,'html",',644,'Spacer(w),w,0,0);},Rule',472,592,'var _f7=',644,'Rule(w,h);',518,674,865,'_f7,w,h,0);},GetChar',472,'_f8,_f9){var c=',501,'_f9][_f8];','if(c.img!=null){this.TeXIMG(','_f9,_f8,4);}if(c.tclass',704,'tclass=_f9;}if(!c.computedW){c.w',683,678,'c.tclass,c.c)).w',';if(c.h==null){c','.h=jsMath.Box.defaultH;}if(',702,'c.computedW=1',622,'c;},DelimBestFit',472,'H,c,_fd,_fe){if(c==0&&_fd','==0){return null;}','var C;var h;_fd','=jsMath.TeX.fam[','_fd];var isSS=(_fe.charAt(1)=="S");var isS=(_fe.charAt(0)=="S");while(c!=null){C=',501,'_fd][c];if(C.h==null){C',889,'C.d==null){C.d=0;}h=C.h+C.d;if(C.delim','){return [c,_fd',',"",H];}if(isSS&&0.5*h>=H',904,',"SS",0.5*h];}if(isS&&0.7*h>=H',904,',"S",0.7*h];}if(h>=H||C.n==null',904,',"T",h];}c=C.n',622,'null;},DelimExtendRelative',472,'H,c,font,a,','_107){var C=',501,'font][','c];var top=this.GetChar(C.delim.top?C.delim.top:C.delim.rep,font);var rep=this.GetChar(C.delim.rep,font);var bot=this.GetChar(C.delim.bot?C.delim.bot:C.delim.rep,font);','var ext=',678,'rep.tclass,rep.c);','var w=rep.w;var h=','rep.h+rep.d',';var y;var dx;','if(C.delim.mid){var mid=this.GetChar(C.delim.mid,font);var n=Math.ceil((H-(top.h+top.d)-(mid.h+mid.d',')-(','bot.h+bot.d','))/(2*(',924,')));H=2*n*(',924,')+(top.h+top.d)+(','mid.h+mid.d',')+(',928,');if(_107){y=0;}else{y=H/2+a;}var Y=y',';var html=',644,'Place(',678,'top.tclass,top.c),0,','y-top.h)+',644,940,678,'bot.tclass,bot.c),-(','top.w+bot.w)/2,y-(H-bot.d))+',644,940,678,'mid.tclass,mid.c','),-(bot.w+mid.w)/2,y-(H+mid.h-mid.d)/2);dx=(w-mid','.w)/2;if(Math.abs(dx)<0.0001){dx=0;}if(dx){html+=jsMath.HTML.Spacer(dx);}y-=top.h+top.d+rep.h;for(var i=0;i<n;i++){html+=jsMath.HTML.Place(ext,-w,y-i*h);}','y-=H/2-rep.h/2;',499,'n;i++){','html+=',644,940,'ext,-w,y-i*h);}}','else{var n=Math.ceil((H-(top.h+top.d)-(bot.h+bot.d','))/(',924,'));if(top.h+top.d<0.9*(',924,')){n=Math.max(1,n);}H=n*(',924,933,928,');if(_107){y=0;}else{y=H/2+a;}var Y=y',938,644,940,678,942,'y-top.h);dx=(w-top',954,958,644,940,678,947,'w+bot.w)/2,Y-(H-bot.d));}if(_107){h=top.h;}else{h=H/2+a;}','var box=new jsMath.Box("html",html,rep.w,h,H-h);box.bh=jsMath.TeX[font].h;box.bd=jsMath.TeX[font].d;return box;},','DelimExtendAbsolute',472,915,'_120){var Font=',501,'font];var ','C=Font[',919,926,'-0.05)-(',928,'-0.05))/(','2*(','rep.h+rep.d-0.05',')));H=2*n*(',999,933,934,'-0.05)+(',928,'-0.05);html=','jsMath.HTML.PlaceAbsolute(',678,942,'0);var h=',999,';var y=top.d-0.05+rep.h;var ext=',678,'font,rep.c);',499,'n;i++){',958,1007,'ext,0,y+i*h);}',958,1007,678,952,'),0,y+n*h-rep.h+mid.h);y+=n*h+',934,'-0.05;',499,'n;i++){',958,1007,'ext,0,y+i*h);}',958,1007,678,'bot.tclass,bot.c),0,y+n*h-rep.h+bot.h);}',962,997,999,'));H=n*(',999,933,928,'-0.05);html=',1007,678,942,'0);var h=',999,';var y=top.d-0.05+rep.h;var ext=',678,922,499,'n;i++){',958,1007,'ext,0,y+i*h);}',958,1007,678,1035,'var w=top.w;if(_120){h=top.h;y=0;}else{h=H/2+a;y=h-top.h;}html=',644,'Absolute(html,w,','Font.h,"none",-y,top.h);',985,'Delimiter',472,'H,_135,_136,_137){var size=4;var TeX=',680,'TeX(_136,size);if(!_135){',542,'Space(TeX.nulldelimiterspace);}','var ','CFSH=this.DelimBestFit(H,_135[','2],_135[1],_136);if(CFSH==null||CFSH[3]<H){',1074,'4],_135[3],_136);}if(CFSH==null){',542,1072,'if(CFSH[2]==""){',542,'DelimExtend(H,','CFSH[0],CFSH[1],','TeX.axis_height',',_137);}box=',666,'.TeX(',1083,'CFSH[2],size',').Styled();if(_137){box.y=-',501,'CFSH[1]].dh',694,'y=-((box.h+box.d)/2-box.d-',1084,');}',533,'box.y)<0.0001){box.y=0;}if(box.y','){box=jsMath.Box.SetList','([box],',1089,');}',696,'GetCharCode',472,'code){var font',898,'code[0]];var Font=',501,991,'c=Font[code[1]];',881,'font,code[1],4);}if(c.w',704,'w',683,678,887,';}if(c.font',704,'font=font',622,'c;},AddClass',472,'_13f,html',',font){if(_13f==null){_13f=font',622,678,1125,');},LayoutRelative',472,'size,_143,_144,_145){if(_144==null){_144=[];}if(_145==null){_145=[];}var _146=jsMath.sizes[size]/100',';var W=[];var H=[];var D=[];var ','_14a=-1000;var bh=_14a;var bd=_14a',';var i;var j;var row;for(i=0;i<','_143',514,'row=_143','[i];H[i]=jsMath.h*','_146',';D[i]=jsMath.d*','_146',';for(j=0;j<','row.length;j++){row[j]=row[j].Remeasured();if(row[j].h>H[i]){H[i]=row[j].h;}if(row[j].d>D[i]){D[i]=row[j].d;}if(j>=W.length){W[j]=row[j].w;}else{if(row[j].w>W[j]){W[j]=row[j].','w;}}if(row[j].bh>bh){bh=row[j].bh;}if(row[j].bd>bd){bd=row[j].bd;}}}if(bh==_14a){bh=0;}if(bd==_14a){bd=0;}','var HD=(jsMath.hd-0.01)*','_146;','var html="";var ','pW=0;var cW=0;var w;var h;var y;var box;var _158;var _159',';for(j=0;j<W.length;j++){','_158=[];y=-H[0];pW=0',';for(i=0;i<','_143',514,'_159=_143[i][j];if(_159&&_159','.format!="null"){if(','_144[j]=="l"){w=0;}else{if(_144[j]=="r"){w=W[j]-_159.w;}else{w=(W[j]-_159.w)/2;}}_159.x=w-pW;pW=_159.w+w;_159.y=y;_158[_158.length]=_159;}if(i==_143',779,'){y-=D[i];}else{y-=','Math.max(HD,D[i]+H[i+1])+','_146/10;}}if(_145[j]==null){_145[j]=_146;}if(_158.length>0',1099,'(_158,"T",size);',958,644,940,'box.html,cW,0);cW=W[j]-box.w+_145[j];}else{cW+=_145[j];}}w=-_145[W',779,'];y=(H',779,')*_146/10',1152,'W',514,'w+=W[i]+_145[i];}','for(i=0;i<H.length;i++){y+=Math.max(HD,H[i]+D[i]);}h=y/2+jsMath.TeX.axis_height;var d=y-h;',958,644,'Spacer(cW-_145[W',779,']+_146/6);html=',644,940,'html,_146/6,h);box=',674,'html",html,w+','_146/3,h,d);box.bh=bh;box.bd=bd;',696,'LayoutAbsolute',472,'size,_15c,_15d,_15e){if(_15d==null){_15d=[];}if(_15e==null){_15e=[];}var _15f=jsMath.sizes[size]/100;',1146,'_15f',1133,'w=0;var h;var x;var y',1135,'_15c',514,'row=_15c',1139,'_15f',1141,'_15f',1143,1144,'w;}}}}y=(H',779,')*_15f/6;',1176,1148,'_16d;w=_15f/6',1150,'y=H[0]-h',1152,'_15c',514,'_16d=_15c[i][j];if(_16d&&_16d',1156,'_15d[j]=="l"){x=0;}else{if(_15d[j]=="r"){x=W[j]-_16d.w;}else{x=(W[j]-_16d.w)/2;}}',958,1007,'_16d.html,w+x,y-Math.max(0,_16d.bh-jsMath.h*_15f));}if(i==_15c',779,'){y+=D[i];}else{y+=',1160,'_15f/6;}}if(_15e[j]==null){_15e[j]=_15f;}w+=W[j]+_15e[j];}w=-_15e[W',779,']+_15f/3',1152,'W',514,'w+=W[i]+_15e[i];}html=',644,'Spacer(_15f/6',')+html+',644,1234,');if(',554,'spanHeightVaries){y=h-jsMath.h;}else{y=0;}html=',644,1063,'h+d,d,y,H[0]);',687,674,1186,'_15f/3,h,d);',696,'InternalMath',472,'text,size){if(!text.match(/\\$|\\\\\\(/)){',542,'Text(text,"normal","T",size).Styled();}var i=0;var k=0;var c;var _174="";var _175=[];var _176;var html;var box;while(i<text',776,'c=text.charAt(i++);if(c','=="$"){if(_174=="$"){','_176=jsMath.Parse(text.slice(k,i-','1','),null,size);if(_176.error){_175[_175.length]=this.Text(_176.error,"error","T",size,1,0.2);}else{_176.Atomize();_175[_175.length]=_176.mlist.Typeset("T",size).Styled();}_174="";k=i',';}else{','_175[_175.length]=this.Text(text.slice(k',',i-1','),"normal","T",size,1,0.2);','_174="$";k=i;}}else{if(c=="\\\\"){',1255,'=="("&&_174==""){',1261,',i-2',1263,'_174=")";k=i;}else{if(c==")"&&_174==")"){',1257,'2',1259,';}}}}}',1261,1263,542,'SetList(_175,"T",size);},Set',472,'box',',_17a,size',',_17c){if(box&&box.type){','if(box.type=="typeset"){',518,'box;}if(box.type=="mlist"){box.mlist.Atomize(_17a,size);',518,'box.mlist.Typeset(_17a,size);}if(box.type=="text"){box=this.Text(box.text,',690,1281,',box.ascend,box.descend',');if(_17c!=0){box.Styled();}return box;}','box=this.TeX(box.c,box.font',1281,1291,518,666,'.Null;},SetList',472,'_17d,_17e,size){var _180=[];var box;',499,'_17d',514,'box=_17d[i];',1283,'box=','jsMath.mItem','.Typeset(box);}_180[_180.length]=box;}var _183=new jsMath.Typeset(_180);',518,'_183.Typeset(_17e,size);}});','jsMath.Package(jsMath.','Box,{Styled',491,'if(this.format=="text"){',669,678,'this.tclass',',this.html);',669,680,681,'this.style,this.size',1317,'delete this.','tclass;',1323,'style;this.format="html";}',518,'this;},Remeasured',491,'if(this.w>0&&!this.html.match(/position: ?absolute/)){this.w',683,'this.html).w',622,'this;}});',1306,667,'type,def){this.type=type;',488,'this,def);};',488,1306,',{Atom',472,'type,_187','){return new jsMath.mItem','(type,{atom:1,nuc',':_187});},TextAtom',472,'type,text,_18a,a,d){var atom=new ',1306,1346,':{type:"text",text:text,tclass:_18a}});if(a','!=null){atom.nuc.','ascend=a;}if(d',1353,'descend=d',622,'atom;},TeXAtom',472,'type,c,font',1345,1346,':{type:"TeX",c:c,font:font}});},Fraction',472,'name,num,den,_194,left,_196',1345,'("fraction",{from:name,num:num,den:den,thickness:_194,left:left,right:_196});},Space',472,'w',1345,'("space",{w:w});},Typeset',472,'box',1345,'("ord",{atom:1,nuc:box});},HTML',472,'html',1345,'("html",{html:html});}});jsMath.mList',667,'list,font,size,_19d){if(list){','this.mlist','=list;}else{',1382,'=[];}if(_19d==null){_19d="T";}if(size==null){size=4;}this.data={openI:null,overI:null,overF:null,font:font,','size:size,style:_19d','};this.init={',1386,'};};',1310,'mList,{Add',472,'box){return (',1382,'[','this.mlist.length',']=box);},Get',472,'i){',542,'mlist[i];},Length',491,518,1396,';},Last',491,'if(',1396,896,542,'mlist[',1396,'-1];},Range',472,'i,j){if(j==null){j=',1396,622,'new jsMath.mList','(',1382,'.slice(i,j+1));},Delete',472,1415,'i;}if(',1382,'.splice){',1382,'.splice(i,j-i+1);}else{var _1a4=[];for(var k=0;k<',1396,';k++){if(k<i||k>j){_1a4[_1a4.length]=',1382,'[k];}}',1382,'=_1a4;}},Open',472,'left){',687,'this.Add(new ',1306,'("boundary",{','data:this.data}));var _1a8=this.data;this.data={};for(var i in _1a8){this.data[i]=_1a8[i];}',1323,'data.overI;',1323,'data.overF;this.data.openI=',1396,'-1;if(left',692,'left=left;}',696,'Close',472,'_1aa){if(_1aa!=null){_1aa=new ',1306,1440,'right:_1aa});}var atom;var open=this.data.openI;','var over=this.data.overI;var from=this.data.overF;','this.data=',1382,'[open].data;if(over){','atom=jsMath.mItem.Fraction(from.name,{type:"mlist",mlist:this.Range(open+1,over-1)},{type:"mlist",mlist:this.Range(over)},from.thickness,from.left,from.right);','if(_1aa){var _1af=',1418,'([',1382,'[open],atom,_1aa]);atom=',1306,'.Atom("inner','",{type:"mlist",mlist:','_1af});}}else{var _1b0=open+1;if(_1aa){this.Add(_1aa);_1b0--;}atom=',1306,'.Atom((_1aa)?"inner":"ord',1469,'this.Range(_1b0)});}this.Delete(open,this.Length());',542,'Add(atom);},Over',491,1457,'var ',1461,1382,'=[atom];},Atomize',472,'_1b4,size){var _1b6;var prev="";this.style=_1b4;this.size=size;',499,1396,';i++){_1b6=this.mlist['], |
|
['i];','_1b6','.delta=0',';if(',1,'.type=="','choice"){','this.mlist','=this.Atomize.choice(','this.style',',',1,',i,',7,');i--;}','else{if(','this.Atomize[_1b6.type',']){var f=',16,'];f(',9,',','this.size',',',1,',prev,this,i);}}prev=',1,';}if(',1,'&&',1,5,'bin"){',1,'.type="ord','";}if(',7,'.length>=2&&',1,5,'boundary"&&',7,'[0].type=="boundary"){this.','AddDelimiters','(_1b4,size);}},',43,':function(','_1ba,size){var _1bc=-10000;var h=_1bc;var d=_1bc;for(var i=0;i<',7,'.length;i++){','mitem=',7,'[i];if(mitem.atom||mitem',5,'box"){h','=Math.max(','h,','mitem.nuc.','h+',57,'y);d',55,'d,',57,'d-',57,'y);}}var TeX','=jsMath.TeX',';var a=','jsMath.Typeset.','TeX(_1ba,size).axis_height;var _1c2',55,'h-a,d+a);var H',55,'Math.floor(','TeX.integer','*_1c2/500)*TeX.delimiterfactor,',75,'*(2*_1c2-TeX.delimitershortfall))/',75,';var left=',7,'[0];var _1c5=',7,'[',7,'.length-1];left.nuc','=jsMath.Box.','Delimiter(H,','left.left',',_1ba);_1c5.nuc',87,88,'_1c5.right',',_1ba);left.type="open";left','.atom=1;delete ',89,';_1c5.type="close";_1c5',95,93,';},Typeset',46,'_1c6,size){var _1c8=new ','jsMath.Typeset','(',7,');return _1c8.Typeset(_1c6,size);}});jsMath.Add(jsMath.mList.prototype.Atomize,{style',46,'_1c9,size,_1cb,prev,_1cd){_1cd.style=_1cb.style;},size',46,'_1ce,size,_1d0,prev,_1d2){_1d2.size=_1d0.size;},phantom',46,'_1d3,size,_1d5){','var box','=_1d5.nuc',87,'Set(','_1d5.phantom',',_1d3',',size);','if(_1d5.h){box','.Remeasured();','box','.html=','jsMath.HTML.','Spacer(','box.w);}else{','box.html="",box.w=0;}if(!_1d5.v){','box.h=box.d=','0;}','box.bd=box.bh=0;delete ',117,';_1d5','.type="box";},','smash',46,'_1d7,size,_1d9){',113,'=_1d9.nuc',87,116,'_1d9.smash',',_1d7,','size).Remeasured();',128,130,141,';_1d9',133,'raise',46,'_1db,size,_1dd){','_1dd.nuc',87,116,152,',_1db',',size);var ','y=_1dd.raise;',152,123,124,'Place(',152,'.html,0,y);',152,'.h+=y;',152,'.d-=y;_1dd',34,'";_1dd.atom=1;},lap',46,'_1df,size,_1e1){',113,87,116,'_1e1.nuc',',_1df,',143,'var _1e3=[box];','if(_1e1.lap=="','llap"){','box.x=-box.w',';}else{',180,'rlap"){_1e3[1]=','jsMath.mItem.Space','(-',126,180,'ulap"){box.y=box.d;',128,'0',183,180,'dlap"){box.y=-box.h;',128,'0;}}}}',176,87,'SetList','(_1e3,_1df',119,180,'ulap"||_1e1.lap=="dlap"){',176,'.h=',176,'.d=0;}_1e1.type="box";delete _1e1.atom;},bin',46,'_1e4,size,_1e6',',prev){if(prev','){var type=prev.type;if(type=="bin','"||type=="','op',213,'rel',213,'open',213,'punct','"||type==""||(type=="',40,'prev.left!="")){_1e6',34,'";}}else{_1e6',34,'";}','jsMath.mList.prototype.Atomize.SupSub(',210,');},rel',46,'_1e9,size,_1eb',211,5,32,'prev',34,'";}',228,232,');},close',46,'_1ed,size,_1ef',211,5,32,'prev',34,'";}',228,243,');},',220,46,'_1f1,size,_1f3',211,5,32,'prev',34,'";}',228,255,');},open',46,'_1f5,size,_1f7','){',228,266,');},inner',46,'_1f8,size,_1fa','){',228,272,');},','vcenter',46,'_1fb,size,_1fd','){',113,87,116,'_1fd.nuc,_1fb',157,'TeX=',69,'TeX(_1fb',119,'box.y=','TeX.axis_height','-(box.h-box.d)/2;_1fd.nuc=box;_1fd',34,'";',228,279,');},','overline',46,'_200,size,_202','){var TeX=',69,'TeX(_200',157,'box',87,116,'_202.nuc',',',69,'PrimeStyle','(_200),',143,'var t=','TeX.default_rule_thickness',';var rule',87,'Rule(box.w,t);rule.x=-rule.w;rule.y','=box.h+3*t;',308,87,'SetList([box,','rule],_200',119,308,'.h+=t;_202',34,'";',228,300,');},','underline',46,'_207,size,_209','){var TeX=',69,'TeX(_207',157,'box',87,116,'_209.nuc',',',69,311,'(_207),',143,314,315,';var rule',87,318,'=-box.d-3*t-t;',342,87,322,'rule],_207',119,342,'.d+=t;_209',34,'";',228,334,');},radical',46,'_20e,size,_210','){var TeX=',69,'TeX(_20e',157,'Cp=',69,311,'(_20e);',113,87,116,'_210.nuc,Cp,',143,314,315,';var p=t;if(_20e=="D"||_20e=="D\'"){p=TeX.x_height;}var r=t+p/4;var surd',87,'Delimiter(','box.h+box.d','+r+t,[0,2,112,3,112],_20e,1);t=surd.h;if(surd.d>',386,'+r){r=(r+surd.d-box.h-box.d)/2;}surd.y=box.h+r;var rule',87,'Rule(box.w,t);rule.y=surd.y-t/2;rule.h+=3*t/2;',182,';var Cr=',69,'UpStyle(',69,395,'_20e));var root',87,116,'_210.root,Cr,',143,'if(_210.root){root.y=0.55*(',386,'+3*t+r)-box.d;surd.x',55,'root.w-(11/18)*surd.w,0);rule.x=(7/18)*surd.w;root.x=-(root.w+rule.x);}_210.nuc',87,200,'([surd,root,rule,box],_20e',119,'_210',34,'";',228,367,');},accent',46,'_21b,size',',_21d){var TeX=',69,'TeX(_21b',157,'Cp=',69,311,'(_21b);',113,87,116,'_21d.nuc',',Cp',157,'u=box.w;var s;var Font;if(',431,5,'TeX"){Font',67,'[',431,'.font];if(Font[',431,'.c].krn&&Font.skewchar){s=Font[',431,'.c].krn[Font.skewchar];}}if(s==null){s=0;}var c=_21d.accent[2];var font',67,'.fam[_21d.accent[1]];Font',67,'[font];while(Font[c].n&&Font[Font[c].n].w<=u){c=Font[c].n;}var _226=Math.min(box.h,TeX.','x_height);','if(',431,5,'TeX"){var ','_227=jsMath.mItem.Atom("ord",',431,');_227.sup=_21d.sup;_227.sub=_21d.sub;_227',2,';',228,419,',_227);_226+=(_227.nuc.h-box.h);box=',431,'=_227.nuc;delete _21d.sup;delete _21d.sub;}var acc',87,'TeX(c,font,',419,');acc.y=box.h-_226;acc.x=-box.w+s+(u-acc.w)/2;if(Font[c].ic){acc.x-=Font[c].ic*TeX.scale;}',431,87,322,'acc],',419,');if(',431,'.w!=box.w){var _229=',186,'(box.w-',431,'.w);',431,87,200,'([',431,',_229],',419,');}_21d',34,'";',228,419,',_21d);},op',46,'_22a,size,_22c','){var TeX=',69,'TeX(_22a',157,'box;_22c',2,';var isD=(_22a','.charAt(0)=="','D");if','(_22c.limits','==null&&isD){_22c.limits=1;}if(','_22c.nuc',5,454,'C',67,'[_22c.nuc.font][',507,'.c];if(isD&&C.n){',507,'.c=C.n;C',67,512,'C.n];}box',87,'Set(_22c.nuc,_22a,size',');if(C.ic){_22c','.delta=C.ic*TeX.scale;if',505,'||!_22c.sub||','jsMath.Browser.msieIntegralBug','){box',87,322,186,'(_22c.delta)],','_22a,size);}}','box.y=-((',386,')/2-box.d-',291,');if(Math.abs(box.y)<0.0001){box.y=0;}}if(!box){box',87,521,').Remeasured();}if',505,'){var W=box.w;var x=box.w;var _233=[box];var dh=0;var dd=0;if(_22c.sup){var sup',87,116,'_22c.sup,',69,395,'_22a),',143,'sup.x=((box.w-sup.w)/2+','_22c.delta/2)-x;','dh=TeX.big_op_spacing5;W',55,'W,sup.w);x+=sup.x+sup.w;sup.y=box.h+sup.d+box.y+Math.max(TeX.big_op_spacing1,TeX.big_op_spacing3-sup.d);','_233[_233.length]=','sup;delete _22c.sup;}if(_22c.sub){var sub',87,116,'_22c.sub,',69,'DownStyle','(_22a),',143,'sub.x=((box.w-sub.w)/2-',551,'dd=TeX.big_op_spacing5;W',55,'W,sub.w);x+=sub.x+sub.w;sub.y=-box.d-sub.h+box.y-Math.max(TeX.big_op_spacing2,TeX.big_op_spacing4-sub.h);',555,'sub;delete _22c.sub;}if(W>box.w){box.x=(W-box.w)/2;x+=box.x;}if(x<W){',555,186,'(W-x);}',507,87,200,'(_233,_22a',119,507,'.h+=dh;',507,'.d+=dd;}',15,526,'&&_22c.sub&&C&&C.ic){',507,87,322,'jsMath.Box.','Space(-C.ic*TeX.scale)],_22a,size);}',15,'box.y){',507,87,200,'([box],',532,228,495,');}},ord',46,'_238,size,_23a',',prev,_23c,i){if(_23a.nuc',5,'TeX"&&!_23a.sup&&!_23a.sub){var _23e=','_23c.mlist[','i+1];if(_23e&&_23e.atom&&_23e.type&&(_23e',5,'ord"||_23e',5,'op"||_23e',5,'bin"||_23e',5,'rel"||_23e',5,'open"||_23e',5,'close"||_23e',5,220,'")){if(_23e.nuc',5,'TeX"&&_23e.nuc.font==_23a.nuc.font){_23a.textsymbol=1;var krn',67,'[_23a.nuc.font][_23a.nuc.c].krn;krn*=',69,'TeX(_238,size).scale;if(krn&&krn[_23e.nuc.c]){for(var k=_23c.mlist.length-1;k>i;k--){',606,'k+1]=',606,'k];}',606,'i+1]=',186,'(krn[_23e.nuc.c]);}}}}',228,602,');},fraction',46,'_241,size,_243','){var TeX=',69,'TeX(_241',157,'t=0;if(_243.thickness!=null){t=_243.thickness;}',15,'_243.from.match(/over/)){t=',315,';}}var isD=(_241',503,'D");var Cn=(_241=="D")?"T":(_241=="D\'")?"T\'":',69,395,'_241);var Cd=(isD)?"T\'":',69,561,'(_241);var num',87,116,'_243.num,Cn,',143,'var den',87,116,'_243.den,Cd,',143,'var u;var v;var w;var H=(isD)?TeX.delim1:TeX.delim2;var _24f=[',589,88,'_243.left,_241)];var _250',87,88,'_243.right,_241);if(num.w<den.w){num.x=(den.w-num.w)/2;den.x=-(num.w+num.x);w=den.w;_24f[1]=num;_24f[2]=den',183,'den.x=(num.w-den.w)/2;num.x=-(den.w+den.x);w=num.w;_24f[1]=den;_24f[2]=num;}if(isD){u=TeX.num1;v=TeX.denom1',183,'u=(t!=0)?TeX.num2:TeX.num3;v=TeX.denom2;}if(t==0){var p=(isD)?7*',315,':3*',315,';var r=(u-num.d)-(','den.h-v);if(r<p){','u+=(p-r)/2;v+=(p-r)/2;}}else{var p=(isD)?3*t:t',68,291,682,'a+t/2);if(r<p){u+=p-r;}r=(a-t/2)-(',683,'v+=p-r;}var rule',87,'Rule(w,t);rule.x=-w;rule.y=a-t/2',';_24f[_24f.length]=','rule;}num.y=u;den.y=-v',693,'_250;_243.nuc',87,200,'(_24f,_241',119,'_243',34,'";_243',95,'_243.num;delete _243.den;',228,641,');},SupSub',46,'_257,size,_259){var TeX=',69,'TeX(_257',157,'nuc=','_259.nuc',';',113,'=',715,87,116,715,',_257,size,0);if(box.format=="null"){box=',715,87,'Text("","normal",','_257,size);}','if(nuc',5,'TeX"){if(!_259.textsymbol){var C',67,'[nuc.font][nuc.c];if(C.ic){_259',523,'(!_259.sub){','box=',715,87,322,589,'Space(_259.delta)],_257',119,'_259',2,';}}}else{_259',2,';}}if(!_259.sup&&!_259.sub){return;}',715,'.Styled();var Cd=',69,561,'(_257);var Cu=',69,395,'_257);var q=',69,'TeX(Cu,size).','sup_drop;var r=',69,'TeX(Cd,size).','sub_drop;var u=0;var v=0;var p;if(nuc.type&&nuc.type!="text"&&nuc.type!="TeX"&&nuc.type!="null"){u=box.h-q;v=box.d+r;}if(_259.sub){var sub',87,116,'_259.sub,Cd',119,'sub',87,200,'([sub,',186,'(TeX.scriptspace)],_257,size',');}if(!_259.sup){sub.y=-Math.max(v,TeX.sub1,sub.h-(4/5)*',69,759,450,715,87,322,'sub],_257,size).Styled();','delete _259.','sub;return;}var sup',87,116,'_259.sup,Cu',119,'sup',87,200,'([sup,',186,770,');if(_257=="D"){p=TeX.sup1;}',15,'_257','.charAt(','_257','.length-1)=="\'"){','p=TeX.sup3',183,'p=TeX.sup2;}}u',55,'u,p,sup.d+',69,756,'x_height/4);if',734,'sup.y=u;',715,87,322,'sup],_257',119,779,'sup;return;}v',55,'v,',69,759,'sub2);',314,315,';if((u-sup.d)-(sub.h-v)<4*t){v=4*t+sub.h-(u-sup.d);p=(4/5)*TeX.x_height-(u-sup.d);if(p>0){u+=p;v-=p;}}sup',121,'sub',121,806,'sub.y=-v;sup.x=_259.delta;if(sup.w+sup.x>sub.w){sup.x-=sub.w;',715,87,322,'sub,sup],',727,'else{sub.x-=(sup.w+sup.x);',715,87,322,'sup,sub],',727,779,'sup;',779,'sub;}});',103,'=function(_268){this.type="typeset";',7,'=_268;};jsMath.Add(',103,',{upStyle:{D:"S",T:"S","','D\'":"S\'","T\'":"S\'",S:"SS','",SS:"SS","','S\'":"SS\'","SS\'":"SS\'"},','downStyle:{D:"S\'",T:"S\'","',848,'\'",SS:"SS\'","',850,'UpStyle',46,'_269){return this.upStyle[_269];},',561,46,'_26a){return this.downStyle[_26a];},',311,46,'_26b){if(_26b',794,'_26b',796,'return _26b;}return _26b+"\'";},StyleValue',46,'_26c,v){if(_26c=="S"||_26c=="S\'"){return 0.7*v;}if(_26c=="SS"||_26c=="SS\'"){return 0.5*v;}return v;},StyleSize',46,'_26e,size){if(_26e=="S"||_26e=="S','\'"){size=Math.max(0,size-','2);}',15,'_26e=="SS','"||',875,872,'4);}}return ','size;},TeX',46,'_270,size){if(_270=="S"||_270=="S',872,'2);}',15,'_270=="SS','"||',886,872,879,'jsMath.TeXparams[size];},AddStyle',46,'_272,size,html){if(_272=="S"||_272=="S',872,'2);}',15,'_272=="SS','"||',897,872,'4);}}if(size!=4){html="<span class=\\"size"+size+"\\">"+html+"</span>";}return html;},AddClass',46,'_275,html){if(_275!=""&&_275!="normal"){html=',124,'Class(_275,html);}return html',';}});jsMath.','Package(',103,',{DTsep:{ord',':{op:1,bin:2,rel:3,inner:1},','op',':{ord:1,op:1',',rel:3,inner:1},bin:{ord:2,op:2,open:2,inner:2},rel:{ord:3,op:3,open:3,inner:3},open:{},close',910,220,912,',rel:1,open:1,close',':1,punct:1,inner:1','},inner',912,',bin:2,rel:3,open',918,'}},SSsep:{ord:{op:1},op',912,'},bin:{},rel:{},open:{},close:{op:1},',220,':{},inner:{op:1}},sepW:["","thinmuskip","medmuskip","thickmuskip"],','GetSeparation',46,'l,r,_279){if(l&&l.atom&&r.atom){var _27a=this.DTsep;if(_279',503,'S"){_27a=this.SSsep;}var row=_27a[l.type];if(row&&row[r.type]!=null){return jsMath.TeX[this.sepW[row[r.type]]];}}return 0;},Typeset',46,'_27c,size){',9,'=_27c;',22,'=size;var _27e=-10000;this.w=0;this.h=_27e;this.d=_27e;this.bh=this.h;this.bd=this.d;','this.tbuf','="";this.','tx=0;','this.tclass','="";','this.cbuf',940,'hbuf',940,'hx=0;var _27f=null;var prev;this.x=0;this.dx=0;for(var i=0;i<',7,49,'prev=_27f;_27f=',7,'[i];switch(_27f.type){case "size":','this.FlushClassed();',22,'=_27f.size;','_27f=prev;break;case "','style":',954,'if(',9,794,9,796,9,'=_27f.style','+"\'";}else{',9,966,';}',957,'space":if(typeof (_27f.w)=="object"){if(',9,794,'1)=="','S"){_27f.w=0.','5*','_27f.w[0]/18',';}',15,9,503,976,'7*',978,183,'_27f.w=',978,';}}}this.dx+=_27f.w-0;',957,'html":',954,'if(this.hbuf==""){this.hx=this.','x;}','this.hbuf+=','_27f.html;_27f=prev;break;default:if(!_27f.atom&&_27f.type!="box"){break;}','_27f.nuc.','x+=this.dx+this.',928,'(prev,_27f,',9,');if(',997,'y||',997,'x){',997,'Styled();}this.dx=0;this.x=this.x+this.w;this.w+=',997,'w+',997,'x;if(',997,'format=="text"){if(',942,'!=',997,'tclass','&&',942,'!=""){this.FlushText();}if(',939,'==""&&',944,'==""){this.tx=this.x;}',939,'+=',997,'html;',942,'=',997,1018,183,954,'if(',997,'x||',997,'y){this.Place(_27f.nuc);}',993,'x;}',995,997,'html;}this.h',55,'this.h,',997,'h+',997,'y);this.bh',55,'this.bh,',997,'bh);this.d',55,'this.d,',997,'d-',997,'y);this.bd',55,'this.bd,',997,'bd);break;}}',954,'if(this.dx){',995,124,125,'this.dx);this.w+=this.dx;}if(this.hbuf==""){return ',589,'Null;}if(this.h==_27e){this.h=0;}if(this.d==_27e){this.d=0;}',113,'=new jsMath.','Box("html",this.hbuf,this.w,this.h,this.d);box.bh=this.bh;box.bd=this.bd;return box;},FlushText:function(){if(',939,'==""){return;}',944,'+=',69,'AddClass(',942,',',939,');',939,'="";',942,'="";},FlushClassed:function(){this.FlushText();if(',944,1078,993,'tx;}',995,69,'AddStyle(',9,',',22,',',944,');',944,'="";},Place',46,'item){var ','html="<span style=\\"position: relative',';";if(item.x){html+=" margin-left:"+',124,'Em(item.x)+";";}if(item.y){html+=" top:"+',124,'Em(-item.y',')+";";}item',123,'html+"\\">"+','item.html+"</span','>";','item.h+=item.y;item.d-=item.y;item.x=0;item.y=0',';},PlaceSeparateSkips',46,'item){if(item.y){item.',1108,'; "+"top:"+',124,1113,')+";"+"\\">"+',1117,'>";}if(item.x){item',123,124,125,'item.x)+item.html;}',1119,906,'Parse','=function(s,font,size,','_289){var _28a=new ','jsMath.Parser','(s,font,size,_289);_28a.Parse();return _28a;};',1139,1137,'_28e){this.string=s;this.i=0;',7,1075,'mList(null,font,size,_28e);};jsMath.Package(',1139,',{cmd:"\\\\",open:"{",close:"}",letter:/[a-z]/i,number:/[0-9]/,scriptargs:/^((math|text)..|mathcal)$/,mathchar:{"!":[5,0,33],"(":[4,0,40],")":[5,0,41],"*":[2,2,3],"+":[2,0,43],",":[6,1,59],"-":[2,2,0],".":[0,1,58],"/":[0,1,61],":":[3,0,58],";":[6,0,59],"<":[3,1,60],"=":[3,0,61],">":[3,1,62],"?":[5,0,63],"[":[4,0,91],"]":[5,0,93],"|":[0,2,106]},special:{"~":"Tilde","^":"HandleSuperscript","_":"HandleSubscript"," ":"Space","\\x01','":"Space","\\','t',1149,'r',1149,'n":"Space","\'":"Prime","%":"HandleComment","&":"HandleEntry"},mathchardef:{braceld:[0,3,122],bracerd:[0,3,123],bracelu:[0,3,124],braceru:[0,3,125],alpha:[0,1,11],beta:[0,1,12],gamma:[0,1,13],delta:[0,1,14],epsilon:[0,1,15],zeta:[0,1,16],eta:[0,1,17],theta:[0,1,18],iota:[0,1,19],kappa:[0,1,20],lambda:[0,1,21],mu:[0,1,22],nu:[0,1,23],xi:[0,1,24],pi:[0,1,25],rho:[0,1,26],sigma:[0,1,27],tau:[0,1,28],upsilon:[0,1,29],phi:[0,1,30],chi:[0,1,31],psi:[0,1,32],omega:[0,1,33],varepsilon:[0,1,34],vartheta:[0,1,35],varpi:[0,1,36],varrho:[0,1,37],varsigma:[0,1,38],varphi:[0,1,39],Gamma:[7,0,0],Delta:[7,0,1],Theta:[7,0,2],Lambda:[7,0,3],Xi:[7,0,4],Pi:[7,0,5],Sigma:[7,0,6],Upsilon:[7,0,7],Phi:[7,0,8],Psi:[7,0,9],Omega:[7,0,10],aleph:[0,2,64],imath:[0,1,123],jmath:[0,1,124],ell:[0,1,96],wp:[0,1,125],Re:[0,2,60],Im:[0,2,61],partial:[0,1,64],infty:[0,2,49],prime:[0,2,48],emptyset:[0,2,59],nabla:[0,2,114],surd:[1,2,112],top:[0,2,62],bot:[0,2,63],triangle:[0,2,52],forall:[0,2,56],exists:[0,2,57],neg:[0,2,58],lnot:[0,2,58],flat:[0,1,91],natural:[0,1,92],sharp:[0,1,93],clubsuit:[0,2,124],diamondsuit:[0,2,125],heartsuit:[0,2,126],spadesuit:[0,2,127],coprod:[1,3,96],bigvee:[1,3,87],bigwedge:[1,3,86],biguplus:[1,3,85],bigcap:[1,3,84],bigcup:[1,3,83],intop:[1,3,82],prod:[1,3,81],sum:[1,3,80],bigotimes:[1,3,78],bigoplus:[1,3,76],bigodot:[1,3,74],ointop:[1,3,72],bigsqcup:[1,3,70],smallint:[1,2,115],triangleleft:[2,1,47],','triangleright',':[2,1,46],bigtriangleup:[2,2,52],bigtriangledown:[2,2,53],wedge:[2,2,94],land:[2,2,94],vee:[2,2,95],lor:[2,2,95],cap:[2,2,92],cup:[2,2,91],ddagger:[2,2,122],dagger:[2,2,121],sqcap:[2,2,117],sqcup:[2,2,116],uplus:[2,2,93],amalg:[2,2,113],diamond:[2,2,5],bullet:[2,2,15],wr:[2,2,111],div:[2,2,4],odot:[2,2,12],oslash:[2,2,11],otimes:[2,2,10],ominus:[2,2,9],oplus:[2,2,8],mp:[2,2,7],pm:[2,2,6],circ:[2,2,14],bigcirc:[2,2,13],setminus:[2,2,110],cdot:[2,2,1],ast:[2,2,3],times:[2,2,2],star:[2,1,63],propto:[3,2,47],sqsubseteq:[3,2,118],sqsupseteq:[3,2,119],parallel:[3,2,107],mid:[3,2,106],dashv:[3,2,97],vdash:[3,2,96],leq:[3,2,20],le:[3,2,20],geq:[3,2,21],ge:[3,2,21],succ:[3,2,31],prec:[3,2,30],approx:[3,2,25],succeq:[3,2,23],preceq:[3,2,22],supset:[3,2,27],subset:[3,2,26],supseteq:[3,2,19],subseteq:[3,2,18],"in":[3,2,50],ni:[3,2,51],owns:[3,2,51],gg:[3,2,29],ll:[3,2,28],not:[3,2,54],sim:[3,2,24],simeq:[3,2,39],perp:[3,2,63],equiv:[3,2,17],asymp:[3,2,16],smile:[3,1,94],frown:[3,1,95],Leftrightarrow:[3,2,44],Leftarrow:[3,2,40],Rightarrow:[3,2,41],leftrightarrow:[3,2,36],leftarrow:[3,2,32],gets:[3,2,32],rightarrow:[3,2,33],to:[3,2,33],mapstochar:[3,2,55],leftharpoonup:[3,1,40],','leftharpoondown',':[3,1,41],rightharpoonup:[3,1,42],rightharpoondown:[3,1,43],nearrow:[3,2,37],searrow:[3,2,38],nwarrow:[3,2,45],swarrow:[3,2,46],hbarchar:[0,0,22],lhook:[3,1,44],rhook:[3,1,45],ldotp:[6,1,58],cdotp:[6,2,1],colon:[6,0,58],"#":[7,0,35],"$":[7,0,36],"%":[7,0,37],"&":[7,0,38]},delimiter:{"(":[0,0,40,3,0],")":[0,0,41,3,1],"[":[0,0,91,3,2],"]":[0,0,93,3,3],"<":[0,2,104,3,10],">":[0,2,105,3,11],"/":[0,0,47,3,14],"|":[0,2,106,3,12],".":[0,0,0,0,0],"\\\\":[','0,2,110,3,15],"\\\\','lmoustache":[4,3,122,3,64],"\\\\rmoustache":[5,3,123,3,65],"\\\\lgroup":[4,6,40,3,58],"\\\\rgroup":[5,6,41,3,59],"\\\\arrowvert','":[0,2,106,3,','60],"\\\\Arrowvert":[0,2,107,3,61],"\\\\bracevert',1161,'62],"\\\\Vert":[0,2,107,3,13],"\\\\|":[0,2,107,3,13],"\\\\vert',1161,'12],"\\\\uparrow":[3,2,34,3,120],"\\\\downarrow":[3,2,35,3,121],"\\\\updownarrow":[3,2,108,3,63],"\\\\Uparrow":[3,2,42,3,126],"\\\\Downarrow":[3,2,43,3,127],"\\\\Updownarrow":[3,2,109,3,119],"\\\\backslash":[',1159,'rangle":[5,2,105,3,11],"\\\\langle":[4,2,104,3,10],"\\\\rbrace":[5,2,103,3,9],"\\\\lbrace":[4,2,102,3,8],"\\\\}":[5,2,103,3,9],"\\\\{":[4,2,102,3,8],"\\\\rceil":[5,2,101,3,7],"\\\\lceil":[4,2,100,3,6],"\\\\rfloor":[5,2,99,3,5],"\\\\lfloor":[4,2,98,3,4],"\\\\lbrack":[0,0,91,3,2],"\\\\rbrack":[0,0,93,3,3]},macros:{displaystyle',':["HandleStyle","','D"],textstyle',1169,'T"],scriptstyle',1169,'S"],scriptscriptstyle',1169,'SS"],rm',':["HandleFont",','0],mit',1177,'1],oldstyle',1177,'1],cal',1177,'2],it',1177,'4],bf',1177,'6],left:"HandleLeft",right:"HandleRight",arcsin',':["NamedOp",0],','arccos',1189,'arctan',1189,'arg',1189,'cos',1189,'cosh',1189,'cot',1189,'coth',1189,'csc',1189,'deg',1189,'det',':"NamedOp",','dim',1189,'exp',1189,'gcd',1209,'hom',1189,'inf',1209,'ker',1189,'lg',1189,'lim',1209,'liminf',':["NamedOp",null,"lim<span style=\\"margin-left: "+1/6+"em\\"></span>','inf"],limsup',1227,'sup"],ln',1189,'log',1189,'max',1209,'min',1209,'Pr',1209,'sec',1189,'sin',1189,'sinh',1189,'sup',1209,'tan',1189,'tanh',1189,277,':["HandleAtom","',277,'"],',298,1253,298,'"],',332,1253,332,'"],over',':"HandleOver",','overwithdelims',1264,'atop',1264,'atopwithdelims',1264,'above',1264,'abovewithdelims',1264,'brace',':["HandleOver','","\\\\{","\\\\}"],brack',1276,'","[","]"],choose',1276,'","(",")"],overbrace',':["Extension","leaders"],','underbrace',1282,'overrightarrow',1282,'overleftarrow',1282,'overset',':["Extension","underset-overset"],','underset',1290,'llap',':"HandleLap",','rlap',1294,'ulap',1294,'dlap',1294,'raise:"RaiseLower",lower:"RaiseLower",moveleft',':"MoveLeftRight",','moveright',1302,'frac:"Frac",root:"Root",sqrt:"Sqrt",hbar',':["Macro","\\\\','hbarchar\\\\kern-.5em h"],ne',1306,'not="],neq',1306,'not="],notin',1306,'mathrel{\\\\','rlap{\\\\kern2mu/}}\\\\in"],cong',1306,1313,'lower2mu{\\\\','mathrel','{{\\\\rlap{=}\\\\raise6mu\\\\sim}}}}"],bmod',1306,'mathbin{\\\\rm mod}"],pmod',1306,'kern 18mu ({\\\\rm mod}\\\\,\\\\,#1)",1],"int":["Macro","\\\\intop\\\\nolimits"],oint',1306,'ointop\\\\nolimits"],doteq',1306,'buildrel\\\\textstyle.\\\\over="],ldots',1306,'mathinner{\\\\','ldotp\\\\ldotp\\\\ldotp}"],cdots',1306,1329,'cdotp\\\\cdotp\\\\cdotp}"],vdots',1306,1329,'rlap{\\\\raise8pt{.\\\\rule 0pt 6pt 0pt}}\\\\rlap{\\\\raise4pt{.}}.}"],ddots',1306,1329,'kern1mu\\\\raise7pt{\\\\rule 0pt 7pt 0pt .}\\\\kern2mu\\\\raise4pt{.}\\\\kern2mu\\\\raise1pt{.}\\\\kern1mu}"],joinrel',1306,1313,'kern-4mu}"],relbar',1306,1313,'smash-}"],','Relbar',1306,1318,'="],bowtie',1306,1318,'\\\\',1155,'\\\\joinrel\\\\',1318,'\\\\triangleleft"],models',1306,1318,'|\\\\joinrel="],mapsto',1306,'mapstochar\\\\','rightarrow"],rightleftharpoons',1306,277,'{\\\\',1313,'rlap{\\\\raise3mu{\\\\rightharpoonup}}}\\\\',1157,'}"],hookrightarrow',1306,'lhook\\\\','joinrel\\\\rightarrow"],','hookleftarrow',1306,'leftarrow\\\\joinrel\\\\','rhook"],Longrightarrow',1306,1346,1354,'Rightarrow"],','longrightarrow',1306,'relbar\\\\',1372,'longleftarrow',1306,1375,'relbar"],Longleftarrow',1306,'Leftarrow\\\\joinrel\\\\',1346,'"],longmapsto',1306,1361,'char{cmsy10}{0}\\\\',1372,'longleftrightarrow',1306,'leftarrow\\\\',1372,'Longleftrightarrow',1306,1390,1380,'iff:["Macro","\\\\;\\\\',1401,'\\\\;"],mathcal',':["Macro","{\\\\','cal #1}",1],mathrm',1408,'rm #1}",1],mathbf',1408,'bf #1}",1],','mathbb',1408,1413,'mathit',1408,'it #1}",1],textrm',1306,'mathord{\\\\hbox{#1}}",1],','textit',1306,'mathord{\\\\class{',1422,'}{\\\\hbox{#1}}}",1],','textbf',1306,1424,1427,1426,'TeX:["Macro","T\\\\kern-.1667em\\\\lower.5ex{E}\\\\kern-.125em X"],limits:["Limits",1],nolimits:["Limits",0],",":["Spacer",1/6],":":["Spacer",1/6],">":["Spacer",2/9],";":["Spacer",5/18],"!":["Spacer",-1/6],enspace',':["Spacer",','1/2],quad',1433,'1],qquad',1433,'2],thinspace',1433,'1/6],negthinspace:["Spacer",-1/6],hskip:"Hskip",kern:"Hskip",rule:["Rule","colored"],space:["Rule","blank"],big',':["MakeBig","','ord",0.85],Big',1441,'ord",1.','15],bigg',1441,1444,'45],Bigg',1441,1444,'75],bigl',1441,'open",0.85],Bigl',1441,'open",1.','15],biggl',1441,1455,'45],Biggl',1441,1455,'75],bigr',1441,'close",0.85],Bigr',1441,'close",1.','15],biggr',1441,1466,'45],Biggr',1441,1466,'75],bigm',1441,'rel",0.85],Bigm',1441,'rel",1.','15],biggm',1441,1477,'45],Biggm',1441,1477,'75],mathord',1253,'ord"],mathop',1253,'op"],mathopen',1253,'open"],mathclose',1253,'close"],mathbin',1253,'bin"],',1318,1253,'rel"],mathpunct',1253,220,'"],mathinner',1253,'inner"],','mathchoice',':["Extension","',1503,'"],buildrel:"BuildRel",hbox:"HBox",text:"HBox",mbox:"HBox",fbox',1504,'fbox"],strut:"Strut",mathstrut',1306,'vphantom{(}"],phantom',':["Phantom",','1,1],vphantom',1511,'1,0],hphantom',1511,'0,1],smash:"Smash",acute',':["MathAccent",[7,0,','19]],grave',1517,'18]],ddot',1517,'127]],tilde',1517,'126]],bar',1517,'22]],breve',1517,'21]],check',1517,'20]],hat',1517,'94]],vec',':["MathAccent",[0,','1,126]],dot',1517,'95]],widetilde',1533,'3,101]],widehat',1533,'3,98]],"_":["','Replace","ord','","_","normal",-0.4,0.1]," ":["',1541,'"," ","normal"],angle:["',1541,'","∠","normal"],matrix:"Matrix",array:"Matrix",pmatrix:["Matrix","(",")","c"],cases:["Matrix","\\\\{",".",["l","l"]],cr:"HandleRow","\\\\":"HandleRow",begin:"Begin",end:"End",tiny',':["HandleSize",','0],Tiny',1547,'1],scriptsize',1547,'2],small',1547,'3],normalsize',1547,'4],large',1547,'5],Large:["HandleSize"'], |
|
[',6],LARGE',':["HandleSize",','7],huge',1,'8],Huge',1,'9],dots:["','Macro','","\\\\ldots"],','newcommand',':["Extension","',9,'"],def',10,9,'"],color',10,'HTML"],','href',10,'HTML"],"class":["','Extension','","',17,'style',10,17,'cssId',10,17,'unicode',10,17,'require:"','Require','","char":"Char"},','environments',':{array:"Array",','matrix',':["Array",null,null,"','c"],pmatrix:["Array","(",")","c"],bmatrix:["Array","[","]","c"],Bmatrix:["Array","\\\\{","\\\\}","c"],vmatrix:["Array","\\\\vert","\\\\vert","c"],Vmatrix:["Array","\\\\Vert","\\\\Vert","c"],cases:["Array","\\\\{",".","ll"],eqnarray',39,'rcl",[5/18,5/18],"D"]},AddSpecial',':function','(obj){','for(var id in obj){','jsMath.Parser.prototype','.special[',46,'[id]]=obj[id];}},Error',43,'(s){this.i=','this.string','.length;','if(s','.error){','this.error','=s.error;}','else{if(!','this',55,56,'=s;}}},nextIsSpace',43,'(){','return ','this.string.charAt(this.i',')==" ";},trimSpaces',43,'(text){','if(typeof (','text)!="string"){',65,'text;}',65,'text','.replace(/^\\s+|\\s','+/g,"");},','Process',43,'(arg','){var ','data=','this.mlist.','data;','arg=','jsMath.','Parse(arg,','data.font',',','data.size',',data.style',');if(arg',55,'this.Error(','arg);','return null',';}if(arg.mlist.Length()==','0){',96,97,'1',81,'atom=','arg.mlist.','Last();if','(atom','.atom&&','atom.type=="ord"&&atom.nuc&&!atom.sub&&!atom.sup&&(','atom.nuc.type=="','text"||',109,'TeX")){',65,'atom.nuc;}}return {type:"mlist",mlist:arg.mlist};},GetCommand',43,'(){var ','_296=/^([a-z]+|.) ?/i;var cmd=_296.exec(','this.string.slice(','this.i));','if(cmd){this.i+=cmd[1].length;',65,'cmd[1];}','this.Error("','Missing',' control sequnece name at end of string or',' argument','");',96,';},GetArgument',':function(name',',','_299){','while','(this.nextIsSpace()){this.i','++;}','if(this.','i>=',52,'.length){','if(!',132,123,124,126,' for "+','name);}',96,';}if(',66,')==','this.close){if','(!',132,123,'Extra close brace','");}',96,148,66,')==','this.cmd','){','this.i++;',65,161,'+','this.GetCommand','();}if(',66,')!=this.open','){return ',66,'++);}var j=++','this.i;var ','_29b=1;var c="";',133,'(this.i<this.string.length){','c=',66,'++);','if(c==this.cmd){','this.i','++;}else{if(c','==this.open){_29b',183,'==',151,'(_29b==0){',123,155,'");',96,';}if(--_29b==0',171,118,'j,this.i-1);}}}}}',123,'Missing close brace','");',96,';},ProcessArg',130,81,85,'this.GetArgument(','name);','if(this.error){return',' null;}','return this.Process(arg);},','ProcessScriptArg',130,81,85,205,206,207,208,'if(arg.charAt(0)==',161,'){','csname','=arg.substr(1);if(',221,'=="frac"){arg+="{"+',205,221,')+"}";',207,208,'arg+="{"+',205,221,')+"}";',207,' null;}}else{if(csname','=="sqrt"){arg+="["+','this.GetBrackets(',221,')+"]";',207,208,'arg+="{"+',205,221,')+"}";',207,235,'.match(this.scriptargs)){arg+="{"+',205,221,')+"}";',207,' null;}}}}}',209,'GetDelimiter',130,'){',133,134,'++;}var c=',66,');if',177,163,181,'c="\\\\"+',167,'(',206,207,' null;}}','if(','this.delimiter[','c]!=null',171,273,'c];}}',123,124,' or unrecognized delimiter',145,206,96,';},GetDimen',130,',nomu',81,'rest;var _2a6=0;if',134,'++;}if(',66,')=="{"){rest=',205,146,'else{rest=',118,'this.i);_2a6=1',';}var ','_2a7=rest.match(/^\\s*([-+]?(\\.\\d+|\\d+(\\.\\d*)?))(pt|em|ex|mu|px)/);if(!_2a7){',123,124,' dimension or its units',145,206,96,148,'_2a6){this.i+=_2a7[0].length;if',134,'++;}}var d=_2a7[1]-0;if(_2a7[4]=="px"){d/=',86,'em',';}else{if(_2a7[4]=="','pt"){d/=10',312,'ex"){d*=','jsMath.TeX.','x_height',312,'mu"){if(nomu){d=d/18;}else{d=[d,"mu"];}}}}}',65,'d;},GetNext',43,'(){',133,134,'++;}',65,66,');},GetBrackets',130,81,'c=this.GetNext();if(c','!="["){return "";}var _2ab=++',174,'_2ac=0;',133,177,'var c=',66,'++);if(c=="{"){','_2ac',183,'=="}"){if(','_2ac==0){',123,155,' while looking for',' \']\'");',96,';}_2ac--;}else{',181,'this.i',183,'=="]"){if(_2ac==0',171,118,'_2ab,this.i-1);}}}}}}',123,'Couldn\'t find',' closing \']\' for',126,' to "+','this.cmd+name);',96,';},GetUpto',130,',_2af){',133,134,'++;}var _2b0=',174,'_2b1=0;',133,177,'var c=',66,340,'_2b1',183,343,'_2b1==0){',123,155,347,' "+',161,'+_2af);',96,';}_2b1--;}else{',181,'if(',118,'this.i,this.i+','5)=="begin"){_2b1++;this.i+=4;}else{if(',118,393,'3)=="end"){if(_2b1>0){_2b1--;this.i+=2;}}}if(',381,'if(',118,393,'_2af.length)==_2af){c=',66,'+_2af.length);if(c.match(/[^a-z]/i)||!_2af.match(/[a-z]/i)){var ',85,118,'_2b0,this.i-1);this.i+=_2af',53,65,'arg;}}}this.i++;}}}}',123,359,' "+',161,'+_2af+" for "+',206,96,';},','ProcessUpto',130,',_2b5',81,85,'this.GetUpto','(name,_2b5);',207,208,209,'GetEnd',43,'(env',81,'body="";var name="";',133,'(name!=env){body+=',424,'("begin{"+env+"}","end");',207,208,'name=',205,161,'+"end");',207,271,65,'body;},Space',43,'(){},','Prime',43,'(c',81,'base=',83,105,'(base==null||(!base',107,'base.type!="','box"&&',459,'frac")){',454,'this.mlist.Add(jsMath.mItem.','Atom("ord",{type:null}));}','if(base.sup){',123,'Prime causes double exponent',': use braces to clarify");return',298,'sup="";',133,'(c=="\'"){sup+=',161,'+"prime";',332,'=="\'"){this.i++;}}','base.sup=this.',78,'(sup);','base.sup.isPrime','=1;},RaiseLower',130,81,'h','=this.GetDimen(this.cmd+name',',1);',207,298,'box','=this.ProcessArg(',363,207,148,'name=="lower"){h=-h;}',83,'Add(new jsMath.mItem("','raise",{nuc:box,raise:h}));},MoveLeftRight',130,81,'x',486,487,207,298,'box',491,363,207,148,'name=="moveleft"){x=-x;}',464,'Space(x));',464,'Atom("ord",box));',464,'Space(-x));},',34,130,81,'file=',205,363,207,';}file=',86,21,'.URL(file);if(','jsMath.Setup.','loaded[file',']){','return;}','this.',21,'(null,[','file]);},',21,130,',data){','jsMath.Translate','.restart=1;if(name','!=null){','delete ',46,'[data[1]||"macros"][name];}','jsMath.Script.','Start();',86,21,'.',34,'(data[0],',540,'.asynchronous',');throw "restart";},Frac',130,81,'num',491,363,207,298,'den',491,363,207,';}',464,'Fraction("over",num,den));},Sqrt',130,81,'n=',237,363,207,298,'arg',491,363,207,';}box=jsMath.mItem.Atom("radical",arg);',136,'n!=""){box.root=this.',78,'(n);',207,';}}',83,'Add(box);},','Root',130,81,'n=this.',419,'(',161,'+name,"of");',207,298,'arg',491,363,207,581,'box.root=n;',83,589,'BuildRel',130,81,'top=this.',419,'(',161,'+name,"over");',207,298,'bot',491,363,207,298,'op=',86,'mItem.Atom("','op",bot);op.limits=1;op.sup=top;',83,'Add(op);},MakeBig',130,',data){var ','type=data[0];var h=data[1]*',86,'p_height;var _2d8=this.',255,'(',363,207,';}',464,'Atom(type,',86,'Box.Delimiter(h,_2d8,"T")));},Char',130,81,'font=',205,363,207,298,'n=',205,363,207,';}if(!','jsMath.TeX[font',']){',655,']=[];this.',21,535,'jsMath.Font.URL(font',')]);}else{',464,'Typeset(',86,'Box.TeX(n-0,font,"T",',83,90,')));}},Matrix',130,',_2dd',81,'data=',83,84,'var ',85,205,363,207,298,'_2e0','=new jsMath.Parser(arg','+"\\\\\\\\",null,',90,');_2e0.',38,'=name;_2e0.row=[];_2e0.table=[];_2e0.Parse();if(_2e0',55,94,'_2e0);',532,'_2e0','.HandleRow(name,1);var box=jsMath.Box.Layout(data.size,','_2e0.table,_2dd[2]);if(_2dd[0]&&_2dd[1]){var left','=jsMath.Box.Delimiter(box.h+box.d,this.delimiter[','_2dd[0]],"T");var _2e3',696,'_2dd','[1]],"T");box=jsMath.Box.SetList([left,box,','_2e3],','data.style,data.size',');}',464,'Atom((_2dd','[0]?"inner":"ord"),box));},','HandleEntry',130,'){','if(!this.',38,'){',94,'name+" can only appear in a matrix or array");return;}','if(',83,'data.openI',542,'var open=',83,'Get(',83,717,');if(open','.left){',123,124,' "+',161,'+"right','");}else{',123,198,'");}}if(',83,'data.overI',542,83,'Over();}var data=',83,84,83,'Atomize(',702,');var box=',83,664,702,');this.row[','this.row.length',']=box;this.mlist=new ',86,'mList(null,null,',90,91,');},HandleRow',130,',last){',710,38,'){',94,161,'+',714,'this.',707,'(',206,'if(!last||',750,'>1||this.row[0].format!="null"){this.table[this.table.length]=this.row;}this.row=[];},Array',130,',_2eb',81,'_2ec=_2eb[2];var _2ed=_2eb[3];if(!_2ec){_2ec=',205,161,'+"begin{"+name+"}");',207,';}}_2ec=_2ec.replace(/[^clr]/g,"");_2ec=_2ec.split("");var data=',83,84,'var _2ef=_2eb[4]||"T";var ',85,'this.GetEnd(',206,207,298,'_2f1',683,'+',161,'+"\\\\",null,',90,',_2ef);_2f1.',38,'=name;_2f1.row=[];_2f1.table=[];_2f1.Parse();if(_2f1',55,94,'_2f1);',532,'_2f1',694,'_2f1.table,_2ec,_2ed);if(_2eb[0]&&_2eb[1]){var left',696,'_2eb[0]],"T");var _2f4',696,'_2eb',700,'_2f4],',702,');}',464,'Atom((_2eb',706,'Begin',130,81,'env=',205,363,207,148,'env.match(/[^a-z*]/i)){',123,'Invalid',' environment',' name',' \\""+env+"\\"");return;}',710,36,'[env]){',123,'Unknown',828,830,'var cmd=this.',36,'[env];',70,'cmd',')=="string"){','cmd=[cmd];}this[cmd[0]](env,cmd.slice(1));},End',130,81,'env=',205,363,207,';}',94,161,'+name+"{"+env+"} without matching "+',161,'+"begin");},Spacer',130,',w){',464,'Space(w-0));},Hskip',130,81,'w=this.GetDimen(',363,207,';}',464,'Space(w));},HBox',130,81,'text=',205,363,207,';}','var box=jsMath.','Box.InternalMath(text,',83,90,');',464,664,'box));},Rule',130,',_302',81,'w',486,487,207,298,'h',486,487,207,298,'d',486,487,207,';}h+=d;var html;if(h!=0){h=Math.max(1.05/',86,'em,h);}if(h==0||w==0||_302=="blank"){html=','jsMath.HTML.','Blank(w,h);}else{html=',904,'Rule(w,h);}if(d){html','="<span style=\\"','vertical-align:"+',904,'Em(-d)+"\\">"+html','+"</span>";}',464,664,'new ',86,'Box("html",html,w,h-d,d)));},Strut',43,116,'size=',83,90,';',876,'Box.Text("","normal","T",size).Styled();box.bh=box.bd=0;box.h=0.8;box.d=0.3;box.w=0;',464,664,'box));},Phantom',130,630,'arg',491,363,207,';}',83,497,'phantom",{phantom:arg,v:data[0],h:data[1]}));},Smash',130,630,'arg',491,363,207,';}',83,497,'smash",{smash:arg}));},MathAccent',130,',_310',81,'c',491,363,207,298,103,86,625,'accent",c);atom.accent=_310[0];',83,'Add(atom);},NamedOp',130,630,'a=(name.match(/[^acegm-su-z]/))?1:0;var d=(name.match(/[gjpqy]/))?0.2:0;if(data[1]){name=data[1];}',876,'mItem.TextAtom("op",name,"cmr10",a,d);if(data[0]!=null){box.limits=data[0];}',83,589,'Limits',130,630,103,83,105,'(!atom||atom.type!="op"){',94,161,'+name+" is allowed only on operators");',532,'atom.limits=data[0];},',7,130,630,'text=data[0];if(data[1]){var args=[];','for(var i=0;i<','data[1];i++){args[args.length]=',205,363,207,';}}','text=this.','SubstituteArgs','(args,text);}',52,'=','this.AddArgs(','text,',118,119,'this.i=0;},',993,43,'(args,_321',81,'text="";var _323="";var c;var i','=0;while(i<','_321',139,'c=','_321.charAt(i','++);',181,'text+=c+',1011,'++);}else{if(c=="#"){c=',1011,'++);if(c=="#"){text+=c;}',58,'c.match(/[1-9]/)||c>args',139,123,'Illegal macro parameter reference");',532,'_323=',997,997,'_323,text','),args[c-1]);text="";}}else{text+=c;}}}',65,997,1028,');},AddArgs',43,'(s1,s2){if(s2.match(/^[a-z]/i)&&s1.match(/(^|[^\\\\])(\\\\\\\\)*\\\\[a-z]+$/i)){s1+=" ";}',65,'s1+s2;},Replace',130,539,464,'TextAtom',552,'data[1],data[2],data[3]));},Tilde',130,'){',464,'TextAtom("ord','"," ","normal"));},HandleLap',130,81,'box=this.ProcessArg();',207,';}box=',83,497,'lap",{nuc:box,lap:name}));},HandleAtom',130,630,'arg',491,363,207,';}',464,'Atom(data,arg));},HandleMathCode',130,',code','){this.HandleTeXchar(','code[0],code[1],code[2]);},HandleTeXchar',43,'(type,font,code){if(type==7&&',83,88,542,645,83,88,';}',645,316,'fam[font];if(!',655,']){',655,']=[];this.',21,535,661,')]);}else{',464,'TeXAtom(',316,'atom[type],code,font));}},','HandleVariable',43,'(c',1068,'7,1',',c.charCodeAt(0));},','HandleNumber',43,'(c',1068,'7,0',1099,'HandleOther',43,'(c){',464,1047,'",c,"normal"));},HandleComment',43,116,'c;',133,177,'c=',66,'++);if(c=="\\r"||c=="\\n"){return;}}},HandleStyle',130,',_33a){',83,'data.style=_33a[0];',83,497,'style",{style:_33a[0]}));},HandleSize',130,',size){',83,90,'=size[0];',83,497,'size",{size:size[0]}));},HandleFont',130,',font){',83,88,'=font[0];},HandleCS',43,116,'cmd=',167,'();',207,';}',136,'macros[cmd]){var _340=this.macros[cmd];',70,'_340',843,'_340=[_340];}this[_340[0]](cmd,_340.slice(1));',532,136,'mathchardef[cmd',']){this.HandleMathCode(','cmd,this.',1155,']);',532,'if(',273,161,'+cmd',1156,'cmd,',273,161,'+cmd].slice(0,3));',532,123,'Unknown control sequence \'"+',161,'+cmd+"\'");},HandleOpen',43,'(){',83,'Open();},HandleClose',43,'(){if(',83,717,'==null){',123,155,'");',532,'var open=',83,'Get(',83,717,');if(!open||','open.left',1183,83,'Close();}else{',123,155,' or missing "+',161,730,'");return;}},HandleLeft',130,81,'left=this.',255,'(',363,207,';}',83,'Open(left);},HandleRight',130,81,'_345=this.',255,'(',363,207,298,'open=',83,'Get(',83,717,724,'&&',1194,542,83,'Close(_345);}else{',123,'Extra open brace or missing "+',161,'+"left");}},HandleOver',130,539,'if(',83,736,542,123,'Ambiguous use of "+',363,532,83,736,'=',83,'Length();',83,'data.overF={name:name};if(data.length>0){',83,'data.overF.','left=',273,'data[0]];',83,1255,'right=',273,'data[1]];}else{if(name.match(/withdelims$/)){',83,1255,1206,255,'(',363,207,';}',83,1255,1261,'this.',255,'(',363,207,';}}else{',83,1255,'left=null;',83,1255,1261,'null;}}if(name.match(/^above/)){',83,1255,'thickness=','this.GetDimen(',161,'.name',487,207,1280,83,1255,1290,'null;}},HandleSuperscript',43,116,454,83,105,'(base==null||(!base',107,459,'box"&&',459,'frac")){',454,464,465,466,'if(',481,'){',454,464,465,'else{',123,'Double exponent',469,';}}',478,210,'("superscript");',207,';}},HandleSubscript',43,116,454,83,105,'(base==null||(!base',107,459,'box"&&',459,'frac")){',454,464,465,'if(base.sub){',123,'Double subscripts',469,';}base.sub=this.',210,'("subscript");',207,';}},Parse',43,116,'c;',133,177,'c=',66,'++);',136,'mathchar[c',1156,'c,this.',1364,']);}else{',136,'special[c]){this[this',47,'c]](c);}else{',136,'letter','.test(c)){this.',1094,'(c);}else{',136,'number',1375,1100,1377,'this.',1106,'(c);}}}}}if(',83,717,542,'var open=',83,'Get(',83,717,724,'.left){',123,124,' "+',161,730,731,123,198,'");}}if(',83,736,542,83,'Over();}},Atomize',43,116,'data=',83,'init;if(!this',55,83,743,702,');}},Typeset',43,116,'data=',83,'init;var box=this.typeset=',83,664,702,');',207,' "<span class=\\"error\\">"+',56,912,'if(box.format=="null"){return "";}box.Styled().Remeasured();var _350=0;var _351','=0;if(box.bh>','box.h&&box.bh>',86,'h','+0.001){_350=1;}if(box.','bd>box.d&&box.bd>',86,'d',1438,'h>',86,'h||box.d>',86,'d){_351=1',298,'html=box.html;if(_350){if(','jsMath.Browser.','allowAbsolute',81,'y',1434,86,'h+0.001){y=',86,'h-box.bh;}html=',904,'Absolute(html,box.w,',86,'h,0,y,',86,'h);}',58,1450,'valignBug',81,'dy=',904,'Em(Math.max(0,box.bd-',86,'hd)/3);html',908,'line-height: 0px;"+" position:relative; top:"+dy+"; ',909,'dy+"\\">"+html+"</span>";}}_351=1',148,'_351){html+=',904,'Blank(0,box.h+0.05,box.d+0.05);}return "<nobr><span class=\\"scale\\">"+html+"</span></nobr>";}});',46,'.AddSpecial({cmd:"HandleCS",open:"HandleOpen",close:"HandleClose"});','jsMath.Add(jsMath,{',7,130,81,'_356=',46,'.macros;','_356','[name]=["',7,'"];for(var i=1;i<arguments',53,'i++){_356[name][_356[name].length]=arguments[i];}}});',86,21,'={safeRequire:1,',7,130,',file',81,'_35a=',46,1490,'if(file',1183,'file=name;}_35a',1492,21,'",file];},LaTeX',43,'(env,file',81,'_35d=',46,'.',36,';_35d[env]=["',21,'",file,"',36,'"];},Font',130,1136,'if(font',1183,645,'name+"10";}var _360=',46,1490,'_360',1492,21,'",',661,')];},MathChar',43,'(font,defs',81,'fam=',316,'famName[font','];if(fam',1183,1542,316,'fam',53,316,'fam[fam]=font;',316,1544,']=fam',298,'_364=',46,'.mathchardef;for(var c in defs){_364[c]=[defs[c][0],fam,defs[c][1]];}},',34,43,'(file,show){',136,'safeRequire&&(file.match(/\\.\\.\\/|[^-a-z0-9.\\/:_+=%~]/i)||(file.match(/:/)&&file.substr(0,',86,'root.length)!=',86,'root))){',529,530,']=1;',532,529,'Script(this.URL(file),show);},URL',43,'(file){file=file',76,'+$/g,"");if(!file.match(/^([a-z]+:|\\/|fonts|extensions\\/)/i)){file="extensions/"+file;}if(!file.match(/\\.js$/)){file+=".js";}',65,'file;}};',1484,78,43,44,529,'Body();',546,'Push(',540,',"','Asynchronous','",obj);},ProcessBeforeShowing',43,44,529,1586,'var _36b=(','jsMath.Controls.cookie.','asynch?"',1591,'":"','Synchronous','");',546,1588,540,',_36b,obj);}});',540,'={element:[],cancel:0,TextMode',43,'(s',81,'_36d','=jsMath.Parse(s,null,null,"','T");',1613,'.Atomize();var html=',1613,'.Typeset();return html;},','DisplayMode',43,'(s',81,'_370',1614,'D");',1624,1617,1624,1619,'GetElementText',43,'(_372',81,992,'recursiveElementText','(_372);_372.alt=text;if(text.search("&")>=0){','text=text.replace(/&','lt;/g,"<");',1638,'gt;/g,">");',1638,'quot;/g,"\\"");',1638,'amp;/g,"&");}',65,'text;},',1636,43,'(_374){if(','_374.nodeValue','!=null',171,1651,148,'_374.childNodes','.length==0){return " ";}var text="";',986,1656,53,'i++){text+=this.',1636,'(',1656,'[i]);}',65,1647,'ResetHidden',43,'(_377){_377.innerHTML',908,'visibility: hidden; position:absolute; top:0px;left:0px;\\"></span>"+',1450,'operaHiddenFix;_377.className="";',86,'hidden=_377.firstChild;if(!',86,'BBoxFor("x").w){','jsMath.hidden=jsMath.hiddenTop',';}',86,'ReInit();},','ConvertText',43,'(_378','){var text=this.GetElementText(','_378',');this.ResetHidden(','_378);',992,'TextMode(text);_378','.className="typeset";','_378','.innerHTML=text;},','ConvertDisplay',43,'(_37a',1686,'_37a',1688,'_37a);',992,1620,'(text);_37a',1692,'_37a',1694,'ProcessElement',43,'(_37c){this.restart=0;try','{if(_37c.tagName.toLowerCase()=="','div"){this.',1695,'(_37c);_37c.onclick=jsMath.Click.CheckClick;_37c.ondblclick=jsMath.Click.CheckDblClick',';}else',1711,'span"){this.',1683,1714,';}}}catch(err){if(_37c.alt',81,'tex=_37c.alt;','tex=tex.replace','(/&/g,"&");',1723,'(/</g,"<");',1723,'(/>/g,">");_37c.innerHTML=tex;}',1679,';}},','ProcessElements',43,'(k){',546,'blocking=','1;if(k>=','this.element.length','||this.cancel){this.','ProcessComplete','();',136,'cancel){','jsMath.Message.','Set("',78,' Math: Canceled");',1743,'Clear();}',546,1735,'0;',546,78,'();}else{','this.ProcessElement(this.element[','k]);',136,'restart){',546,1588,'this,"',1731,'",k);',546,1735,'0;setTimeout("',546,78,'()",',1450,'delay);}else{k++;var p=Math.floor(100*k/',1737,');','jsMath.Message.Set("Processing Math',': "+p+"%");setTimeout("',540,'.',1731,'("+k+")",',1450,'delay);}}},',1591,43,'(obj','){if(!jsMath.initialized){jsMath.Init();}this.element=this.GetMathElements(obj);','this.cancel=0;this',554,'=1;',546,1735,'1;',1774,': 0%",1);setTimeout("',540,'.',1731,'(0)",',1450,'delay);},',1602,43,'(obj,i){if(i==null',1785,'i=0;}this',554,1007,1737,'){',1755,'i]);',136,'restart){',86,'Synchronize','("',540,'.',1602,'(null,"+i+")");',546,78,'();',532,'i++;}this.',1739,'(1);},GetMathElements',43,'(obj',81,'_384=[];if(!obj){obj=','jsMath.document',148,'typeof (obj',843,'obj=',1831,'.getElementById(obj);}if(!','obj.getElementsByTagName','){',96,298,'math=',1838,'("div','");for(var k=0;k<math.length;k++){if(math[k].className=="math"){if(jsMath.Browser.renameOK&&obj.getElementsByName){math[k].setAttribute("name","_jsMath_");}else{_384[_384.length]=math[k];}}}','math=',1838,'("span',1845,'if(',1450,'renameOK','&&obj','.getElementsByName','){_384=obj',1854,'("_jsMath_',731,'if(',86,'hidden','.sourceIndex','){_384.sort(function(a,b',171,'a',1862,'-b',1862,';});}}',65,'_384;},',1739,43,'(_38a){if(',1450,1852,81,'_38b=',1831,1854,1857,'");for(var i=_38b.length-1;i>=0;i--){_38b[i].removeAttribute("name");}}',1679,';this.element=[];if(!_38a){',1774,': Done");',1743,'Clear();}',1743,'UnBlank();if(',1450,'safariImgBug&&(',1598,'font=="symbol"||',1598,'font=="image")){',136,'timeout){clearTimeout(this.timeout);}this.timeout=setTimeout("','jsMath.window.resizeBy','(-1,0); "+"',1899,'(1,0); "+"',540,'.timeout = null",2000);}},Cancel',43,'(){',540,'.cancel=1;if(',546,'cancelTimer){',546,'cancelLoad();}}};',1484,'ConvertTeX',43,'(_38d){',546,'Push(jsMath.tex2math,"',1914,'",_38d);},','ConvertTeX2',43,'(_38e){',546,1918,1921,'",_38e);},','ConvertLaTeX',43,'(_38f){',546,1918,1928,'",_38f);},','ConvertCustom',43,'(_390){',546,1918,1935,'",_390);},','CustomSearch',43,'(om,cm,od,cd','){',546,1588,'null,function(){',86,'tex2math.',1942,1944,');});},tex2math:{',1914,43,449,1921,43,449,1928,43,449,1935,43,449,1942,43,'(){}}});',86,1814,'=',546,1814,';if(','window.parent','!=window){',1975,'.jsMath=jsMath;',1831,'=',1975,'.document;',86,'window=',1975,';}',86,'Loaded();',86,'Controls.GetCookie();',529,'Source();',546,'Init();',529,'Fonts();if(',1831,'.body){jsMath.Setup.Body();}}}'] |
|
]); |
|
//end = new Date().getTime(); |
|
//alert(end-start); |