aboutsummaryrefslogtreecommitdiff
path: root/js/mathjax/jax/output
diff options
context:
space:
mode:
Diffstat (limited to 'js/mathjax/jax/output')
-rw-r--r--js/mathjax/jax/output/CommonHTML/autoload/annotation-xml.js62
-rw-r--r--js/mathjax/jax/output/CommonHTML/autoload/maction.js180
-rw-r--r--js/mathjax/jax/output/CommonHTML/autoload/menclose.js332
-rw-r--r--js/mathjax/jax/output/CommonHTML/autoload/mglyph.js96
-rw-r--r--js/mathjax/jax/output/CommonHTML/autoload/mmultiscripts.js298
-rw-r--r--js/mathjax/jax/output/CommonHTML/autoload/ms.js75
-rw-r--r--js/mathjax/jax/output/CommonHTML/autoload/mtable.js604
-rw-r--r--js/mathjax/jax/output/CommonHTML/autoload/multiline.js799
-rw-r--r--js/mathjax/jax/output/CommonHTML/config.js66
-rw-r--r--js/mathjax/jax/output/CommonHTML/fonts/TeX/AMS-Regular.js291
-rw-r--r--js/mathjax/jax/output/CommonHTML/fonts/TeX/Caligraphic-Bold.js101
-rw-r--r--js/mathjax/jax/output/CommonHTML/fonts/TeX/Fraktur-Bold.js127
-rw-r--r--js/mathjax/jax/output/CommonHTML/fonts/TeX/Fraktur-Regular.js127
-rw-r--r--js/mathjax/jax/output/CommonHTML/fonts/TeX/Main-Bold.js210
-rw-r--r--js/mathjax/jax/output/CommonHTML/fonts/TeX/Math-BoldItalic.js210
-rw-r--r--js/mathjax/jax/output/CommonHTML/fonts/TeX/SansSerif-Bold.js154
-rw-r--r--js/mathjax/jax/output/CommonHTML/fonts/TeX/SansSerif-Italic.js154
-rw-r--r--js/mathjax/jax/output/CommonHTML/fonts/TeX/SansSerif-Regular.js154
-rw-r--r--js/mathjax/jax/output/CommonHTML/fonts/TeX/Script-Regular.js90
-rw-r--r--js/mathjax/jax/output/CommonHTML/fonts/TeX/Typewriter-Regular.js157
-rw-r--r--js/mathjax/jax/output/CommonHTML/fonts/TeX/fontdata-extra.js242
-rw-r--r--js/mathjax/jax/output/CommonHTML/fonts/TeX/fontdata.js1786
-rw-r--r--js/mathjax/jax/output/CommonHTML/jax.js2845
-rw-r--r--js/mathjax/jax/output/NativeMML/config.js54
-rw-r--r--js/mathjax/jax/output/NativeMML/jax.js1433
-rw-r--r--js/mathjax/jax/output/PlainSource/config.js51
-rw-r--r--js/mathjax/jax/output/PlainSource/jax.js186
-rw-r--r--js/mathjax/jax/output/PreviewHTML/config.js56
-rw-r--r--js/mathjax/jax/output/PreviewHTML/jax.js1098
29 files changed, 12038 insertions, 0 deletions
diff --git a/js/mathjax/jax/output/CommonHTML/autoload/annotation-xml.js b/js/mathjax/jax/output/CommonHTML/autoload/annotation-xml.js
new file mode 100644
index 0000000..39acf24
--- /dev/null
+++ b/js/mathjax/jax/output/CommonHTML/autoload/annotation-xml.js
@@ -0,0 +1,62 @@
+// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0
+/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
+/* vim: set ts=2 et sw=2 tw=80: */
+
+/*************************************************************
+ *
+ * MathJax/jax/output/CommonHTML/autoload/annotation-xm;l.js
+ *
+ * Implements the CommonHTML output for <annotation-xml> elements.
+ *
+ * ---------------------------------------------------------------------
+ *
+ * Copyright (c) 2015-2020 The MathJax Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () {
+ var VERSION = "2.7.9";
+ var MML = MathJax.ElementJax.mml,
+ CHTML = MathJax.OutputJax.CommonHTML;
+
+ MML["annotation-xml"].Augment({
+ toCommonHTML: function (node) {
+ var encoding = this.Get("encoding");
+ node = this.CHTMLdefaultNode(node,{childOptions:{encoding:encoding}});
+ if (this.CHTML.rscale !== 1) this.CHTML.rescale(1/this.CHTML.rscale);
+ return node;
+ }
+ });
+
+ MML.xml.Augment({
+ toCommonHTML: function (node,options) {
+ var bbox = this.CHTML = CHTML.BBOX.zero();
+ for (var i = 0, m = this.data.length; i < m; i++)
+ {node.appendChild(this.data[i].cloneNode(true))}
+ //
+ // Warning: causes reflow
+ //
+ var w = node.offsetWidth, h = node.offsetHeight;
+ var strut = CHTML.addElement(node,"mjx-hd-test",{style:{height:h+"px"}});
+ bbox.d = bbox.b = (node.offsetHeight - h)/CHTML.em;
+ bbox.w = bbox.r = w/CHTML.em; bbox.h = bbox.t = h/CHTML.em - bbox.d;
+ node.removeChild(strut);
+ }
+ });
+
+ MathJax.Hub.Startup.signal.Post("CommonHTML annotation-xml Ready");
+ MathJax.Ajax.loadComplete(CHTML.autoloadDir+"/annotation-xml.js");
+});
+
+// @license-end
diff --git a/js/mathjax/jax/output/CommonHTML/autoload/maction.js b/js/mathjax/jax/output/CommonHTML/autoload/maction.js
new file mode 100644
index 0000000..3fdb393
--- /dev/null
+++ b/js/mathjax/jax/output/CommonHTML/autoload/maction.js
@@ -0,0 +1,180 @@
+// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0
+/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
+/* vim: set ts=2 et sw=2 tw=80: */
+
+/*************************************************************
+ *
+ * MathJax/jax/output/CommonHTML/autoload/maction.js
+ *
+ * Implements the CommonHTML output for <maction> elements.
+ *
+ * ---------------------------------------------------------------------
+ *
+ * Copyright (c) 2015-2020 The MathJax Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () {
+ var VERSION = "2.7.9";
+ var MML = MathJax.ElementJax.mml,
+ CHTML = MathJax.OutputJax.CommonHTML;
+
+ var currentTip, hover, clear;
+
+ //
+ // Add configuration for tooltips
+ //
+ var CONFIG = CHTML.config.tooltip = MathJax.Hub.Insert({
+ delayPost: 600, delayClear: 600,
+ offsetX: 10, offsetY: 5
+ },CHTML.config.tooltip||{});
+
+
+ MML.maction.Augment({
+ CHTMLtooltip: CHTML.addElement(document.body,"div",{id:"MathJax_CHTML_Tooltip"}),
+
+ toCommonHTML: function (node) {
+ var selected = this.Get("selection");
+ node = this.CHTMLcreateNode(node);
+ this.CHTML = CHTML.BBOX.empty();
+ this.CHTMLhandleStyle(node);
+ this.CHTMLhandleScale(node);
+ this.CHTMLaddChild(node,selected-1,{});
+ this.CHTML.clean();
+ this.CHTMLhandleSpace(node);
+ this.CHTMLhandleBBox(node);
+ this.CHTMLhandleColor(node);
+
+ var type = this.Get("actiontype");
+ if (this.CHTMLaction[type] && this.CHTMLaction.hasOwnProperty(type))
+ this.CHTMLaction[type].call(this,node,selected);
+
+ return node;
+ },
+ CHTMLcoreNode: function (node) {return this.CHTMLchildNode(node,0)},
+
+ //
+ // Implementations for the various actions
+ //
+ CHTMLaction: {
+ toggle: function (node,selection) {
+ this.selection = selection;
+ node.onclick = MathJax.Callback(["CHTMLclick",this,CHTML.jax]);
+ node.style.cursor = "pointer";
+ },
+
+ statusline: function (node,selection) {
+ node.onmouseover = MathJax.Callback(["CHTMLsetStatus",this]);
+ node.onmouseout = MathJax.Callback(["CHTMLclearStatus",this]);
+ node.onmouseover.autoReset = node.onmouseout.autoReset = true;
+ },
+
+ tooltip: function(node,selection) {
+ if (this.data[1] && this.data[1].isToken) {
+ node.title = node.alt = this.data[1].data.join("");
+ } else {
+ node.onmouseover = MathJax.Callback(["CHTMLtooltipOver",this,CHTML.jax]);
+ node.onmouseout = MathJax.Callback(["CHTMLtooltipOut",this,CHTML.jax]);
+ node.onmouseover.autoReset = node.onmouseout.autoReset = true;
+ }
+ }
+ },
+
+ //
+ // Handle a click on the maction element
+ // (remove the original rendering and rerender)
+ //
+ CHTMLclick: function (jax,event) {
+ this.selection++;
+ if (this.selection > this.data.length) this.selection = 1;
+ var hover = !!jax.hover;
+ jax.Update();
+ if (hover) {
+ var span = document.getElementById(jax.inputID+"-Span");
+ MathJax.Extension.MathEvents.Hover.Hover(jax,span);
+ }
+ return MathJax.Extension.MathEvents.Event.False(event);
+ },
+
+ //
+ // Set/Clear the window status message
+ //
+ CHTMLsetStatus: function (event) {
+ // FIXME: Do something better with non-token elements
+ this.messageID = MathJax.Message.Set
+ ((this.data[1] && this.data[1].isToken) ?
+ this.data[1].data.join("") : this.data[1].toString());
+ },
+ CHTMLclearStatus: function (event) {
+ if (this.messageID) MathJax.Message.Clear(this.messageID,0);
+ delete this.messageID;
+ },
+
+ //
+ // Handle tooltips
+ //
+ CHTMLtooltipOver: function (jax,event) {
+ if (!event) event = window.event;
+ if (clear) {clearTimeout(clear); clear = null}
+ if (hover) clearTimeout(hover);
+ var x = event.pageX; var y = event.pageY;
+ if (x == null) {
+ x = event.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
+ y = event.clientY + document.body.scrollTop + document.documentElement.scrollTop;
+ }
+ var callback = MathJax.Callback(["CHTMLtooltipPost",this,jax,x+CONFIG.offsetX,y+CONFIG.offsetY])
+ hover = setTimeout(callback,CONFIG.delayPost);
+ },
+ CHTMLtooltipOut: function (jax,event) {
+ if (hover) {clearTimeout(hover); hover = null}
+ if (clear) clearTimeout(clear);
+ var callback = MathJax.Callback(["CHTMLtooltipClear",this,80]);
+ clear = setTimeout(callback,CONFIG.delayClear);
+ },
+ CHTMLtooltipPost: function (jax,x,y) {
+ hover = null; if (clear) {clearTimeout(clear); clear = null}
+ var tip = this.CHTMLtooltip;
+ tip.style.display = "block"; tip.style.opacity = "";
+// tip.style.filter = CHTML.config.styles["#MathJax_CHTML_Tooltip"].filter;
+ if (this === currentTip) return;
+ tip.style.left = x+"px"; tip.style.top = y+"px";
+ tip.innerHTML = '<span class="mjx-chtml"><span class="mjx-math"></span></span>';
+ CHTML.getMetrics(jax);
+ try {this.data[1].toCommonHTML(tip.firstChild.firstChild)} catch(err) {
+ if (!err.restart) throw err;
+ tip.style.display = "none";
+ MathJax.Callback.After(["CHTMLtooltipPost",this,jax,x,y],err.restart);
+ return;
+ }
+ currentTip = this;
+ },
+ CHTMLtooltipClear: function (n) {
+ var tip = this.CHTMLtooltip;
+ if (n <= 0) {
+ tip.style.display = "none";
+ tip.style.opacity = tip.style.filter = "";
+ clear = null;
+ } else {
+ tip.style.opacity = n/100;
+ tip.style.filter = "alpha(opacity="+n+")";
+ clear = setTimeout(MathJax.Callback(["CHTMLtooltipClear",this,n-20]),50);
+ }
+ }
+ });
+
+ MathJax.Hub.Startup.signal.Post("CommonHTML maction Ready");
+ MathJax.Ajax.loadComplete(CHTML.autoloadDir+"/maction.js");
+});
+
+// @license-end
diff --git a/js/mathjax/jax/output/CommonHTML/autoload/menclose.js b/js/mathjax/jax/output/CommonHTML/autoload/menclose.js
new file mode 100644
index 0000000..5ba5b02
--- /dev/null
+++ b/js/mathjax/jax/output/CommonHTML/autoload/menclose.js
@@ -0,0 +1,332 @@
+// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0
+/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
+/* vim: set ts=2 et sw=2 tw=80: */
+
+/*************************************************************
+ *
+ * MathJax/jax/output/CommonHTML/autoload/menclose.js
+ *
+ * Implements the CommonHTML output for <menclose> elements.
+ *
+ * ---------------------------------------------------------------------
+ *
+ * Copyright (c) 2015-2020 The MathJax Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () {
+ var VERSION = "2.7.9";
+ var MML = MathJax.ElementJax.mml,
+ CHTML = MathJax.OutputJax.CommonHTML;
+
+ var SVGNS = "http://www.w3.org/2000/svg";
+ var ARROWX = 4, ARROWDX = 1, ARROWY = 2;
+
+ MML.menclose.Augment({
+ toCommonHTML: function (node) {
+ var values = this.getValues("notation","thickness","padding");
+ if (values.thickness == null) values.thickness = ".075em";
+ if (values.padding == null) values.padding = ".2em";
+ //
+ // Get DOM nodes
+ //
+ node = this.CHTMLdefaultNode(node,{childNodes:"mjx-box", forceChild:true});
+ var child = node.firstChild, cbox = this.CHTMLbboxFor(0);
+ //
+ // Get the padding and rule thickness
+ //
+ var p = this.CHTMLlength2em(values.padding,1/CHTML.em); // padding for enclosure
+ var t = this.CHTMLlength2em(values.thickness,1/CHTML.em); // thickness of lines
+ t = Math.max(1,Math.round(t*CHTML.em))/CHTML.em;
+ var SOLID = CHTML.Px(t)+" solid";
+ var bb = {L:p, R:p, T:p, B:p, H:cbox.h+p, D:cbox.d+p, W:cbox.w+2*p};
+ child.style.padding = CHTML.Em(p);
+ //
+ // Eliminate duplicate notations.
+ //
+ var notations = MathJax.Hub.SplitList(values.notation), notation = {};
+ for (var i = 0, m = notations.length; i < m; i++) notation[notations[i]] = true;
+ if (notation[MML.NOTATION.UPDIAGONALARROW]) delete notation[MML.NOTATION.UPDIAGONALSTRIKE];
+ //
+ // Add the needed notations
+ //
+ for (var n in notation) {
+ if (notation.hasOwnProperty(n)) {
+ if (this.CHTMLnotation[n] && this.CHTMLnotation.hasOwnProperty(n))
+ this.CHTMLnotation[n].call(this,child,cbox,bb,p,t,SOLID);
+ }
+ }
+ //
+ // Adjust the bounding box
+ //
+ var BBOX = this.CHTML;
+ BBOX.w += bb.L + bb.R; BBOX.r += BBOX.L; if (BBOX.w > BBOX.r) BBOX.r = BBOX.w;
+ BBOX.h += bb.T; if (BBOX.h > BBOX.t) BBOX.t = BBOX.h;
+ BBOX.d += bb.B; if (BBOX.d > BBOX.b) BBOX.b = BBOX.d;
+
+ return node;
+ },
+ //
+ // The various notations and their implementations
+ //
+ CHTMLnotation: {
+
+ /********************************************************/
+
+ box: function (child,cbox,bb,p,t,SOLID) {
+ p -= t;
+ child.style.padding = CHTML.Em(p);
+ child.style.border = SOLID;
+ },
+
+ /********************************************************/
+
+ roundedbox: function (child,cbox,bb,p,t,SOLID) {
+ var r = Math.min(cbox.w,cbox.h+cbox.d+2*p)/4;
+ CHTML.addElement(child.parentNode,"mjx-box",{
+ style: {
+ padding:CHTML.Em(p-t), border:SOLID, "border-radius":CHTML.Em(r),
+ height:CHTML.Em(cbox.h+cbox.d), "vertical-align":CHTML.Em(-bb.D),
+ width:CHTML.Em(cbox.w), "margin-left":CHTML.Em(-bb.W)
+ }
+ });
+ },
+
+ /********************************************************/
+
+ circle: function (child,cbox,bb,p,t,SOLID) {
+ var H = bb.H, D = bb.D, W = bb.W;
+ var svg = this.CHTMLsvg(child,bb,t);
+ this.CHTMLsvgElement(svg.firstChild,"ellipse",{
+ rx:CHTML.Px(W/2-t/2), ry:CHTML.Px((H+D)/2-t/2),
+ cx:CHTML.Px(W/2), cy:CHTML.Px((H+D)/2)
+ });
+ this.CHTMLsvgViewBox(svg);
+ },
+
+ /********************************************************/
+
+ left: function (child,cbox,bb,p,t,SOLID) {
+ child.style.borderLeft = SOLID;
+ child.style.paddingLeft = CHTML.Em(p-t);
+ },
+
+ /********************************************************/
+
+ right: function (child,cbox,bb,p,t,SOLID) {
+ child.style.borderRight = SOLID;
+ child.style.paddingRight = CHTML.Em(p-t);
+ },
+
+ /********************************************************/
+
+ top: function (child,cbox,bb,p,t,SOLID) {
+ child.style.borderTop = SOLID;
+ child.style.paddingTop = CHTML.Em(p-t);
+ },
+
+ /********************************************************/
+
+ bottom: function (child,cbox,bb,p,t,SOLID) {
+ child.style.borderBottom = SOLID;
+ child.style.paddingBottom = CHTML.Em(p-t);
+ },
+
+ /********************************************************/
+
+ actuarial: function (child,cbox,bb,p,t,SOLID) {
+ child.style.borderTop = child.style.borderRight = SOLID;
+ child.style.paddingTop = child.style.paddingRight = CHTML.Em(p-t);
+ },
+
+ /********************************************************/
+
+ madruwb: function (child,cbox,bb,p,t,SOLID) {
+ child.style.borderBottom = child.style.borderRight = SOLID;
+ child.style.paddingBottom = child.style.paddingRight = CHTML.Em(p-t);
+ },
+
+ /********************************************************/
+
+ verticalstrike: function (child,cbox,bb,p,t,SOLID) {
+ CHTML.addElement(child.parentNode,"mjx-box",{
+ style: {
+ "border-left":SOLID,
+ height:CHTML.Em(bb.H+bb.D), "vertical-align":CHTML.Em(-bb.D),
+ width:CHTML.Em(cbox.w/2+p-t/2), "margin-left":CHTML.Em(-cbox.w/2-p-t/2)
+ }
+ });
+ },
+
+ /********************************************************/
+
+ horizontalstrike: function (child,cbox,bb,p,t,SOLID) {
+ CHTML.addElement(child.parentNode,"mjx-box",{
+ style: {
+ "border-top":SOLID,
+ height:CHTML.Em((bb.H+bb.D)/2-t/2), "vertical-align":CHTML.Em(-bb.D),
+ width:CHTML.Em(bb.W), "margin-left":CHTML.Em(-bb.W)
+ }
+ });
+ },
+
+ /********************************************************/
+
+ updiagonalstrike: function (child,cbox,bb,p,t,SOLID) {
+ var H = bb.H, D = bb.D, W = bb.W;
+ var svg = this.CHTMLsvg(child,bb,t);
+ this.CHTMLsvgElement(svg.firstChild,"line",{
+ x1:CHTML.Px(t/2), y1:CHTML.Px(H+D-t), x2:CHTML.Px(W-t), y2:CHTML.Px(t/2)
+ });
+ this.CHTMLsvgViewBox(svg);
+ },
+
+ /********************************************************/
+
+ downdiagonalstrike: function (child,cbox,bb,p,t,SOLID) {
+ var H = bb.H, D = bb.D, W = bb.W;
+ var svg = this.CHTMLsvg(child,bb,t);
+ this.CHTMLsvgElement(svg.firstChild,"line",{
+ x1:CHTML.Px(t/2), y1:CHTML.Px(t/2), x2:CHTML.Px(W-t), y2:CHTML.Px(H+D-t)
+ });
+ this.CHTMLsvgViewBox(svg);
+ },
+
+ /********************************************************/
+
+ updiagonalarrow: function (child,cbox,bb,p,t,SOLID) {
+ var H = bb.H + bb.D - t, W = bb.W - t/2;
+ var a = Math.atan2(H,W)*(-180/Math.PI).toFixed(3);
+ var R = Math.sqrt(H*H + W*W);
+ var svg = this.CHTMLsvg(child,bb,t);
+ var g = this.CHTMLsvgElement(svg.firstChild,"g",{
+ fill:"currentColor",
+ transform:"translate("+this.CHTMLpx(t/2)+" "+this.CHTMLpx(H+t/2)+") rotate("+a+")"
+ });
+ var x = t * ARROWX, dx = t * ARROWDX, y = t * ARROWY;
+ this.CHTMLsvgElement(g,"line",{
+ x1:CHTML.Px(t/2), y1:0, x2:CHTML.Px(R-x), y2:0
+ });
+ this.CHTMLsvgElement(g,"path",{
+ d: "M "+this.CHTMLpx(R-x)+",0 " +
+ "L "+this.CHTMLpx(R-x-dx)+","+this.CHTMLpx(y) +
+ "L "+this.CHTMLpx(R)+",0 " +
+ "L "+this.CHTMLpx(R-x-dx)+","+this.CHTMLpx(-y),
+ stroke:"none"
+ });
+ this.CHTMLsvgViewBox(svg);
+ },
+
+ /********************************************************/
+
+ phasorangle: function (child,cbox,bb,p,t,SOLID) {
+ var P = p, H = bb.H, D = bb.D;
+ p = (H+D)/2;
+ var W = bb.W + p - P; bb.W = W; bb.L = p;
+ child.style.margin = "0 0 0 "+CHTML.Em(p-P);
+ var svg = this.CHTMLsvg(child,bb,t);
+ this.CHTMLsvgElement(svg.firstChild,"path",{
+ d: "M "+this.CHTMLpx(p)+",1 " +
+ "L 1,"+this.CHTMLpx(H+D-t)+" L "+this.CHTMLpx(W)+","+this.CHTMLpx(H+D-t)
+ });
+ this.CHTMLsvgViewBox(svg);
+ },
+
+ /********************************************************/
+
+ longdiv: function (child,cbox,bb,p,t,SOLID) {
+ bb.W += 1.5*p; bb.L += 1.5*p;
+ var H = bb.H, D = bb.D, W = bb.W;
+ child.style.margin = "0 0 0 "+CHTML.Em(1.5*p);
+ var svg = this.CHTMLsvg(child,bb,t);
+ this.CHTMLsvgElement(svg.firstChild,"path",{
+ d: "M "+this.CHTMLpx(W)+",1 L 1,1 "+
+ "a"+this.CHTMLpx(p)+","+this.CHTMLpx((H+D)/2-t/2)+" 0 0,1 1,"+this.CHTMLpx(H+D-1.5*t)
+ });
+ this.CHTMLsvgViewBox(svg);
+ },
+
+ /********************************************************/
+
+ radical: function (child,cbox,bb,p,t,SOLID) {
+ bb.W += 1.5*p; bb.L += 1.5*p;
+ var H = bb.H, D = bb.D, W = bb.W;
+ child.style.margin = "0 0 0 "+CHTML.Em(1.5*p);
+ var svg = this.CHTMLsvg(child,bb,t);
+ this.CHTMLsvgElement(svg.firstChild,"path",{
+ d: "M 1,"+this.CHTMLpx(.6*(H+D)) +
+ " L "+this.CHTMLpx(p)+","+this.CHTMLpx(H+D) +
+ " L "+this.CHTMLpx(2*p)+",1 L "+this.CHTMLpx(W)+",1"
+ });
+ this.CHTMLsvgViewBox(svg);
+ }
+
+ /********************************************************/
+
+ },
+
+ //
+ // Pixels with no "px"
+ //
+ CHTMLpx: function (m) {
+ m *= CHTML.em;
+ if (Math.abs(m) < .1) return "0";
+ return m.toFixed(1).replace(/\.0$/,"");
+ },
+
+ //
+ // Create the SVG element and position it over the
+ // contents
+ //
+ CHTMLsvg: function (node,bbox,t) {
+ var svg = document.createElementNS(SVGNS,"svg");
+ if (svg.style) {
+ svg.style.width = CHTML.Em(bbox.W);
+ svg.style.height = CHTML.Em(bbox.H+bbox.D);
+ svg.style.verticalAlign = CHTML.Em(-bbox.D);
+ svg.style.marginLeft = CHTML.Em(-bbox.W);
+ }
+ var g = this.CHTMLsvgElement(svg,"g",{"stroke-width":CHTML.Px(t)});
+ if (this.CHTML.scale !== 1) {
+ g.setAttribute('transform', 'scale('+this.CHTML.scale+')');
+ }
+ node.parentNode.appendChild(svg);
+ return svg;
+ },
+ //
+ CHTMLsvgViewBox: function (svg) {
+ var bbox = svg.getBBox();
+ svg.setAttribute('viewBox', [bbox.x, bbox.y, bbox.width, bbox.height].join(' '));
+ },
+ //
+ // Add an SVG element to the given svg node
+ //
+ CHTMLsvgElement: function (svg,type,def) {
+ var obj = document.createElementNS(SVGNS,type); obj.isMathJax = true;
+ if (def) {for (var id in def) {if (def.hasOwnProperty(id)) {obj.setAttributeNS(null,id,def[id].toString())}}}
+ svg.appendChild(obj);
+ return obj;
+ }
+ });
+
+ //
+ // Just use default toCommonHTML for EI8
+ //
+ if (!document.createElementNS) delete MML.menclose.prototype.toCommonHTML;
+
+ MathJax.Hub.Startup.signal.Post("CommonHTML menclose Ready");
+ MathJax.Ajax.loadComplete(CHTML.autoloadDir+"/menclose.js");
+});
+
+// @license-end
diff --git a/js/mathjax/jax/output/CommonHTML/autoload/mglyph.js b/js/mathjax/jax/output/CommonHTML/autoload/mglyph.js
new file mode 100644
index 0000000..3f1f269
--- /dev/null
+++ b/js/mathjax/jax/output/CommonHTML/autoload/mglyph.js
@@ -0,0 +1,96 @@
+// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0
+/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
+/* vim: set ts=2 et sw=2 tw=80: */
+
+/*************************************************************
+ *
+ * MathJax/jax/output/CommonHTML/autoload/mglyph.js
+ *
+ * Implements the CommonHTML output for <mglyph> elements.
+ *
+ * ---------------------------------------------------------------------
+ *
+ * Copyright (c) 2015-2020 The MathJax Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () {
+ var VERSION = "2.7.9";
+ var MML = MathJax.ElementJax.mml,
+ CHTML = MathJax.OutputJax.CommonHTML,
+ LOCALE = MathJax.Localization;
+
+ MML.mglyph.Augment({
+ toCommonHTML: function (node,options) {
+ var values = this.getValues("src","width","height","valign","alt");
+ node = this.CHTMLcreateNode(node);
+ this.CHTMLhandleStyle(node);
+ this.CHTMLhandleScale(node);
+ if (values.src === "") {
+ var index = this.Get("index");
+ this.CHTMLgetVariant();
+ if (index && this.CHTMLvariant.style)
+ this.CHTMLhandleText(node,String.fromCharCode(index),this.CHTMLvariant);
+ } else {
+ var bbox = this.CHTML;
+ if (!bbox.img) bbox.img = MML.mglyph.GLYPH[values.src];
+ if (!bbox.img) {
+ bbox.img = MML.mglyph.GLYPH[values.src] = {img: new Image(), status: "pending"};
+ bbox.img.img.onload = MathJax.Callback(["CHTMLimgLoaded",this]);
+ bbox.img.img.onerror = MathJax.Callback(["CHTMLimgError",this]);
+ bbox.img.img.src = values.src;
+ MathJax.Hub.RestartAfter(bbox.img.img.onload);
+ }
+ if (bbox.img.status !== "OK") {
+ var err = MML.Error(LOCALE._(["MathML","BadMglyph"],"Bad mglyph: %1",values.src));
+ err.data[0].data[0].mathsize = "75%";
+ this.Append(err); err.toCommonHTML(node); this.data.pop();
+ bbox.combine(err.CHTML,0,0,1);
+ } else {
+ var img = CHTML.addElement(node,"img",{
+ isMathJax:true, src:values.src, alt:values.alt, title:values.alt
+ });
+ var w = values.width, h = values.height;
+ var W = bbox.img.img.width/CHTML.em, H = bbox.img.img.height/CHTML.em;
+ var WW = W, HH = H;
+ if (w !== "") {W = this.CHTMLlength2em(w,WW); H = (WW ? W/WW * HH : 0)}
+ if (h !== "") {H = this.CHTMLlength2em(h,HH); if (w === "") W = (HH ? H/HH * WW : 0)}
+ img.style.width = CHTML.Em(W); bbox.w = bbox.r = W;
+ img.style.height = CHTML.Em(H); bbox.h = bbox.t = H;
+ if (values.valign) {
+ bbox.d = bbox.b = -this.CHTMLlength2em(values.valign,HH);
+ img.style.verticalAlign = CHTML.Em(-bbox.d);
+ bbox.h -= bbox.d; bbox.t = bbox.h;
+ }
+ }
+ }
+ this.CHTMLhandleSpace(node);
+ this.CHTMLhandleBBox(node);
+ this.CHTMLhandleColor(node);
+ return node;
+ },
+ CHTMLimgLoaded: function (event,status) {
+ if (typeof(event) === "string") status = event;
+ this.CHTML.img.status = (status || "OK");
+ },
+ CHTMLimgError: function () {this.CHTML.img.img.onload("error")}
+ },{
+ GLYPH: {} // global list of all loaded glyphs
+ });
+
+ MathJax.Hub.Startup.signal.Post("CommonHTML mglyph Ready");
+ MathJax.Ajax.loadComplete(CHTML.autoloadDir+"/mglyph.js");
+});
+
+// @license-end
diff --git a/js/mathjax/jax/output/CommonHTML/autoload/mmultiscripts.js b/js/mathjax/jax/output/CommonHTML/autoload/mmultiscripts.js
new file mode 100644
index 0000000..e9cce12
--- /dev/null
+++ b/js/mathjax/jax/output/CommonHTML/autoload/mmultiscripts.js
@@ -0,0 +1,298 @@
+// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0
+/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
+/* vim: set ts=2 et sw=2 tw=80: */
+
+/*************************************************************
+ *
+ * MathJax/jax/output/CommonHTML/autoload/mmultiscripts.js
+ *
+ * Implements the CommonHTML output for <mmultiscripts> elements.
+ *
+ * ---------------------------------------------------------------------
+ *
+ * Copyright (c) 2015-2020 The MathJax Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () {
+ var VERSION = "2.7.9";
+ var MML = MathJax.ElementJax.mml,
+ CHTML = MathJax.OutputJax.CommonHTML;
+
+ MML.mmultiscripts.Augment({
+ toCommonHTML: function (node,options) {
+ var stretch = (options||{}).stretch;
+ if (!stretch) {
+ node = this.CHTMLcreateNode(node);
+ this.CHTMLhandleStyle(node);
+ this.CHTMLgetVariant();
+ this.CHTMLhandleScale(node);
+ }
+ CHTML.BBOX.empty(this.CHTML);
+
+ //
+ // Get base node
+ //
+ var base, bbox;
+ if (stretch) {
+ base = CHTML.getNode(node,"mjx-base");
+ } else {
+ this.CHTMLaddChild(node,0,{type:"mjx-base", noBBox:true, forceChild:true});
+ base = node.firstChild;
+ }
+ bbox = this.CHTMLbboxFor(0);
+ if (bbox.ic) {
+ bbox.R -= bbox.ic; // remove IC (added by mo and mi)
+ if (!stretch) base.style.marginRight = CHTML.Em(-bbox.ic);
+ delta = 1.3*bbox.ic + .05; // make faked IC be closer to expeted results
+ }
+
+ //
+ // Collect scripts into horizontal boxes and add them into the node
+ //
+ var BOX = {}, BBOX = {};
+ this.CHTMLgetScripts(BOX,BBOX,stretch,node);
+ var sub = BOX.sub, sup = BOX.sup, presub = BOX.presub, presup = BOX.presup;
+ var sbox = BBOX.sub, Sbox = BBOX.sup, pbox = BBOX.presub, Pbox = BBOX.presup;
+ if (!stretch) this.CHTMLaddBoxes(node,base,BOX);
+
+ //
+ // Get the initial values for the variables
+ //
+ var values = this.getValues("scriptlevel","scriptsizemultiplier");
+ var sscale = (this.Get("scriptlevel") < 3 ? values.scriptsizemultiplier : 1);
+ var ex = CHTML.TEX.x_height, s = CHTML.TEX.scriptspace;
+ var q = CHTML.TEX.sup_drop * sscale, r = CHTML.TEX.sub_drop * sscale;
+ var u = bbox.h - q, v = bbox.d + r, delta = 0, p;
+ var bmml = this.data[this.base];
+ if (bmml && (bmml.type === "mi" || bmml.type === "mo")) {
+ if (CHTML.isChar(bmml.data.join("")) && bbox.rscale === 1 && !bbox.sH &&
+ !bmml.Get("largeop")) {u = v = 0}
+ }
+ values = this.getValues("displaystyle","subscriptshift","superscriptshift","texprimestyle");
+ values.subscriptshift = (values.subscriptshift === "" ? 0 : this.CHTMLlength2em(values.subscriptshift));
+ values.superscriptshift = (values.superscriptshift === "" ? 0 : this.CHTMLlength2em(values.superscriptshift));
+
+ var dx = (presub ? s+pbox.w : presup ? s+Pbox.w-delta : 0);
+ this.CHTML.combine(bbox,dx,0); var x = this.CHTML.w;
+
+ //
+ // Place the scripts as needed
+ //
+ if (!sup && !presup) {
+ v = Math.max(v,CHTML.TEX.sub1,values.subscriptshift);
+ if (sub) v = Math.max(v,sbox.h-(4/5)*ex);
+ if (presub) v = Math.max(v,pbox.h-(4/5)*ex);
+ if (sub) this.CHTMLplaceSubOnly(sub,sbox,x,v,s);
+ if (presub) this.CHTMLplacePresubOnly(presub,pbox,v,s);
+ } else {
+ if (!sub && !presub) {
+ p = CHTML.TEX[(values.displaystyle ? "sup1" : (values.texprimestyle ? "sup3" : "sup2"))];
+ u = Math.max(u,p,values.superscriptshift);
+ if (sup) u = Math.max(u,Sbox.d+(1/4)*ex);
+ if (presup) u = Math.max(u,Pbox.d+(1/4)*ex);
+ if (sup) this.CHTMLplaceSupOnly(sup,Sbox,x,delta,u,s);
+ if (presup) this.CHTMLplacePresupOnly(presup,Pbox,delta,u,s);
+ } else {
+ v = Math.max(v,CHTML.TEX.sub2);
+ var t = CHTML.TEX.rule_thickness;
+ var h = (sbox||pbox).h, d = (Sbox||Pbox).d;
+ if (presub) h = Math.max(h,pbox.h);
+ if (presup) d = Math.max(d,Pbox.d);
+ if ((u - d) - (h - v) < 3*t) {
+ v = 3*t - u + d + h; q = (4/5)*ex - (u - d);
+ if (q > 0) {u += q; v -= q}
+ }
+ u = Math.max(u,values.superscriptshift);
+ v = Math.max(v,values.subscriptshift);
+ if (sup) {
+ if (sub) {this.CHTMLplaceSubSup(sub,sbox,sup,Sbox,x,delta,u,v,s)}
+ else {this.CHTMLplaceSupOnly(sup,Sbox,x,delta,u,s)}
+ } else if (sub) {this.CHTMLplaceSubOnly(sub,sbox,x,v,s)}
+ if (presup) {
+ if (presub) {this.CHTMLplacePresubPresup(presub,pbox,presup,Pbox,delta,u,v,s)}
+ else {this.CHTMLplacePresupOnly(presup,Pbox,delta,u,s)}
+ } else if (presub) {this.CHTMLplacePresubOnly(presub,pbox,v,s)}
+ }
+ }
+ this.CHTML.clean();
+ this.CHTMLhandleSpace(node);
+ this.CHTMLhandleBBox(node);
+ this.CHTMLhandleColor(node);
+ return node;
+ },
+ //
+ // Get the subscript, superscript, presubscript, and presuperscript
+ // boxes, with proper spacing, and computer their bounding boxes.
+ //
+ CHTMLgetScripts: function (BOX,BBOX,stretch,node) {
+ if (stretch) {
+ BOX.sub = CHTML.getNode(node,"mjx-sub");
+ BOX.sup = CHTML.getNode(node,"mjx-sup");
+ BOX.presub = CHTML.getNode(node,"mjx-presub");
+ BOX.presup = CHTML.getNode(node,"mjx-presup");
+ BBOX.sub = this.CHTMLbbox.sub;
+ BBOX.sup = this.CHTMLbbox.sup;
+ BBOX.presub = this.CHTMLbbox.presub;
+ BBOX.presup = this.CHTMLbbox.presup;
+ return;
+ }
+ this.CHTMLbbox = BBOX; // save for when stretched
+ var state = {i:1, w:0, BOX:BOX, BBOX:BBOX}, m = this.data.length;
+ var sub = "sub", sup = "sup";
+ while (state.i < m) {
+ if ((this.data[state.i]||{}).type === "mprescripts") {
+ state.i++; state.w = 0;
+ sub = "presub"; sup = "presup";
+ } else {
+ var sbox = this.CHTMLaddScript(sub,state,node);
+ var Sbox = this.CHTMLaddScript(sup,state,node);
+ var w = Math.max((sbox ? sbox.rscale*sbox.w : 0),(Sbox ? Sbox.rscale*Sbox.w : 0));
+ this.CHTMLpadScript(sub,w,sbox,state);
+ this.CHTMLpadScript(sup,w,Sbox,state);
+ state.w += w;
+ }
+ }
+ if (BBOX.sub) BBOX.sub.clean();
+ if (BBOX.sup) BBOX.sup.clean();
+ if (BBOX.presub) BBOX.presub.clean();
+ if (BBOX.presup) BBOX.presup.clean();
+ },
+ //
+ // Add a script to the proper box, creating the box if needed,
+ // and padding the box to account for any <none/> elements.
+ // Return the bounding box for the script for later use.
+ //
+ CHTMLaddScript: function (type,state,node) {
+ var BOX, BBOX, data = this.data[state.i];
+ if (data && data.type !== "none" && data.type !== "mprescripts") {
+ BOX = state.BOX[type];
+ if (!BOX) {
+ //
+ // Add the box to the node temporarily so that it is in the DOM
+ // (so that CHTMLnodeElement() can be used in the toCommonHTML() below).
+ // See issue #1480.
+ //
+ BOX = state.BOX[type] = CHTML.addElement(node,"mjx-"+type);
+ BBOX = state.BBOX[type] = CHTML.BBOX.empty();
+ if (state.w) {
+ BOX.style.paddingLeft = CHTML.Em(state.w);
+ BBOX.w = BBOX.r = state.w; BBOX.x = state.w;
+ }
+ }
+ data.toCommonHTML(BOX);
+ BBOX = data.CHTML;
+ }
+ if (data && data.type !== "mprescripts") state.i++;
+ return BBOX;
+ },
+ //
+ // Add padding to the script box to make match the width of the
+ // super- or subscript that is above or below it, and adjust the
+ // bounding box for the script row. If these are pre-scripts,
+ // right-justify the scripts, otherwise, left-justify them.
+ //
+ CHTMLpadScript: function (type,w,bbox,state) {
+ if (!bbox) bbox = {w:0, fake:1, rscale:1};
+ var BBOX = state.BBOX[type], dx = 0, dw = 0;
+ if (BBOX) {
+ if (bbox.rscale*bbox.w < w) {
+ var BOX = state.BOX[type]; dw = w-bbox.rscale*bbox.w;
+ var space = CHTML.Element("mjx-spacer",{style:{width:CHTML.Em(dw)}});
+ if (type.substr(0,3) === "pre" && !bbox.fake) {
+ BOX.insertBefore(space,BOX.lastChild);
+ dx = dw; dw = 0;
+ } else {
+ BOX.appendChild(space);
+ }
+ }
+ if (bbox.fake) {BBOX.w += dx} else {BBOX.combine(bbox,BBOX.w+dx,0)}
+ BBOX.w += dw;
+ }
+ },
+ //
+ // Add the boxes into the main node, creating stacks when needed
+ //
+ CHTMLaddBoxes: function (node,base,BOX) {
+ var sub = BOX.sub, sup = BOX.sup, presub = BOX.presub, presup = BOX.presup;
+ if (presub && presup) {
+ var prestack = CHTML.Element("mjx-prestack"); node.insertBefore(prestack,base);
+ prestack.appendChild(presup); prestack.appendChild(presub);
+ } else {
+ if (presub) node.insertBefore(presub,base);
+ if (presup) node.insertBefore(presup,base);
+ }
+ if (sub && sup) {
+ var stack = CHTML.addElement(node,"mjx-stack");
+ stack.appendChild(sup); stack.appendChild(sub);
+ } else {
+ if (sub) node.appendChild(sub);
+ if (sup) node.appendChild(sup);
+ }
+ },
+ //
+ // Handle positioning the various scripts
+ //
+ CHTMLplaceSubOnly: function (sub,sbox,x,v,s) {
+ sub.style.verticalAlign = CHTML.Em(-v);
+ sub.style.marginRight = CHTML.Em(s); sbox.w += s;
+ this.CHTML.combine(sbox,x,-v);
+ },
+ CHTMLplaceSupOnly: function (sup,Sbox,x,delta,u,s) {
+ sup.style.verticalAlign = CHTML.Em(u);
+ sup.style.paddingLeft = CHTML.Em(delta);
+ sup.style.paddingRight = CHTML.Em(s); Sbox.w += s;
+ this.CHTML.combine(Sbox,x+delta,u);
+ },
+ CHTMLplaceSubSup: function (sub,sbox,sup,Sbox,x,delta,u,v,s) {
+ sub.style.paddingRight = CHTML.Em(s); sbox.w += s;
+ sup.style.paddingBottom = CHTML.Em(u+v-Sbox.d-sbox.h);
+ sup.style.paddingLeft = CHTML.Em(delta+(Sbox.x||0));
+ sup.style.paddingRight = CHTML.Em(s); Sbox.w += s;
+ sup.parentNode.style.verticalAlign = CHTML.Em(-v);
+ this.CHTML.combine(sbox,x,-v);
+ this.CHTML.combine(Sbox,x+delta,u);
+ },
+ CHTMLplacePresubOnly: function (presub,pbox,v,s) {
+ presub.style.verticalAlign = CHTML.Em(-v);
+ presub.style.marginLeft = CHTML.Em(s);
+ this.CHTML.combine(pbox,s,-v);
+ },
+ CHTMLplacePresupOnly: function (presup,Pbox,delta,u,s) {
+ presup.style.verticalAlign = CHTML.Em(u);
+ presup.style.paddingLeft = CHTML.Em(s);
+ presup.style.paddingRight = CHTML.Em(-delta);
+ this.CHTML.combine(Pbox,s,u);
+ },
+ CHTMLplacePresubPresup: function (presub,pbox,presup,Pbox,delta,u,v,s) {
+ presub.style.paddingLeft = CHTML.Em(s);
+ presup.style.paddingBottom = CHTML.Em(u+v-Pbox.d-pbox.h);
+ presup.style.paddingLeft = CHTML.Em(delta+s+(Pbox.x||0));
+ presup.style.paddingRight = CHTML.Em(-delta);
+ presup.parentNode.style.verticalAlign = CHTML.Em(-v);
+ this.CHTML.combine(pbox,s,-v);
+ this.CHTML.combine(Pbox,s+delta,u);
+ },
+ //
+ // Handle stretchy bases
+ //
+ CHTMLstretchH: MML.mbase.CHTMLstretchH,
+ CHTMLstretchV: MML.mbase.CHTMLstretchV
+ });
+
+ MathJax.Hub.Startup.signal.Post("CommonHTML mmultiscripts Ready");
+ MathJax.Ajax.loadComplete(CHTML.autoloadDir+"/mmultiscripts.js");
+});
+
+// @license-end
diff --git a/js/mathjax/jax/output/CommonHTML/autoload/ms.js b/js/mathjax/jax/output/CommonHTML/autoload/ms.js
new file mode 100644
index 0000000..ded30fc
--- /dev/null
+++ b/js/mathjax/jax/output/CommonHTML/autoload/ms.js
@@ -0,0 +1,75 @@
+// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0
+/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
+/* vim: set ts=2 et sw=2 tw=80: */
+
+/*************************************************************
+ *
+ * MathJax/jax/output/CommonHTML/autoload/ms.js
+ *
+ * Implements the CommonHTML output for <ms> elements.
+ *
+ * ---------------------------------------------------------------------
+ *
+ * Copyright (c) 2015-2020 The MathJax Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () {
+ var VERSION = "2.7.9";
+ var MML = MathJax.ElementJax.mml,
+ CHTML = MathJax.OutputJax.CommonHTML;
+
+ MML.ms.Augment({
+ toCommonHTML: function (node) {
+ //
+ // Create the node and handle its styles and scaling
+ // Get the variant and an empty bounding box
+ //
+ node = this.CHTMLcreateNode(node);
+ this.CHTMLhandleStyle(node);
+ this.CHTMLgetVariant();
+ this.CHTMLhandleScale(node);
+ CHTML.BBOX.empty(this.CHTML);
+ //
+ // Get the quotes to use
+ //
+ var values = this.getValues("lquote","rquote","mathvariant");
+ if (!this.hasValue("lquote") || values.lquote === '"') values.lquote = "\u201C";
+ if (!this.hasValue("rquote") || values.rquote === '"') values.rquote = "\u201D";
+ if (values.lquote === "\u201C" && values.mathvariant === "monospace") values.lquote = '"';
+ if (values.rquote === "\u201D" && values.mathvariant === "monospace") values.rquote = '"';
+ //
+ // Add the left quote, the child nodes, and the right quote
+ //
+ var text = values.lquote+this.data.join("")+values.rquote; // FIXME: handle mglyph?
+ this.CHTMLhandleText(node,text,this.CHTMLvariant);
+ //
+ // Finish the bbox, add any needed space and color
+ //
+ this.CHTML.clean();
+ this.CHTMLhandleSpace(node);
+ this.CHTMLhandleBBox(node);
+ this.CHTMLhandleColor(node);
+ //
+ // Return the completed node
+ //
+ return node;
+ }
+ });
+
+ MathJax.Hub.Startup.signal.Post("CommonHTML ms Ready");
+ MathJax.Ajax.loadComplete(CHTML.autoloadDir+"/ms.js");
+});
+
+// @license-end
diff --git a/js/mathjax/jax/output/CommonHTML/autoload/mtable.js b/js/mathjax/jax/output/CommonHTML/autoload/mtable.js
new file mode 100644
index 0000000..2e8b397
--- /dev/null
+++ b/js/mathjax/jax/output/CommonHTML/autoload/mtable.js
@@ -0,0 +1,604 @@
+// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0
+/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
+/* vim: set ts=2 et sw=2 tw=80: */
+
+/*************************************************************
+ *
+ * MathJax/jax/output/CommonHTML/autoload/mtable.js
+ *
+ * Implements the CommonHTML output for <mtable> elements.
+ *
+ * ---------------------------------------------------------------------
+ *
+ * Copyright (c) 2015-2020 The MathJax Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () {
+ var VERSION = "2.7.9";
+ var MML = MathJax.ElementJax.mml,
+ CONFIG = MathJax.Hub.config,
+ CHTML = MathJax.OutputJax.CommonHTML,
+ SPLIT = MathJax.Hub.SplitList;
+
+ var LABEL = -1,
+ BIGDIMEN = 1000000;
+
+ MML.mtable.Augment({
+ toCommonHTML: function (node) {
+ //
+ // Create the table nodes and put them in a table
+ // (so that its bottom is on the baseline, rather than aligned on the top row)
+ //
+ var state = {rows:[], labels:[], labeled: false};
+ node = this.CHTMLdefaultNode(node,{noBBox:true, childOptions:state});
+ var table = CHTML.Element("mjx-table");
+ while (node.firstChild) table.appendChild(node.firstChild);
+ node.appendChild(table);
+ //
+ // Get the table attributes
+ //
+ var values = this.getValues("columnalign","rowalign","columnspacing","rowspacing",
+ "columnwidth","equalcolumns","equalrows",
+ "columnlines","rowlines","frame","framespacing",
+ "align","width","side","minlabelspacing","useHeight");
+ var t = CHTML.TEX.min_rule_thickness/CHTML.em;
+ state.t = CHTML.Px(t*this.CHTML.scale,1);
+ //
+ // Create the table
+ //
+ this.CHTMLgetBoxSizes(values,state);
+ this.CHTMLgetAttributes(values,state);
+ this.CHTMLadjustCells(values,state);
+ if (values.frame) table.style.border = state.t+" "+values.frame;
+ this.CHTMLalignV(values,state,node);
+ this.CHTMLcolumnWidths(values,state,node);
+ this.CHTMLstretchCells(values,state);
+ if (state.labeled) this.CHTMLaddLabels(values,state,node,table);
+ //
+ // Set the bounding box (ignores overlapping outside of the table)
+ //
+ var BBOX = this.CHTML;
+ BBOX.w = BBOX.r = state.R;
+ BBOX.h = BBOX.t = state.T-state.B;
+ BBOX.d = BBOX.b = state.B;
+ if (!values.frame && !BBOX.pwidth) {
+ node.style.padding = "0 "+CHTML.Em(1/6);
+ BBOX.L = BBOX.R = 1/6;
+ }
+ //
+ // Add any needed space and color
+ //
+ this.CHTMLhandleSpace(node);
+ this.CHTMLhandleBBox(node);
+ this.CHTMLhandleColor(node);
+ //
+ // Return the completed node
+ //
+ return node;
+ },
+ //
+ // Get the natural height, depth, and widths of the rows and columns
+ //
+ CHTMLgetBoxSizes: function (values,state) {
+ var LH = CHTML.FONTDATA.lineH * values.useHeight,
+ LD = CHTML.FONTDATA.lineD * values.useHeight;
+ var H = [], D = [], W = [], J = -1, i, m;
+ for (i = 0, m = this.data.length; i < m; i++) {
+ var row = this.data[i], s = (row.type === "mtr" ? 0 : LABEL);
+ H[i] = LH; D[i] = LD;
+ for (var j = s, M = row.data.length + s; j < M; j++) {
+ if (W[j] == null) {W[j] = -BIGDIMEN; if (j > J) J = j}
+ var cbox = row.data[j-s].CHTML;
+ if (cbox.h > H[i]) H[i] = cbox.h;
+ if (cbox.d > D[i]) D[i] = cbox.d;
+ if (cbox.w > W[j]) W[j] = cbox.w;
+ }
+ }
+ if (values.equalrows) {
+ state.HD = true;
+ var HH = Math.max.apply(Math,H);
+ var DD = Math.max.apply(Math,D);
+ for (i = 0, m = H.length; i < m; i++) {H[i] = HH; D[i] = DD}
+ }
+ state.H = H; state.D = D; state.W = W, state.J = J;
+ },
+ //
+ // Pad the spacing and alignment attributes to match the size of the table
+ //
+ CHTMLgetAttributes: function (values,state) {
+ var CSPACE = SPLIT(values.columnspacing),
+ RSPACE = SPLIT(values.rowspacing),
+ CALIGN = SPLIT(values.columnalign),
+ RALIGN = SPLIT(values.rowalign),
+ CLINES = SPLIT(values.columnlines),
+ RLINES = SPLIT(values.rowlines),
+ CWIDTH = SPLIT(values.columnwidth),
+ RCALIGN = [], i, m, J = state.J, M = state.rows.length-1;
+ for (i = 0, m = CSPACE.length; i < m; i++) CSPACE[i] = this.CHTMLlength2em(CSPACE[i]);
+ for (i = 0, m = RSPACE.length; i < m; i++) RSPACE[i] = this.CHTMLlength2em(RSPACE[i]);
+ while (CSPACE.length < J) CSPACE.push(CSPACE[CSPACE.length-1]);
+ while (CALIGN.length <= J) CALIGN.push(CALIGN[CALIGN.length-1]);
+ while (CLINES.length < J) CLINES.push(CLINES[CLINES.length-1]);
+ while (CWIDTH.length <= J) CWIDTH.push(CWIDTH[CWIDTH.length-1]);
+ while (RSPACE.length < M) RSPACE.push(RSPACE[RSPACE.length-1]);
+ while (RALIGN.length <= M) RALIGN.push(RALIGN[RALIGN.length-1]);
+ while (RLINES.length < M) RLINES.push(RLINES[RLINES.length-1]);
+ CALIGN[LABEL] = (values.side.substr(0,1) === "l" ? "left" : "right");
+ //
+ // Override aligment data based on row-specific attributes
+ //
+ for (i = 0; i <= M; i++) {
+ var row = this.data[i]; RCALIGN[i] = [];
+ if (row.rowalign) RALIGN[i] = row.rowalign;
+ if (row.columnalign) {
+ RCALIGN[i] = SPLIT(row.columnalign);
+ while (RCALIGN[i].length <= J) RCALIGN[i].push(RCALIGN[i][RCALIGN[i].length-1]);
+ }
+ }
+ //
+ // Handle framespacing
+ //
+ var FSPACE = SPLIT(values.framespacing);
+ if (FSPACE.length != 2) FSPACE = SPLIT(this.defaults.framespacing);
+ FSPACE[0] = Math.max(0,this.CHTMLlength2em(FSPACE[0]));
+ FSPACE[1] = Math.max(0,this.CHTMLlength2em(FSPACE[1]));
+ if (values.columnlines.replace(/none/g,"").replace(/ /g,"") !== "" ||
+ values.rowlines.replace(/none/g,"").replace(/ /g,"") !== "") values.fspace = true;
+ //
+ // Pad arrays so that final column can be treated as all the others
+ //
+ if (values.frame === MML.LINES.NONE) delete values.frame; else values.fspace = true;
+ if (values.frame) {
+ FSPACE[0] = Math.max(0,FSPACE[0]);
+ FSPACE[1] = Math.max(0,FSPACE[1]);
+ }
+ if (values.fspace) {
+ CSPACE[J] = FSPACE[0]; RSPACE[M] = FSPACE[1];
+ } else {
+ CSPACE[J] = RSPACE[M] = 0;
+ }
+ CLINES[J] = RLINES[M] = MML.LINES.NONE;
+ //
+ // Save everything in the state
+ //
+ state.CSPACE = CSPACE; state.RSPACE = RSPACE;
+ state.CALIGN = CALIGN; state.RALIGN = RALIGN;
+ state.CLINES = CLINES; state.RLINES = RLINES;
+ state.CWIDTH = CWIDTH; state.RCALIGN = RCALIGN;
+ state.FSPACE = FSPACE;
+ },
+ //
+ // Add styles to cells to handle borders, spacing, alignment, etc.
+ //
+ CHTMLadjustCells: function(values,state) {
+ var ROWS = state.rows,
+ CSPACE = state.CSPACE, CLINES = state.CLINES,
+ RSPACE = state.RSPACE, RLINES = state.RLINES,
+ CALIGN = state.CALIGN, RALIGN = state.RALIGN,
+ RCALIGN = state.RCALIGN;
+ CSPACE[state.J] *= 2; RSPACE[ROWS.length-1] *= 2; // since halved below
+ var T = "0", B, R, L, border, cbox, align, lastB = 0;
+ if (values.fspace) {
+ lastB = state.FSPACE[1];
+ T = CHTML.Em(state.FSPACE[1]);
+ }
+ state.RHD = []; state.RH = [];
+ for (var i = 0, m = ROWS.length; i < m; i++) {
+ var row = ROWS[i], rdata = this.data[i];
+ //
+ // Space and borders between rows
+ //
+ B = RSPACE[i]/2; border = null; L = "0";
+ if (RLINES[i] !== MML.LINES.NONE && RLINES[i] !== "") border = state.t+" "+RLINES[i];
+ if (border || (CLINES[j] !== MML.LINES.NONE && CLINES[j] !== "")) {
+ while (row.length <= state.J) {
+ row.push(CHTML.addElement(row.node,"mjx-mtd",null,[['span']]));
+ }
+ }
+ state.RH[i] = lastB + state.H[i]; // distance to baseline in row
+ lastB = Math.max(0,B);
+ state.RHD[i] = state.RH[i] + lastB + state.D[i]; // total height of row
+ B = CHTML.Em(lastB);
+ //
+ // Frame space for initial cell
+ //
+ if (values.fspace) L = CHTML.Em(state.FSPACE[0]);
+ //
+ // The cells in the row
+ //
+ for (var j = 0, M = row.length; j < M; j++) {
+ var s = (rdata.type === "mtr" ? 0 : LABEL);
+ var mtd = rdata.data[j-s] || {CHTML: CHTML.BBOX.zero()};
+ var cell = row[j].style; cbox = mtd.CHTML;
+ //
+ // Space and borders between columns
+ //
+ R = CSPACE[j]/2;
+ if (CLINES[j] !== MML.LINES.NONE) {
+ cell.borderRight = state.t+" "+CLINES[j];
+ R -= 1/CHTML.em/2;
+ }
+ R = CHTML.Em(Math.max(0,R));
+ cell.padding = T+" "+R+" 0px "+L;
+ if (border) cell.borderBottom = border;
+ L = R;
+ //
+ // Handle vertical alignment
+ //
+ align = (mtd.rowalign||(this.data[i]||{}).rowalign||RALIGN[i]);
+ var H = Math.max(1,cbox.h), D = Math.max(.2,cbox.d),
+ HD = (state.H[i]+state.D[i]) - (H+D),
+ child = row[j].firstChild.style;
+ if (align === MML.ALIGN.TOP) {
+ if (HD) child.marginBottom = CHTML.Em(HD);
+ cell.verticalAlign = "top";
+ } else if (align === MML.ALIGN.BOTTOM) {
+ cell.verticalAlign = "bottom";
+ if (HD) child.marginTop = CHTML.Em(HD);
+ } else if (align === MML.ALIGN.CENTER) {
+ if (HD) child.marginTop = child.marginBottom = CHTML.Em(HD/2);
+ cell.verticalAlign = "middle";
+ } else {
+ if (H !== state.H[i]) child.marginTop = CHTML.Em(state.H[i]-H);
+ }
+ //
+ // Handle horizontal alignment
+ //
+ align = (mtd.columnalign||RCALIGN[i][j]||CALIGN[j]);
+ if (align !== MML.ALIGN.CENTER) cell.textAlign = align;
+ }
+ row.node.style.height = CHTML.Em(state.RHD[i]);
+ T = B;
+ }
+ CSPACE[state.J] /= 2; RSPACE[ROWS.length-1] /= 2; // back to normal
+ },
+ //
+ // Align the table vertically according to the align attribute
+ //
+ CHTMLalignV: function (values,state,node) {
+ var n, M = state.rows.length, H = state.H, D = state.D, RSPACE = state.RSPACE;
+ //
+ // Get alignment type and row number
+ //
+ if (typeof(values.align) !== "string") values.align = String(values.align);
+ if (values.align.match(/(top|bottom|center|baseline|axis)( +(-?\d+))?/)) {
+ n = parseInt(RegExp.$3||"0");
+ values.align = RegExp.$1
+ if (n < 0) n += state.rows.length + 1;
+ if (n > M || n <= 0) n = null;
+ } else {
+ values.align = this.defaults.align;
+ }
+ //
+ // Get table height and baseline offset
+ //
+ var T = 0, B = 0, a = CHTML.TEX.axis_height;
+ if (values.fspace) T += state.FSPACE[1];
+ if (values.frame) {T += 2/CHTML.em; B += 1/CHTML.em}
+ for (var i = 0; i < M; i++) {
+ var h = H[i], d = D[i];
+ T += h + d + RSPACE[i];
+ if (n) {
+ if (i === n-1) {
+ B += ({top:h+d, bottom:0, center:(h+d)/2,
+ baseline:d, axis:a+d})[values.align] + RSPACE[i];
+ }
+ if (i >= n) B += h + d + RSPACE[i];
+ }
+ }
+ if (!n) B = ({top:T, bottom:0, center:T/2, baseline:T/2, axis:T/2-a})[values.align];
+ //
+ // Place the node and save the values
+ //
+ if (B) node.style.verticalAlign = CHTML.Em(-B);
+ state.T = T; state.B = B;
+ },
+ //
+ // Determine column widths and set the styles for the columns
+ //
+ CHTMLcolumnWidths: function (values,state,node) {
+ var CWIDTH = state.CWIDTH, CSPACE = state.CSPACE, J = state.J, j;
+ var WW = 0, setWidths = false, relWidth = values.width.match(/%$/);
+ var i, m, w;
+ //
+ // Handle equal columns by adjusting the CWIDTH array
+ //
+ if (values.width !== "auto" && !relWidth) {
+ WW = Math.max(0,this.CHTMLlength2em(values.width,state.R));
+ setWidths = true;
+ }
+ if (values.equalcolumns) {
+ if (relWidth) {
+ //
+ // Use percent of total (not perfect, but best we can do)
+ //
+ var p = CHTML.Percent(1/(J+1));
+ for (j = 0; j <= J; j++) CWIDTH[j] = p;
+ } else {
+ //
+ // For width = auto, make all widths equal the widest,
+ // otherwise, for specific width, remove intercolumn space
+ // and divide by number of columns to get widest space.
+ //
+ w = Math.max.apply(Math,state.W);
+ if (values.width !== "auto") {
+ var S = (values.fspace ? state.FSPACE[0] + (values.frame ? 2/CHTML.em : 0) : 0);
+ for (j = 0; j <= J; j++) S += CSPACE[j];
+ w = Math.max((WW-S)/(J+1),w);
+ }
+ w = CHTML.Em(w);
+ for (j = 0; j <= J; j++) CWIDTH[j] = w;
+ }
+ setWidths = true;
+ }
+ //
+ // Compute natural table width
+ //
+ var TW = 0; if (values.fspace) TW = state.FSPACE[0];
+ var auto = [], fit = [], percent = [], W = [];
+ var row = state.rows[0];
+ for (j = 0; j <= J; j++) {
+ W[j] = state.W[j];
+ if (CWIDTH[j] === "auto") auto.push(j)
+ else if (CWIDTH[j] === "fit") fit.push(j)
+ else if (CWIDTH[j].match(/%$/)) percent.push(j)
+ else W[j] = this.CHTMLlength2em(CWIDTH[j],W[j]);
+ TW += W[j] + CSPACE[j];
+ if (row[j]) row[j].style.width = CHTML.Em(W[j]);
+ }
+ if (values.frame) TW += 2/CHTML.em;
+ var hasFit = (fit.length > 0);
+ //
+ // Adjust widths of columns
+ //
+ if (setWidths || (relWidth && hasFit)) {
+ if (relWidth) {
+ //
+ // Attach appropriate widths to the columns
+ //
+ for (j = 0; j <= J; j++) {
+ cell = row[j].style;
+ if (CWIDTH[j] === "auto" && !hasFit) cell.width = "";
+ else if (CWIDTH[j] === "fit") cell.width = "";
+ else if (CWIDTH[j].match(/%$/)) cell.width = CWIDTH[j];
+ else cell.minWidth = cell.maxWidth = cell.width;
+ }
+ } else {
+ //
+ // Compute percentage widths
+ //
+ if (WW > TW) {
+ var extra = 0;
+ for (i = 0, m = percent.length; i < m; i++) {
+ j = percent[i];
+ w = Math.max(W[j],this.CHTMLlength2em(CWIDTH[j],WW));
+ extra += w-W[j]; W[j] = w;
+ row[j].style.width = CHTML.Em(w);
+ }
+ TW += extra;
+ }
+ //
+ // Compute "fit" widths
+ //
+ if (!hasFit) fit = auto;
+ if (WW > TW && fit.length) {
+ var dw = (WW - TW) / fit.length;
+ for (i = 0, m = fit.length; i < m; i++) {
+ j = fit[i]; W[j] += dw;
+ row[j].style.width = CHTML.Em(W[j]);
+ }
+ TW = WW;
+ }
+ }
+ }
+ W[LABEL] = state.W[LABEL];
+ state.W = W;
+ state.R = TW;
+ //
+ // Set variable width on DOM nodes
+ //
+ if (relWidth) {
+ node.style.width = this.CHTML.pwidth = "100%";
+ this.CHTML.mwidth = CHTML.Em(TW);
+ node.firstChild.style.width = values.width;
+ node.firstChild.style.margin = "auto";
+ }
+ },
+ //
+ // Stretch any cells that can be stretched
+ //
+ CHTMLstretchCells: function (values,state) {
+ var ROWS = state.rows, H = state.H, D = state.D, W = state.W,
+ J = state.J, M = ROWS.length-1;
+ for (var i = 0; i <= M; i++) {
+ var row = ROWS[i], rdata = this.data[i];
+ var h = H[i], d = D[i];
+ for (var j = 0; j <= J; j++) {
+ var cell = row[j], cdata = rdata.data[j];
+ if (!cdata) continue;
+ if (cdata.CHTML.stretch === "V") cdata.CHTMLstretchV(h,d);
+ else if (cdata.CHTML.stretch === "H") cdata.CHTMLstretchH(cell,W[j]);
+ }
+ }
+ },
+ //
+ // Add labels to a table
+ //
+ CHTMLaddLabels: function (values,state,node,table) {
+ //
+ // Get indentation and alignment
+ //
+ var indent = this.getValues("indentalignfirst","indentshiftfirst","indentalign","indentshift");
+ if (indent.indentalignfirst !== MML.INDENTALIGN.INDENTALIGN) indent.indentalign = indent.indentalignfirst;
+ if (indent.indentalign === MML.INDENTALIGN.AUTO) indent.indentalign = CONFIG.displayAlign;
+ if (indent.indentshiftfirst !== MML.INDENTSHIFT.INDENTSHIFT) indent.indentshift = indent.indentshiftfirst;
+ if (indent.indentshift === "auto") indent.indentshift = "0";
+ var shift = this.CHTMLlength2em(indent.indentshift,CHTML.cwidth);
+ var labelspace = this.CHTMLlength2em(values.minlabelspacing,.8);
+ var labelW = labelspace + state.W[LABEL], labelshift = 0, tw = state.R;
+ var dIndent = this.CHTMLlength2em(CONFIG.displayIndent,CHTML.cwidth);
+ var s = (state.CALIGN[LABEL] === MML.INDENTALIGN.RIGHT ? -1 : 1);
+ if (indent.indentalign === MML.INDENTALIGN.CENTER) {
+ tw += 2 * (labelW - s*(shift + dIndent));
+ shift += dIndent;
+ } else if (state.CALIGN[LABEL] === indent.indentalign) {
+ if (dIndent < 0) {labelshift = s*dIndent; dIndent = 0}
+ shift += s*dIndent; if (labelW > s*shift) shift = s*labelW; shift += labelshift;
+ shift *= s; tw += shift;
+ } else {
+ tw += labelW - s*shift + dIndent;
+ shift -= s*dIndent; shift *= -s;
+ }
+ //
+ // Create boxes for table and labels
+ //
+ var box = CHTML.addElement(node,"mjx-box",{
+ style:{width:"100%","text-align":indent.indentalign}
+ }); box.appendChild(table);
+ var labels = CHTML.Element("mjx-itable");
+ table.style.display = "inline-table"; if (!table.style.width) table.style.width = "auto";
+ labels.style.verticalAlign = "top";
+ table.style.verticalAlign = CHTML.Em(state.T-state.B-state.H[0]);
+ node.style.verticalAlign = "";
+ if (shift) {
+ if (indent.indentalign === MML.INDENTALIGN.CENTER) {
+ table.style.marginLeft = CHTML.Em(shift);
+ table.style.marginRight = CHTML.Em(-shift);
+ } else {
+ var margin = "margin" + (indent.indentalign === MML.INDENTALIGN.RIGHT ? "Right" : "Left");
+ table.style[margin] = CHTML.Em(shift);
+ }
+ }
+ //
+ // Add labels on correct side
+ //
+ if (state.CALIGN[LABEL] === "left") {
+ node.insertBefore(labels,box);
+ labels.style.marginRight = CHTML.Em(-state.W[LABEL]-labelshift);
+ if (labelshift) labels.style.marginLeft = CHTML.Em(labelshift);
+ } else {
+ node.appendChild(labels);
+ labels.style.marginLeft = CHTML.Em(-state.W[LABEL]+labelshift);
+ }
+ //
+ // Vertically align the labels with their rows
+ //
+ var LABELS = state.labels, T = 0;
+ if (values.fspace) T = state.FSPACE[0] + (values.frame ? 1/CHTML.em : 0);
+ for (var i = 0, m = LABELS.length; i < m; i++) {
+ if (LABELS[i] && this.data[i].data[0]) {
+ labels.appendChild(LABELS[i]);
+ var lbox = this.data[i].data[0].CHTML;
+ T = state.RH[i] - Math.max(1,lbox.h);
+ if (T) LABELS[i].firstChild.firstChild.style.marginTop = CHTML.Em(T);
+ LABELS[i].style.height = CHTML.Em(state.RHD[i]);
+ } else {
+ CHTML.addElement(labels,"mjx-label",{style:{height:CHTML.Em(state.RHD[i])}});
+ }
+ }
+ //
+ // Propagate full-width equations, and reserve room for equation plus label
+ //
+ node.style.width = this.CHTML.pwidth = "100%";
+ node.style.minWidth = this.CHTML.mwidth = CHTML.Em(Math.max(0,tw));
+ }
+ });
+
+ MML.mtr.Augment({
+ toCommonHTML: function (node,options) {
+ //
+ // Create the row node
+ //
+ node = this.CHTMLcreateNode(node);
+ this.CHTMLhandleStyle(node);
+ this.CHTMLhandleScale(node);
+ //
+ // Add a new row with no label
+ //
+ if (!options) options = {rows:[],labels:[]};
+ var row = []; options.rows.push(row); row.node = node;
+ options.labels.push(null);
+ //
+ // Add the cells to the row
+ //
+ for (var i = 0, m = this.data.length; i < m; i++)
+ row.push(this.CHTMLaddChild(node,i,options));
+ //
+ this.CHTMLhandleColor(node);
+ return node;
+ }
+ });
+ MML.mlabeledtr.Augment({
+ toCommonHTML: function (node,options) {
+ //
+ // Create the row node
+ //
+ node = this.CHTMLcreateNode(node);
+ this.CHTMLhandleStyle(node);
+ this.CHTMLhandleScale(node);
+ //
+ // Add a new row, and get the label
+ //
+ if (!options) options = {rows:[],labels:[]};
+ var row = []; options.rows.push(row); row.node = node;
+ var label = CHTML.Element("mjx-label"); options.labels.push(label);
+ this.CHTMLaddChild(label,0,options);
+ if (this.data[0]) options.labeled = true;
+ //
+ // Add the cells to the row
+ //
+ for (var i = 1, m = this.data.length; i < m; i++)
+ row.push(this.CHTMLaddChild(node,i,options));
+ //
+ this.CHTMLhandleColor(node);
+ return node;
+ }
+ });
+ MML.mtd.Augment({
+ toCommonHTML: function (node,options) {
+ node = this.CHTMLdefaultNode(node,options);
+ CHTML.addElement(node.firstChild,"mjx-strut"); // forces height to 1em (we adjust later)
+ //
+ // Determine if this is stretchy or not
+ //
+ if (this.isEmbellished()) {
+ var mo = this.CoreMO(), BBOX = this.CHTML;
+ if (mo.CHTMLcanStretch("Vertical")) BBOX.stretch = "V";
+ else if (mo.CHTMLcanStretch("Horizontal")) BBOX.stretch = "H";
+ if (BBOX.stretch) {
+ var min = mo.Get("minsize",true);
+ if (min) {
+ if (BBOX.stretch === "V") {
+ var HD = BBOX.h + BBOX.d;
+ if (HD) {
+ var r = this.CHTMLlength2em(min,HD)/HD;
+ if (r > 1) {BBOX.h *= r; BBOX.d *= r}
+ }
+ } else {
+ BBOX.w = Math.max(BBOX.w,this.CHTMLlength2em(min,BBOX.w));
+ }
+ }
+ }
+ }
+ return node;
+ }
+ });
+
+
+ MathJax.Hub.Startup.signal.Post("CommonHTML mtable Ready");
+ MathJax.Ajax.loadComplete(CHTML.autoloadDir+"/mtable.js");
+});
+
+// @license-end
diff --git a/js/mathjax/jax/output/CommonHTML/autoload/multiline.js b/js/mathjax/jax/output/CommonHTML/autoload/multiline.js
new file mode 100644
index 0000000..9d54b99
--- /dev/null
+++ b/js/mathjax/jax/output/CommonHTML/autoload/multiline.js
@@ -0,0 +1,799 @@
+// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0
+/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
+/* vim: set ts=2 et sw=2 tw=80: */
+
+/*************************************************************
+ *
+ * MathJax/jax/output/CommonHTML/autoload/multiline.js
+ *
+ * Implements the CommonHTML output for <mrow>'s that contain line breaks.
+ *
+ * ---------------------------------------------------------------------
+ *
+ * Copyright (c) 2015-2020 The MathJax Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () {
+ var VERSION = "2.7.9";
+ var MML = MathJax.ElementJax.mml,
+ CONFIG = MathJax.Hub.config,
+ CHTML = MathJax.OutputJax.CommonHTML;
+ //
+ // Fake node used for testing end-of-line potential breakpoint
+ //
+ var MO = MML.mo().With({CHTML: CHTML.BBOX.empty()});
+
+ //
+ // Penalties for the various line breaks
+ //
+ var PENALTY = {
+ newline: 0,
+ nobreak: 1000000,
+ goodbreak: [-200],
+ badbreak: [+200],
+ auto: [0],
+
+ maxwidth: 1.33, // stop looking for breaks after this time the line-break width
+ toobig: 800,
+ nestfactor: 400,
+ spacefactor: -100,
+ spaceoffset: 2,
+ spacelimit: 1, // spaces larger than this get a penalty boost
+ fence: 500,
+ close: 500
+ };
+
+ var ENDVALUES = {linebreakstyle: "after"};
+
+
+ /**************************************************************************/
+
+ MML.mbase.Augment({
+ CHTMLlinebreakPenalty: PENALTY,
+
+ /****************************************************************/
+ //
+ // Handle breaking an mrow into separate lines
+ //
+ CHTMLmultiline: function (node) {
+
+ //
+ // Find the parent element and mark it as multiline
+ //
+ var parent = this;
+ while (parent.inferred || (parent.parent && parent.parent.type === "mrow" &&
+ parent.parent.isEmbellished())) {parent = parent.parent}
+ var isTop = ((parent.type === "math" && parent.Get("display") === "block") ||
+ parent.type === "mtd");
+ parent.isMultiline = true;
+
+ //
+ // Default values for the line-breaking parameters
+ //
+ var VALUES = this.getValues(
+ "linebreak","linebreakstyle","lineleading","linebreakmultchar",
+ "indentalign","indentshift",
+ "indentalignfirst","indentshiftfirst",
+ "indentalignlast","indentshiftlast"
+ );
+ if (VALUES.linebreakstyle === MML.LINEBREAKSTYLE.INFIXLINEBREAKSTYLE)
+ VALUES.linebreakstyle = this.Get("infixlinebreakstyle");
+ VALUES.lineleading = this.CHTMLlength2em(VALUES.lineleading,0.5);
+
+ //
+ // Break the math at its best line breaks
+ //
+ CHTML.BBOX.empty(this.CHTML);
+ var stack = CHTML.addElement(node,"mjx-stack");
+ var state = {
+ BBOX: this.CHTML,
+ n: 0, Y: 0,
+ scale: (this.CHTML.scale||1),
+ isTop: isTop,
+ values: {},
+ VALUES: VALUES
+ },
+ align = this.CHTMLgetAlign(state,{}),
+ shift = this.CHTMLgetShift(state,{},align),
+ start = [],
+ end = {
+ index:[], penalty:PENALTY.nobreak,
+ w:0, W:shift, shift:shift, scanW:shift,
+ nest: 0
+ },
+ broken = false;
+
+ while (this.CHTMLbetterBreak(end,state,true) &&
+ (end.scanW >= CHTML.linebreakWidth || end.penalty === PENALTY.newline)) {
+ this.CHTMLaddLine(stack,start,end.index,state,end.values,broken);
+ start = end.index.slice(0); broken = true;
+ align = this.CHTMLgetAlign(state,end.values);
+ shift = this.CHTMLgetShift(state,end.values,align);
+ end.W = end.shift = end.scanW = shift; end.penalty = PENALTY.nobreak;
+ }
+ state.isLast = true;
+ this.CHTMLaddLine(stack,start,[],state,ENDVALUES,broken);
+
+ if (parent.type === "math") {
+ node.style.width = stack.style.width = this.CHTML.pwidth = "100%";
+ }
+ this.CHTML.mwidth = CHTML.Em(this.CHTML.w);
+ this.CHTML.isMultiline = parent.CHTML.isMultiline = true;
+ stack.style.verticalAlign = CHTML.Em(state.d - this.CHTML.d);
+
+ return node;
+ },
+
+ /****************************************************************/
+ //
+ // Locate the next linebreak that is better than the current one
+ //
+ CHTMLbetterBreak: function (info,state,toplevel) {
+ if (this.isToken) return false; // FIXME: handle breaking of token elements
+ if (this.isEmbellished()) {
+ info.embellished = this;
+ return this.CoreMO().CHTMLbetterBreak(info,state);
+ }
+ if (this.linebreakContainer) return false;
+ //
+ // Get the current breakpoint position and other data
+ //
+ var index = info.index.slice(0), i = info.index.shift(),
+ m = this.data.length, W, w, scanW, broken = (info.index.length > 0), better = false;
+ if (i == null) i = -1; if (!broken) {i++; info.W += info.w; info.w = 0}
+ scanW = info.scanW = info.W; info.nest++;
+ //
+ // Look through the line for breakpoints,
+ // (as long as we are not too far past the breaking width)
+ //
+ while (i < m && (info.scanW < PENALTY.maxwidth*CHTML.linebreakWidth || info.w === 0)) {
+ if (this.data[i]) {
+ if (this.data[i].CHTMLbetterBreak(info,state)) {
+ better = true; index = [i].concat(info.index); W = info.W; w = info.w;
+ if (info.penalty === PENALTY.newline) {
+ info.index = index;
+ if (info.nest) {info.nest--}
+ return true;
+ }
+ }
+ scanW = (broken ? info.scanW : this.CHTMLaddWidth(i,info,scanW));
+ }
+ info.index = []; i++; broken = false;
+ }
+ //
+ // Check if end-of-line is a better breakpoint
+ //
+ if (toplevel && better) {
+ MO.parent = this.parent; MO.inherit = this.inherit;
+ if (MO.CHTMLbetterBreak(info,state)) {better = false; index = info.index}
+ }
+ if (info.nest) {info.nest--}
+ info.index = index;
+ if (better) {info.W = W; info.w = w}
+ return better;
+ },
+ CHTMLaddWidth: function (i,info,scanW) {
+ if (this.data[i]) {
+ var bbox = this.data[i].CHTML;
+ scanW += (bbox.w + (bbox.L||0) + (bbox.R||0)) * (bbox.scale || 1);
+ info.W = info.scanW = scanW; info.w = 0;
+ }
+ return scanW;
+ },
+
+ /****************************************************************/
+ //
+ // Create a new line and move the required elements into it
+ // Position it using proper alignment and indenting
+ //
+ CHTMLaddLine: function (stack,start,end,state,values,broken) {
+ //
+ // Create a box for the line, with empty BBox
+ // fill it with the proper elements,
+ // and clean up the bbox
+ //
+ var block = CHTML.addElement(stack,"mjx-block",{},[["mjx-box"]]), line = block.firstChild;
+ var bbox = state.bbox = CHTML.BBOX.empty();
+ state.first = broken; state.last = true;
+ this.CHTMLmoveLine(start,end,line,state,values);
+ bbox.clean();
+ //
+ // Get the alignment and shift values
+ //
+ var align = this.CHTMLgetAlign(state,values),
+ shift = this.CHTMLgetShift(state,values,align,true);
+ //
+ // Set the Y offset based on previous depth, leading, and current height
+ //
+ var dY = 0;
+ if (state.n > 0) {
+ var LHD = CHTML.FONTDATA.baselineskip;
+ var leading = (state.values.lineleading == null ? state.VALUES : state.values).lineleading * state.scale;
+ var Y = state.Y;
+ state.Y -= Math.max(LHD,state.d + bbox.h + leading);
+ dY = Y - state.Y - state.d - bbox.h;
+ }
+ //
+ // Place the new line
+ //
+ if (shift) line.style.margin = "0 "+CHTML.Em(-shift)+" 0 "+CHTML.Em(shift);
+ if (align !== MML.INDENTALIGN.LEFT) block.style.textAlign = align;
+ if (dY) block.style.paddingTop = CHTML.Em(dY);
+ state.BBOX.combine(bbox,shift,state.Y);
+ //
+ // Save the values needed for the future
+ //
+ state.d = state.bbox.d; state.values = values; state.n++;
+ },
+
+ /****************************************************************/
+ //
+ // Get alignment and shift values from the given data
+ //
+ CHTMLgetAlign: function (state,values) {
+ var cur = values, prev = state.values, def = state.VALUES, align;
+ if (state.n === 0) align = cur.indentalignfirst || prev.indentalignfirst || def.indentalignfirst;
+ else if (state.isLast) align = prev.indentalignlast || def.indentalignlast;
+ else align = prev.indentalign || def.indentalign;
+ if (align === MML.INDENTALIGN.INDENTALIGN) align = prev.indentalign || def.indentalign;
+ if (align === MML.INDENTALIGN.AUTO) align = (state.isTop ? CONFIG.displayAlign : MML.INDENTALIGN.LEFT);
+ return align;
+ },
+ CHTMLgetShift: function (state,values,align,noadjust) {
+ var cur = values, prev = state.values, def = state.VALUES, shift;
+ if (state.n === 0) shift = cur.indentshiftfirst || prev.indentshiftfirst || def.indentshiftfirst;
+ else if (state.isLast) shift = prev.indentshiftlast || def.indentshiftlast;
+ else shift = prev.indentshift || def.indentshift;
+ if (shift === MML.INDENTSHIFT.INDENTSHIFT) shift = prev.indentshift || def.indentshift;
+ if (shift === "auto" || shift === "") shift = "0";
+ shift = this.CHTMLlength2em(shift,CHTML.cwidth);
+ if (state.isTop && CONFIG.displayIndent !== "0") {
+ var indent = this.CHTMLlength2em(CONFIG.displayIndent,CHTML.cwidth);
+ shift += (align === MML.INDENTALIGN.RIGHT ? -indent : indent);
+ }
+ return (align === MML.INDENTALIGN.RIGHT && !noadjust ? -shift : shift);
+ },
+
+ /****************************************************************/
+ //
+ // Move the selected elements into the new line's box,
+ // moving whole items when possible, and parts of ones
+ // that are split by a line break.
+ //
+ CHTMLmoveLine: function (start,end,node,state,values) {
+ var i = start[0], j = end[0];
+ if (i == null) i = -1; if (j == null) j = this.data.length-1;
+ if (i === j && start.length > 1) {
+ //
+ // If starting and ending in the same element move the subpiece to the new line
+ //
+ this.data[i].CHTMLmoveSlice(start.slice(1),end.slice(1),node,state,values,"marginLeft");
+ } else {
+ //
+ // Otherwise, move the remainder of the initial item
+ // and any others up to the last one
+ //
+ var last = state.last; state.last = false;
+ while (i < j) {
+ if (this.data[i]) {
+ if (start.length <= 1) this.data[i].CHTMLmoveNode(node,state,values);
+ else this.data[i].CHTMLmoveSlice(start.slice(1),[],node,state,values,"marginLeft");
+ }
+ i++; state.first = false; start = [];
+ }
+ //
+ // If the last item is complete, move it,
+ // otherwise move the first part of it up to the split
+ //
+ state.last = last;
+ if (this.data[i]) {
+ if (end.length <= 1) this.data[i].CHTMLmoveNode(node,state,values);
+ else this.data[i].CHTMLmoveSlice([],end.slice(1),node,state,values,"marginRight");
+ }
+ }
+ },
+
+ /****************************************************************/
+ //
+ // Split an element and copy the selected items into the new part
+ //
+ CHTMLmoveSlice: function (start,end,node,state,values,margin) {
+ //
+ // Create a new box for the slice of the element
+ // Move the selected portion into the slice
+ // If it is the last slice
+ // Remove the original (now empty) node
+ // Rename the Continue-0 node with the original name (for CHTMLnodeElement)
+ //
+ var slice = this.CHTMLcreateSliceNode(node);
+ this.CHTMLmoveLine(start,end,slice,state,values);
+ if (slice.style[margin]) slice.style[margin] = "";
+ if (this.CHTML.L) {
+ if (margin !== "marginLeft") state.bbox.w += this.CHTML.L;
+ else slice.className = slice.className.replace(/ MJXc-space\d/,"");
+ }
+ if (this.CHTML.R && margin !== "marginRight") state.bbox.w += this.CHTML.R;
+ if (end.length === 0) {
+ node = this.CHTMLnodeElement();
+ if (this.href) node = node.parentNode;
+ node.parentNode.removeChild(node);
+ node.nextMathJaxNode.id = node.id;
+ }
+ return slice;
+ },
+
+ /****************************************************************/
+ //
+ // Create a new node for an element that is split in two
+ // Clone the original and update its ID.
+ // Link the old node to the new one so we can find it later
+ //
+ CHTMLcreateSliceNode: function (node) {
+ var NODE = this.CHTMLnodeElement(), n = 0;
+ if (this.href) NODE = NODE.parentNode;
+ var LAST = NODE; while (LAST.nextMathJaxNode) {LAST = LAST.nextMathJaxNode; n++}
+ var SLICE = NODE.cloneNode(false); LAST.nextMathJaxNode = SLICE; SLICE.nextMathJaxNode = null;
+ SLICE.id += "-MJX-Continue-"+n;
+ return node.appendChild(SLICE);
+ },
+
+ /****************************************************************/
+ //
+ // Move an element from its original node to its new location in
+ // a split element or the new line's node
+ //
+ CHTMLmoveNode: function (line,state,values) {
+ // FIXME: handle linebreakstyle === "duplicate"
+ // FIXME: handle linebreakmultchar
+ if (!(state.first || state.last) ||
+ (state.first && state.values.linebreakstyle === MML.LINEBREAKSTYLE.BEFORE) ||
+ (state.last && values.linebreakstyle === MML.LINEBREAKSTYLE.AFTER)) {
+ //
+ // Move node
+ //
+ var node = this.CHTMLnodeElement();
+ if (this.href) node = node.parentNode;
+ line.appendChild(node);
+ if (this.CHTML.pwidth && !line.style.width) line.style.width = this.CHTML.pwidth;
+ //
+ // If it is last, remove right margin
+ // If it is first, remove left margin
+ //
+ if (state.last) node.style.marginRight = "";
+ if (state.first || state.nextIsFirst) {
+ node.style.marginLeft = ""; this.CHTML.L = 0;
+ node.className = node.className.replace(/ MJXc-space\d/,"");
+ }
+ if (state.first && this.CHTML.w === 0) state.nextIsFirst = true;
+ else delete state.nextIsFirst;
+ //
+ // Update bounding box
+ //
+ state.bbox.combine(this.CHTML,state.bbox.w,0);
+ }
+ }
+ });
+
+ /**************************************************************************/
+
+ MML.mfenced.Augment({
+ CHTMLbetterBreak: function (info,state) {
+ //
+ // Get the current breakpoint position and other data
+ //
+ var index = info.index.slice(0), i = info.index.shift(),
+ m = this.data.length, W, w, scanW, broken = (info.index.length > 0), better = false;
+ if (i == null) i = -1; if (!broken) {i++; info.W += info.w; info.w = 0}
+ scanW = info.scanW = info.W; info.nest++;
+ //
+ // Create indices that include the delimiters and separators
+ //
+ if (!this.dataI) {
+ this.dataI = [];
+ if (this.data.open) this.dataI.push("open");
+ if (m) this.dataI.push(0);
+ for (var j = 1; j < m; j++) {
+ if (this.data["sep"+j]) this.dataI.push("sep"+j);
+ this.dataI.push(j);
+ }
+ if (this.data.close) this.dataI.push("close");
+ }
+ m = this.dataI.length;
+ //
+ // Look through the line for breakpoints, including the open, close, and separators
+ // (as long as we are not too far past the breaking width)
+ //
+ while (i < m && (info.scanW < PENALTY.maxwidth*CHTML.linebreakWidth || info.w === 0)) {
+ var k = this.dataI[i];
+ if (this.data[k]) {
+ if (this.data[k].CHTMLbetterBreak(info,state)) {
+ better = true; index = [i].concat(info.index); W = info.W; w = info.w;
+ if (info.penalty === PENALTY.newline) {
+ info.index = index;
+ if (info.nest) info.nest--;
+ return true;
+ }
+ }
+ scanW = (broken ? info.scanW : this.CHTMLaddWidth(i,info,scanW));
+ }
+ info.index = []; i++; broken = false;
+ }
+ if (info.nest) info.nest--;
+ info.index = index;
+ if (better) {info.W = W; info.w = w}
+ return better;
+ },
+
+ CHTMLmoveLine: function (start,end,node,state,values) {
+ var i = start[0], j = end[0];
+ if (i == null) i = -1; if (j == null) j = this.dataI.length-1;
+ if (i === j && start.length > 1) {
+ //
+ // If starting and ending in the same element move the subpiece to the new line
+ //
+ this.data[this.dataI[i]].CHTMLmoveSlice(start.slice(1),end.slice(1),node,state,values,"marginLeft");
+ } else {
+ //
+ // Otherwise, move the remainder of the initial item
+ // and any others (including open and separators) up to the last one
+ //
+ var last = state.last; state.last = false; var k = this.dataI[i];
+ while (i < j) {
+ if (this.data[k]) {
+ if (start.length <= 1) this.data[k].CHTMLmoveNode(node,state,values);
+ else this.data[k].CHTMLmoveSlice(start.slice(1),[],node,state,values,"marginLeft");
+ }
+ i++; k = this.dataI[i]; state.first = false; start = [];
+ }
+ //
+ // If the last item is complete, move it
+ //
+ state.last = last;
+ if (this.data[k]) {
+ if (end.length <= 1) this.data[k].CHTMLmoveNode(node,state,values);
+ else this.data[k].CHTMLmoveSlice([],end.slice(1),node,state,values,"marginRight");
+ }
+ }
+ }
+
+ });
+
+ /**************************************************************************/
+
+ MML.msubsup.Augment({
+ CHTMLbetterBreak: function (info,state) {
+ if (!this.data[this.base]) {return false}
+ //
+ // Get the current breakpoint position and other data
+ //
+ var index = info.index.slice(0), i = info.index.shift(),
+ W, w, scanW, broken = (info.index.length > 0), better = false;
+ if (!broken) {info.W += info.w; info.w = 0}
+ scanW = info.scanW = info.W;
+ //
+ // Record the width of the base and the super- and subscripts
+ //
+ if (i == null) {
+ this.CHTML.baseW = this.data[this.base].CHTML.w;
+ this.CHTML.dw = this.CHTML.w - this.CHTML.baseW;
+ }
+ //
+ // Check if the base can be broken
+ //
+ if (this.data[this.base].CHTMLbetterBreak(info,state)) {
+ better = true; index = [this.base].concat(info.index); W = info.W; w = info.w;
+ if (info.penalty === PENALTY.newline) better = broken = true;
+ }
+ //
+ // Add in the base if it is unbroken, and add the scripts
+ //
+ if (!broken) this.CHTMLaddWidth(this.base,info,scanW);
+ info.scanW += this.CHTML.dw; info.W = info.scanW;
+ info.index = []; if (better) {info.W = W; info.w = w; info.index = index}
+ return better;
+ },
+
+ CHTMLmoveLine: function (start,end,node,state,values) {
+ //
+ // Move the proper part of the base
+ //
+ if (this.data[this.base]) {
+ var base = CHTML.addElement(node,"mjx-base");
+ var ic = this.data[this.base].CHTML.ic;
+ if (ic) base.style.marginRight = CHTML.Em(-ic);
+ if (start.length > 1) {
+ this.data[this.base].CHTMLmoveSlice(start.slice(1),end.slice(1),base,state,values,"marginLeft");
+ } else {
+ if (end.length <= 1) this.data[this.base].CHTMLmoveNode(base,state,values);
+ else this.data[this.base].CHTMLmoveSlice([],end.slice(1),base,state,values,"marginRight");
+ }
+ }
+ //
+ // If this is the end, check for super and subscripts, and move those
+ // by moving the elements that contains them. Adjust the bounding box
+ // to include the super and subscripts.
+ //
+ if (end.length === 0) {
+ var NODE = this.CHTMLnodeElement(),
+ stack = CHTML.getNode(NODE,"mjx-stack"),
+ sup = CHTML.getNode(NODE,"mjx-sup"),
+ sub = CHTML.getNode(NODE,"mjx-sub");
+ if (stack) node.appendChild(stack);
+ else if (sup) node.appendChild(sup);
+ else if (sub) node.appendChild(sub);
+ var w = state.bbox.w, bbox;
+ if (sup) {
+ bbox = this.data[this.sup].CHTML;
+ state.bbox.combine(bbox,w,bbox.Y);
+ }
+ if (sub) {
+ bbox = this.data[this.sub].CHTML;
+ state.bbox.combine(bbox,w,bbox.Y);
+ }
+ }
+ }
+
+ });
+
+ /**************************************************************************/
+
+ MML.mmultiscripts.Augment({
+ CHTMLbetterBreak: function (info,state) {
+ if (!this.data[this.base]) return false;
+ //
+ // Get the current breakpoint position and other data
+ //
+ var index = info.index.slice(0); info.index.shift();
+ var W, w, scanW, broken = (info.index.length > 0), better = false;
+ if (!broken) {info.W += info.w; info.w = 0}
+ info.scanW = info.W;
+ //
+ // Get the bounding boxes and the width of the scripts
+ //
+ var bbox = this.CHTML, base = this.data[this.base].CHTML;
+ var dw = bbox.w - base.w - (bbox.X||0);
+ //
+ // Add in the width of the prescripts
+ //
+ info.scanW += bbox.X||0; scanW = info.scanW;
+ //
+ // Check if the base can be broken
+ //
+ if (this.data[this.base].CHTMLbetterBreak(info,state)) {
+ better = true; index = [this.base].concat(info.index); W = info.W; w = info.w;
+ if (info.penalty === PENALTY.newline) better = broken = true;
+ }
+ //
+ // Add in the base if it is unbroken, and add the scripts
+ //
+ if (!broken) this.CHTMLaddWidth(this.base,info,scanW);
+ info.scanW += dw; info.W = info.scanW;
+ info.index = []; if (better) {info.W = W; info.w = w; info.index = index}
+ return better;
+ },
+
+ CHTMLmoveLine: function (start,end,node,state,values) {
+ var NODE, BOX = this.CHTMLbbox, w;
+ //
+ // If this is the start, move the prescripts, if any.
+ //
+ if (start.length < 1) {
+ NODE = this.CHTMLnodeElement();
+ var prestack = CHTML.getNode(NODE,"mjx-prestack"),
+ presup = CHTML.getNode(NODE,"mjx-presup"),
+ presub = CHTML.getNode(NODE,"mjx-presub");
+ if (prestack) node.appendChild(prestack);
+ else if (presup) node.appendChild(presup);
+ else if (presub) node.appendChild(presub);
+ w = state.bbox.w;
+ if (presup) state.bbox.combine(BOX.presup,w+BOX.presup.X,BOX.presup.Y);
+ if (presub) state.bbox.combine(BOX.presub,w+BOX.presub.X,BOX.presub.Y);
+ }
+ //
+ // Move the proper part of the base
+ //
+ if (this.data[this.base]) {
+ var base = CHTML.addElement(node,"mjx-base");
+ if (start.length > 1) {
+ this.data[this.base].CHTMLmoveSlice(start.slice(1),end.slice(1),base,state,values,"marginLeft");
+ } else {
+ if (end.length <= 1) this.data[this.base].CHTMLmoveNode(base,state,values);
+ else this.data[this.base].CHTMLmoveSlice([],end.slice(1),base,state,values,"marginRight");
+ }
+ }
+ //
+ // If this is the end, check for super and subscripts, and move those
+ // by moving the elements that contains them. Adjust the bounding box
+ // to include the super and subscripts.
+ //
+ if (end.length === 0) {
+ NODE = this.CHTMLnodeElement();
+ var stack = CHTML.getNode(NODE,"mjx-stack"),
+ sup = CHTML.getNode(NODE,"mjx-sup"),
+ sub = CHTML.getNode(NODE,"mjx-sub");
+ if (stack) node.appendChild(stack);
+ else if (sup) node.appendChild(sup);
+ else if (sub) node.appendChild(sub);
+ w = state.bbox.w;
+ if (sup) state.bbox.combine(BOX.sup,w,BOX.sup.Y);
+ if (sub) state.bbox.combine(BOX.sub,w,BOX.sub.Y);
+ }
+ }
+
+ });
+
+ /**************************************************************************/
+
+ MML.mo.Augment({
+ //
+ // Override the method for checking line breaks to properly handle <mo>
+ //
+ CHTMLbetterBreak: function (info,state) {
+ if (info.values && info.values.id === this.CHTMLnodeID) return false;
+ var values = this.getValues(
+ "linebreak","linebreakstyle","lineleading","linebreakmultchar",
+ "indentalign","indentshift",
+ "indentalignfirst","indentshiftfirst",
+ "indentalignlast","indentshiftlast",
+ "texClass", "fence"
+ );
+ if (values.linebreakstyle === MML.LINEBREAKSTYLE.INFIXLINEBREAKSTYLE)
+ values.linebreakstyle = this.Get("infixlinebreakstyle");
+ //
+ // Adjust nesting by TeX class (helps output that does not include
+ // mrows for nesting, but can leave these unbalanced.
+ //
+ if (values.texClass === MML.TEXCLASS.OPEN) info.nest++;
+ if (values.texClass === MML.TEXCLASS.CLOSE && info.nest) info.nest--;
+ //
+ // Get the default penalty for this location
+ //
+ var W = info.scanW; delete info.embellished;
+ var w = this.CHTML.w + (this.CHTML.L||0) + (this.CHTML.R||0);
+ if (values.linebreakstyle === MML.LINEBREAKSTYLE.AFTER) {W += w; w = 0}
+ if (W - info.shift === 0 && values.linebreak !== MML.LINEBREAK.NEWLINE)
+ return false; // don't break at zero width (FIXME?)
+ var offset = CHTML.linebreakWidth - W;
+ // Adjust offest for explicit first-line indent and align
+ if (state.n === 0 && (values.indentshiftfirst !== state.VALUES.indentshiftfirst ||
+ values.indentalignfirst !== state.VALUES.indentalignfirst)) {
+ var align = this.CHTMLgetAlign(state,values),
+ shift = this.CHTMLgetShift(state,values,align);
+ offset += (info.shift - shift);
+ }
+ //
+ var penalty = Math.floor(offset / CHTML.linebreakWidth * 1000);
+ if (penalty < 0) penalty = PENALTY.toobig - 3*penalty;
+ if (values.fence) penalty += PENALTY.fence;
+ if ((values.linebreakstyle === MML.LINEBREAKSTYLE.AFTER &&
+ values.texClass === MML.TEXCLASS.OPEN) ||
+ values.texClass === MML.TEXCLASS.CLOSE) penalty += PENALTY.close;
+ penalty += info.nest * PENALTY.nestfactor;
+ //
+ // Get the penalty for this type of break and
+ // use it to modify the default penalty
+ //
+ var linebreak = PENALTY[values.linebreak||MML.LINEBREAK.AUTO]||0;
+ if (!MathJax.Object.isArray(linebreak)) {
+ // for breaks past the width, keep original penalty for newline
+ if (linebreak || offset >= 0) {penalty = linebreak * info.nest}
+ } else {penalty = Math.max(1,penalty + linebreak[0] * info.nest)}
+ //
+ // If the penalty is no better than the current one, return false
+ // Otherwise save the data for this breakpoint and return true
+ //
+ if (penalty >= info.penalty) return false;
+ info.penalty = penalty; info.values = values; info.W = W; info.w = w;
+ values.lineleading = this.CHTMLlength2em(values.lineleading,state.VALUES.lineleading);
+ values.id = this.CHTMLnodeID;
+ return true;
+ }
+ });
+
+ /**************************************************************************/
+
+ MML.mspace.Augment({
+ //
+ // Override the method for checking line breaks to properly handle <mspace>
+ //
+ CHTMLbetterBreak: function (info,state) {
+ if (info.values && info.values.id === this.CHTMLnodeID) return false;
+ var values = this.getValues("linebreak");
+ var linebreakValue = values.linebreak;
+ if (!linebreakValue || this.hasDimAttr()) {
+ // The MathML spec says that the linebreak attribute should be ignored
+ // if any dimensional attribute is set.
+ linebreakValue = MML.LINEBREAK.AUTO;
+ }
+ //
+ // Get the default penalty for this location
+ //
+ var W = info.scanW, w = this.CHTML.w + (this.CHTML.L||0) + (this.CHTML.R||0);
+ if (W - info.shift === 0) return false; // don't break at zero width (FIXME?)
+ var offset = CHTML.linebreakWidth - W;
+ //
+ var penalty = Math.floor(offset / CHTML.linebreakWidth * 1000);
+ if (penalty < 0) penalty = PENALTY.toobig - 3*penalty;
+ penalty += info.nest * PENALTY.nestfactor;
+ //
+ // Get the penalty for this type of break and
+ // use it to modify the default penalty
+ //
+ var linebreak = PENALTY[linebreakValue]||0;
+ if (linebreakValue === MML.LINEBREAK.AUTO && w >= PENALTY.spacelimit &&
+ !this.mathbackground && !this.background)
+ linebreak = [(w+PENALTY.spaceoffset)*PENALTY.spacefactor];
+ if (!MathJax.Object.isArray(linebreak)) {
+ // for breaks past the width, keep original penalty for newline
+ if (linebreak || offset >= 0) {penalty = linebreak * info.nest}
+ } else {penalty = Math.max(1,penalty + linebreak[0] * info.nest)}
+ //
+ // If the penalty is no better than the current one, return false
+ // Otherwise save the data for this breakpoint and return true
+ //
+ if (penalty >= info.penalty) return false;
+ info.penalty = penalty; info.values = values; info.W = W; info.w = w;
+ values.lineleading = state.VALUES.lineleading;
+ values.linebreakstyle = "before"; values.id = this.CHTMLnodeID;
+ return true;
+ }
+ });
+
+ //
+ // Hook into the mathchoice extension
+ //
+ MathJax.Hub.Register.StartupHook("TeX mathchoice Ready",function () {
+ MML.TeXmathchoice.Augment({
+ CHTMLbetterBreak: function (info,state) {
+ return this.Core().CHTMLbetterBreak(info,state);
+ },
+ CHTMLmoveLine: function (start,end,node,state,values) {
+ return this.Core().CHTMLmoveSlice(start,end,node,state,values);
+ }
+ });
+ });
+
+ //
+ // Have maction process only the selected item
+ //
+ MML.maction.Augment({
+ CHTMLbetterBreak: function (info,state) {
+ return this.Core().CHTMLbetterBreak(info,state);
+ },
+ CHTMLmoveLine: function (start,end,node,state,values) {
+ return this.Core().CHTMLmoveSlice(start,end,node,state,values);
+ }
+ });
+
+ //
+ // Have semantics only do the first element
+ // (FIXME: do we need to do anything special about annotation-xml?)
+ //
+ MML.semantics.Augment({
+ CHTMLbetterBreak: function (info,state) {
+ return (this.data[0] ? this.data[0].CHTMLbetterBreak(info,state) : false);
+ },
+ CHTMLmoveLine: function (start,end,node,state,values) {
+ return (this.data[0] ? this.data[0].CHTMLmoveSlice(start,end,node,state,values) : null);
+ }
+ });
+
+ /**************************************************************************/
+
+ MathJax.Hub.Startup.signal.Post("CommonHTML multiline Ready");
+ MathJax.Ajax.loadComplete(CHTML.autoloadDir+"/multiline.js");
+
+});
+// @license-end
diff --git a/js/mathjax/jax/output/CommonHTML/config.js b/js/mathjax/jax/output/CommonHTML/config.js
new file mode 100644
index 0000000..9708c55
--- /dev/null
+++ b/js/mathjax/jax/output/CommonHTML/config.js
@@ -0,0 +1,66 @@
+// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0
+/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
+/* vim: set ts=2 et sw=2 tw=80: */
+
+/*************************************************************
+ *
+ * MathJax/jax/output/HTML2/config.js
+ *
+ * Initializes the HTML2 OutputJax (the main definition is in
+ * MathJax/jax/input/HTML2/jax.js, which is loaded when needed).
+ *
+ * ---------------------------------------------------------------------
+ *
+ * Copyright (c) 2013-2020 The MathJax Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+MathJax.OutputJax.CommonHTML = MathJax.OutputJax({
+ id: "CommonHTML",
+ version: "2.7.9",
+ directory: MathJax.OutputJax.directory + "/CommonHTML",
+ extensionDir: MathJax.OutputJax.extensionDir + "/CommonHTML",
+ autoloadDir: MathJax.OutputJax.directory + "/CommonHTML/autoload",
+ fontDir: MathJax.OutputJax.directory + "/CommonHTML/fonts", // fontname added later
+ webfontDir: MathJax.OutputJax.fontDir + "/HTML-CSS", // fontname added later
+
+ config: {
+ matchFontHeight: true, // try to match math font height to surrounding font?
+ scale: 100, minScaleAdjust: 50, // global math scaling factor, and minimum adjusted scale factor
+ mtextFontInherit: false, // to make <mtext> be in page font rather than MathJax font
+ undefinedFamily: "STIXGeneral,'Cambria Math','Arial Unicode MS',serif",
+
+ EqnChunk: (MathJax.Hub.Browser.isMobile ? 20: 100),
+ // number of equations to process before showing them
+ EqnChunkFactor: 1.5, // chunk size is multiplied by this after each chunk
+ EqnChunkDelay: 100, // milliseconds to delay between chunks (to let browser
+ // respond to other events)
+
+ linebreaks: {
+ automatic: false, // when false, only process linebreak="newline",
+ // when true, insert line breaks automatically in long expressions.
+
+ width: "container" // maximum width of a line for automatic line breaks (e.g. "30em").
+ // use "container" to compute size from containing element,
+ // use "nn% container" for a portion of the container,
+ // use "nn%" for a portion of the window size
+ }
+
+ }
+});
+
+if (!MathJax.Hub.config.delayJaxRegistration) {MathJax.OutputJax.CommonHTML.Register("jax/mml")}
+
+MathJax.OutputJax.CommonHTML.loadComplete("config.js");
+// @license-end
diff --git a/js/mathjax/jax/output/CommonHTML/fonts/TeX/AMS-Regular.js b/js/mathjax/jax/output/CommonHTML/fonts/TeX/AMS-Regular.js
new file mode 100644
index 0000000..4057716
--- /dev/null
+++ b/js/mathjax/jax/output/CommonHTML/fonts/TeX/AMS-Regular.js
@@ -0,0 +1,291 @@
+// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0
+/*************************************************************
+ *
+ * MathJax/jax/output/CommonHTML/fonts/TeX/AMS-Regular.js
+ *
+ * Copyright (c) 2015-2020 The MathJax Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+(function (CHTML) {
+
+var font = 'MathJax_AMS';
+
+CHTML.FONTDATA.FONTS[font] = {
+ className: CHTML.FONTDATA.familyName(font),
+ centerline: 270, ascent: 1003, descent: 463,
+ 0x20: [0,0,250,0,0], // SPACE
+ 0x41: [701,1,722,17,703], // LATIN CAPITAL LETTER A
+ 0x42: [683,1,667,11,620], // LATIN CAPITAL LETTER B
+ 0x43: [702,19,722,39,684], // LATIN CAPITAL LETTER C
+ 0x44: [683,1,722,16,688], // LATIN CAPITAL LETTER D
+ 0x45: [683,1,667,12,640], // LATIN CAPITAL LETTER E
+ 0x46: [683,1,611,12,584], // LATIN CAPITAL LETTER F
+ 0x47: [702,19,778,39,749], // LATIN CAPITAL LETTER G
+ 0x48: [683,1,778,14,762], // LATIN CAPITAL LETTER H
+ 0x49: [683,1,389,20,369], // LATIN CAPITAL LETTER I
+ 0x4A: [683,77,500,6,478], // LATIN CAPITAL LETTER J
+ 0x4B: [683,1,778,22,768], // LATIN CAPITAL LETTER K
+ 0x4C: [683,1,667,12,640], // LATIN CAPITAL LETTER L
+ 0x4D: [683,1,944,17,926], // LATIN CAPITAL LETTER M
+ 0x4E: [683,20,722,20,702], // LATIN CAPITAL LETTER N
+ 0x4F: [701,19,778,34,742], // LATIN CAPITAL LETTER O
+ 0x50: [683,1,611,16,597], // LATIN CAPITAL LETTER P
+ 0x51: [701,181,778,34,742], // LATIN CAPITAL LETTER Q
+ 0x52: [683,1,722,16,705], // LATIN CAPITAL LETTER R
+ 0x53: [702,12,556,28,528], // LATIN CAPITAL LETTER S
+ 0x54: [683,1,667,33,635], // LATIN CAPITAL LETTER T
+ 0x55: [683,19,722,16,709], // LATIN CAPITAL LETTER U
+ 0x56: [683,20,722,0,719], // LATIN CAPITAL LETTER V
+ 0x57: [683,19,1000,5,994], // LATIN CAPITAL LETTER W
+ 0x58: [683,1,722,16,705], // LATIN CAPITAL LETTER X
+ 0x59: [683,1,722,16,704], // LATIN CAPITAL LETTER Y
+ 0x5A: [683,1,667,29,635], // LATIN CAPITAL LETTER Z
+ 0x6B: [683,1,556,17,534], // LATIN SMALL LETTER K
+ 0xA0: [0,0,250,0,0], // NO-BREAK SPACE
+ 0xA5: [683,0,750,11,738], // YEN SIGN
+ 0xAE: [709,175,947,32,915], // REGISTERED SIGN
+ 0xF0: [749,21,556,42,509], // LATIN SMALL LETTER ETH
+ 0x127: [695,13,540,42,562], // LATIN SMALL LETTER H WITH STROKE
+ 0x2C6: [845,-561,2333,-14,2346], // MODIFIER LETTER CIRCUMFLEX ACCENT
+ 0x2DC: [899,-628,2333,1,2330], // SMALL TILDE
+ 0x302: [845,-561,0,-2347,13], // COMBINING CIRCUMFLEX ACCENT
+ 0x303: [899,-628,0,-2332,-3], // COMBINING TILDE
+ 0x3DD: [605,85,778,55,719], // GREEK SMALL LETTER DIGAMMA
+ 0x3F0: [434,6,667,37,734], // GREEK KAPPA SYMBOL
+ 0x2035: [560,-43,275,12,244], // REVERSED PRIME
+ 0x210F: [695,13,540,42,562], // stix-/hbar - Planck's over 2pi
+ 0x2127: [684,22,722,44,675], // INVERTED OHM SIGN
+ 0x2132: [695,1,556,55,497], // TURNED CAPITAL F
+ 0x2136: [763,21,667,-22,687], // BET SYMBOL
+ 0x2137: [764,43,444,-22,421], // GIMEL SYMBOL
+ 0x2138: [764,43,667,54,640], // DALET SYMBOL
+ 0x2141: [705,23,639,37,577], // TURNED SANS-SERIF CAPITAL G
+ 0x2190: [437,-64,500,64,422], // LEFTWARDS ARROW
+ 0x2192: [437,-64,500,58,417], // RIGHTWARDS ARROW
+ 0x219A: [437,-60,1000,56,942], // LEFTWARDS ARROW WITH STROKE
+ 0x219B: [437,-60,1000,54,942], // RIGHTWARDS ARROW WITH STROKE
+ 0x219E: [417,-83,1000,56,944], // LEFTWARDS TWO HEADED ARROW
+ 0x21A0: [417,-83,1000,55,943], // RIGHTWARDS TWO HEADED ARROW
+ 0x21A2: [417,-83,1111,56,1031], // LEFTWARDS ARROW WITH TAIL
+ 0x21A3: [417,-83,1111,79,1054], // RIGHTWARDS ARROW WITH TAIL
+ 0x21AB: [575,41,1000,56,964], // LEFTWARDS ARROW WITH LOOP
+ 0x21AC: [575,41,1000,35,943], // RIGHTWARDS ARROW WITH LOOP
+ 0x21AD: [417,-83,1389,57,1331], // LEFT RIGHT WAVE ARROW
+ 0x21AE: [437,-60,1000,56,942], // LEFT RIGHT ARROW WITH STROKE
+ 0x21B0: [722,0,500,56,444], // UPWARDS ARROW WITH TIP LEFTWARDS
+ 0x21B1: [722,0,500,55,443], // UPWARDS ARROW WITH TIP RIGHTWARDS
+ 0x21B6: [461,1,1000,17,950], // ANTICLOCKWISE TOP SEMICIRCLE ARROW
+ 0x21B7: [460,1,1000,46,982], // CLOCKWISE TOP SEMICIRCLE ARROW
+ 0x21BA: [650,83,778,56,722], // ANTICLOCKWISE OPEN CIRCLE ARROW
+ 0x21BB: [650,83,778,56,721], // CLOCKWISE OPEN CIRCLE ARROW
+ 0x21BE: [694,194,417,188,375], // UPWARDS HARPOON WITH BARB RIGHTWARDS
+ 0x21BF: [694,194,417,41,228], // UPWARDS HARPOON WITH BARB LEFTWARDS
+ 0x21C2: [694,194,417,188,375], // DOWNWARDS HARPOON WITH BARB RIGHTWARDS
+ 0x21C3: [694,194,417,41,228], // DOWNWARDS HARPOON WITH BARB LEFTWARDS
+ 0x21C4: [667,0,1000,55,944], // RIGHTWARDS ARROW OVER LEFTWARDS ARROW
+ 0x21C6: [667,0,1000,55,944], // LEFTWARDS ARROW OVER RIGHTWARDS ARROW
+ 0x21C7: [583,83,1000,55,944], // LEFTWARDS PAIRED ARROWS
+ 0x21C8: [694,193,833,83,749], // UPWARDS PAIRED ARROWS
+ 0x21C9: [583,83,1000,55,944], // RIGHTWARDS PAIRED ARROWS
+ 0x21CA: [694,194,833,83,749], // DOWNWARDS PAIRED ARROWS
+ 0x21CB: [514,14,1000,55,944], // LEFTWARDS HARPOON OVER RIGHTWARDS HARPOON
+ 0x21CC: [514,14,1000,55,944], // RIGHTWARDS HARPOON OVER LEFTWARDS HARPOON
+ 0x21CD: [534,35,1000,54,942], // LEFTWARDS DOUBLE ARROW WITH STROKE
+ 0x21CE: [534,37,1000,32,965], // LEFT RIGHT DOUBLE ARROW WITH STROKE
+ 0x21CF: [534,35,1000,55,943], // RIGHTWARDS DOUBLE ARROW WITH STROKE
+ 0x21DA: [611,111,1000,76,944], // LEFTWARDS TRIPLE ARROW
+ 0x21DB: [611,111,1000,55,923], // RIGHTWARDS TRIPLE ARROW
+ 0x21DD: [417,-83,1000,56,943], // RIGHTWARDS SQUIGGLE ARROW
+ 0x21E0: [437,-64,1334,64,1251], // LEFTWARDS DASHED ARROW
+ 0x21E2: [437,-64,1334,84,1251], // RIGHTWARDS DASHED ARROW
+ 0x2201: [846,21,500,56,444], // COMPLEMENT
+ 0x2204: [860,166,556,55,497], // THERE DOES NOT EXIST
+ 0x2205: [587,3,778,54,720], // EMPTY SET
+ 0x220D: [440,1,429,102,456], // SMALL CONTAINS AS MEMBER
+ 0x2212: [270,-230,500,84,417], // MINUS SIGN
+ 0x2214: [766,93,778,57,722], // DOT PLUS
+ 0x2216: [430,23,778,91,685], // SET MINUS
+ 0x221D: [472,-28,778,56,722], // PROPORTIONAL TO
+ 0x2220: [694,0,722,55,666], // ANGLE
+ 0x2221: [714,20,722,55,666], // MEASURED ANGLE
+ 0x2222: [551,51,722,55,666], // SPHERICAL ANGLE
+ 0x2223: [430,23,222,91,131], // DIVIDES
+ 0x2224: [750,252,278,-21,297], // DOES NOT DIVIDE
+ 0x2225: [431,23,389,55,331], // PARALLEL TO
+ 0x2226: [750,250,500,-20,518], // NOT PARALLEL TO
+ 0x2234: [471,82,667,24,643], // THEREFORE
+ 0x2235: [471,82,667,23,643], // BECAUSE
+ 0x223C: [365,-132,778,55,719], // TILDE OPERATOR
+ 0x223D: [367,-133,778,56,722], // REVERSED TILDE
+ 0x2241: [467,-32,778,55,719], // stix-not, vert, similar
+ 0x2242: [463,-34,778,55,720], // MINUS TILDE
+ 0x2246: [652,155,778,54,720], // APPROXIMATELY BUT NOT ACTUALLY EQUAL TO
+ 0x2248: [481,-50,778,55,719], // ALMOST EQUAL TO
+ 0x224A: [579,39,778,51,725], // ALMOST EQUAL OR EQUAL TO
+ 0x224E: [492,-8,778,56,722], // GEOMETRICALLY EQUIVALENT TO
+ 0x224F: [492,-133,778,56,722], // DIFFERENCE BETWEEN
+ 0x2251: [609,108,778,56,722], // GEOMETRICALLY EQUAL TO
+ 0x2252: [601,101,778,15,762], // APPROXIMATELY EQUAL TO OR THE IMAGE OF
+ 0x2253: [601,102,778,14,762], // IMAGE OF OR APPROXIMATELY EQUAL TO
+ 0x2256: [367,-133,778,56,722], // RING IN EQUAL TO
+ 0x2257: [721,-133,778,56,722], // RING EQUAL TO
+ 0x225C: [859,-133,778,56,723], // DELTA EQUAL TO
+ 0x2266: [753,175,778,83,694], // LESS-THAN OVER EQUAL TO
+ 0x2267: [753,175,778,83,694], // GREATER-THAN OVER EQUAL TO
+ 0x2268: [752,286,778,82,693], // stix-less, vert, not double equals
+ 0x2269: [752,286,778,82,693], // stix-gt, vert, not double equals
+ 0x226C: [750,250,500,74,425], // BETWEEN
+ 0x226E: [708,209,778,82,693], // stix-not, vert, less-than
+ 0x226F: [708,209,778,82,693], // stix-not, vert, greater-than
+ 0x2270: [801,303,778,82,694], // stix-not, vert, less-than-or-equal
+ 0x2271: [801,303,778,82,694], // stix-not, vert, greater-than-or-equal
+ 0x2272: [732,228,778,56,722], // stix-less-than or (contour) similar
+ 0x2273: [732,228,778,56,722], // stix-greater-than or (contour) similar
+ 0x2276: [681,253,778,44,734], // LESS-THAN OR GREATER-THAN
+ 0x2277: [681,253,778,83,694], // GREATER-THAN OR LESS-THAN
+ 0x227C: [580,153,778,83,694], // PRECEDES OR EQUAL TO
+ 0x227D: [580,154,778,82,694], // SUCCEEDS OR EQUAL TO
+ 0x227E: [732,228,778,56,722], // PRECEDES OR EQUIVALENT TO
+ 0x227F: [732,228,778,56,722], // SUCCEEDS OR EQUIVALENT TO
+ 0x2280: [705,208,778,82,693], // DOES NOT PRECEDE
+ 0x2281: [705,208,778,82,693], // stix-not (vert) succeeds
+ 0x2288: [801,303,778,83,693], // stix-/nsubseteq N: not (vert) subset, equals
+ 0x2289: [801,303,778,82,691], // stix-/nsupseteq N: not (vert) superset, equals
+ 0x228A: [635,241,778,84,693], // stix-subset, not equals, variant
+ 0x228B: [635,241,778,82,691], // stix-superset, not equals, variant
+ 0x228F: [539,41,778,83,694], // SQUARE IMAGE OF
+ 0x2290: [539,41,778,64,714], // SQUARE ORIGINAL OF
+ 0x229A: [582,82,778,57,721], // CIRCLED RING OPERATOR
+ 0x229B: [582,82,778,57,721], // CIRCLED ASTERISK OPERATOR
+ 0x229D: [582,82,778,57,721], // CIRCLED DASH
+ 0x229E: [689,0,778,55,722], // SQUARED PLUS
+ 0x229F: [689,0,778,55,722], // SQUARED MINUS
+ 0x22A0: [689,0,778,55,722], // SQUARED TIMES
+ 0x22A1: [689,0,778,55,722], // SQUARED DOT OPERATOR
+ 0x22A8: [694,0,611,55,555], // TRUE
+ 0x22A9: [694,0,722,55,666], // FORCES
+ 0x22AA: [694,0,889,55,833], // TRIPLE VERTICAL BAR RIGHT TURNSTILE
+ 0x22AC: [695,1,611,-55,554], // DOES NOT PROVE
+ 0x22AD: [695,1,611,-55,554], // NOT TRUE
+ 0x22AE: [695,1,722,-55,665], // DOES NOT FORCE
+ 0x22AF: [695,1,722,-55,665], // NEGATED DOUBLE VERTICAL BAR DOUBLE RIGHT TURNSTILE
+ 0x22B2: [539,41,778,83,694], // NORMAL SUBGROUP OF
+ 0x22B3: [539,41,778,83,694], // CONTAINS AS NORMAL SUBGROUP
+ 0x22B4: [636,138,778,83,694], // NORMAL SUBGROUP OF OR EQUAL TO
+ 0x22B5: [636,138,778,83,694], // CONTAINS AS NORMAL SUBGROUP OR EQUAL TO
+ 0x22B8: [408,-92,1111,55,1055], // MULTIMAP
+ 0x22BA: [431,212,556,57,500], // INTERCALATE
+ 0x22BB: [716,0,611,55,555], // XOR
+ 0x22BC: [716,0,611,55,555], // NAND
+ 0x22C5: [189,0,278,55,222], // DOT OPERATOR
+ 0x22C7: [545,44,778,55,720], // DIVISION TIMES
+ 0x22C9: [492,-8,778,146,628], // LEFT NORMAL FACTOR SEMIDIRECT PRODUCT
+ 0x22CA: [492,-8,778,146,628], // RIGHT NORMAL FACTOR SEMIDIRECT PRODUCT
+ 0x22CB: [694,22,778,55,722], // LEFT SEMIDIRECT PRODUCT
+ 0x22CC: [694,22,778,55,722], // RIGHT SEMIDIRECT PRODUCT
+ 0x22CD: [464,-36,778,56,722], // REVERSED TILDE EQUALS
+ 0x22CE: [578,21,760,83,676], // CURLY LOGICAL OR
+ 0x22CF: [578,22,760,83,676], // CURLY LOGICAL AND
+ 0x22D0: [540,40,778,84,694], // DOUBLE SUBSET
+ 0x22D1: [540,40,778,83,693], // DOUBLE SUPERSET
+ 0x22D2: [598,22,667,55,611], // DOUBLE INTERSECTION
+ 0x22D3: [598,22,667,55,611], // DOUBLE UNION
+ 0x22D4: [736,22,667,56,611], // PITCHFORK
+ 0x22D6: [541,41,778,82,693], // LESS-THAN WITH DOT
+ 0x22D7: [541,41,778,82,693], // GREATER-THAN WITH DOT
+ 0x22D8: [568,67,1333,56,1277], // VERY MUCH LESS-THAN
+ 0x22D9: [568,67,1333,55,1277], // VERY MUCH GREATER-THAN
+ 0x22DA: [886,386,778,83,674], // stix-less, equal, slanted, greater
+ 0x22DB: [886,386,778,83,674], // stix-greater, equal, slanted, less
+ 0x22DE: [734,0,778,83,694], // EQUAL TO OR PRECEDES
+ 0x22DF: [734,0,778,82,694], // EQUAL TO OR SUCCEEDS
+ 0x22E0: [801,303,778,82,693], // stix-not (vert) precedes or contour equals
+ 0x22E1: [801,303,778,82,694], // stix-not (vert) succeeds or contour equals
+ 0x22E6: [730,359,778,55,719], // LESS-THAN BUT NOT EQUIVALENT TO
+ 0x22E7: [730,359,778,55,719], // GREATER-THAN BUT NOT EQUIVALENT TO
+ 0x22E8: [730,359,778,55,719], // PRECEDES BUT NOT EQUIVALENT TO
+ 0x22E9: [730,359,778,55,719], // SUCCEEDS BUT NOT EQUIVALENT TO
+ 0x22EA: [706,208,778,82,693], // NOT NORMAL SUBGROUP OF
+ 0x22EB: [706,208,778,82,693], // DOES NOT CONTAIN AS NORMAL SUBGROUP
+ 0x22EC: [802,303,778,82,693], // stix-not, vert, left triangle, equals
+ 0x22ED: [801,303,778,82,693], // stix-not, vert, right triangle, equals
+ 0x2322: [378,-122,778,55,722], // stix-small down curve
+ 0x2323: [378,-143,778,55,722], // stix-small up curve
+ 0x24C8: [709,175,902,8,894], // CIRCLED LATIN CAPITAL LETTER S
+ 0x250C: [694,-306,500,55,444], // BOX DRAWINGS LIGHT DOWN AND RIGHT
+ 0x2510: [694,-306,500,55,444], // BOX DRAWINGS LIGHT DOWN AND LEFT
+ 0x2514: [366,22,500,55,444], // BOX DRAWINGS LIGHT UP AND RIGHT
+ 0x2518: [366,22,500,55,444], // BOX DRAWINGS LIGHT UP AND LEFT
+ 0x2571: [694,195,889,0,860], // BOX DRAWINGS LIGHT DIAGONAL UPPER RIGHT TO LOWER LEFT
+ 0x2572: [694,195,889,0,860], // BOX DRAWINGS LIGHT DIAGONAL UPPER LEFT TO LOWER RIGHT
+ 0x25A0: [689,0,778,55,722], // BLACK SQUARE
+ 0x25A1: [689,0,778,55,722], // WHITE SQUARE
+ 0x25B2: [575,20,722,84,637], // BLACK UP-POINTING TRIANGLE
+ 0x25B3: [575,20,722,84,637], // WHITE UP-POINTING TRIANGLE
+ 0x25B6: [539,41,778,83,694], // BLACK RIGHT-POINTING TRIANGLE
+ 0x25BC: [576,19,722,84,637], // BLACK DOWN-POINTING TRIANGLE
+ 0x25BD: [576,19,722,84,637], // WHITE DOWN-POINTING TRIANGLE
+ 0x25C0: [539,41,778,83,694], // BLACK LEFT-POINTING TRIANGLE
+ 0x25CA: [716,132,667,56,611], // LOZENGE
+ 0x2605: [694,111,944,49,895], // BLACK STAR
+ 0x2713: [706,34,833,84,749], // CHECK MARK
+ 0x2720: [716,22,833,48,786], // MALTESE CROSS
+ 0x29EB: [716,132,667,56,611], // BLACK LOZENGE
+ 0x2A5E: [813,97,611,55,555], // LOGICAL AND WITH DOUBLE OVERBAR
+ 0x2A7D: [636,138,778,83,694], // LESS-THAN OR SLANTED EQUAL TO
+ 0x2A7E: [636,138,778,83,694], // GREATER-THAN OR SLANTED EQUAL TO
+ 0x2A85: [762,290,778,55,722], // LESS-THAN OR APPROXIMATE
+ 0x2A86: [762,290,778,55,722], // GREATER-THAN OR APPROXIMATE
+ 0x2A87: [635,241,778,82,693], // LESS-THAN AND SINGLE-LINE NOT EQUAL TO
+ 0x2A88: [635,241,778,82,693], // GREATER-THAN AND SINGLE-LINE NOT EQUAL TO
+ 0x2A89: [761,387,778,57,718], // LESS-THAN AND NOT APPROXIMATE
+ 0x2A8A: [761,387,778,57,718], // GREATER-THAN AND NOT APPROXIMATE
+ 0x2A8B: [1003,463,778,83,694], // LESS-THAN ABOVE DOUBLE-LINE EQUAL ABOVE GREATER-THAN
+ 0x2A8C: [1003,463,778,83,694], // GREATER-THAN ABOVE DOUBLE-LINE EQUAL ABOVE LESS-THAN
+ 0x2A95: [636,138,778,83,694], // SLANTED EQUAL TO OR LESS-THAN
+ 0x2A96: [636,138,778,83,694], // SLANTED EQUAL TO OR GREATER-THAN
+ 0x2AB5: [752,286,778,82,693], // PRECEDES ABOVE NOT EQUAL TO
+ 0x2AB6: [752,286,778,82,693], // SUCCEEDS ABOVE NOT EQUAL TO
+ 0x2AB7: [761,294,778,57,717], // PRECEDES ABOVE ALMOST EQUAL TO
+ 0x2AB8: [761,294,778,57,717], // SUCCEEDS ABOVE ALMOST EQUAL TO
+ 0x2AB9: [761,337,778,57,718], // PRECEDES ABOVE NOT ALMOST EQUAL TO
+ 0x2ABA: [761,337,778,57,718], // SUCCEEDS ABOVE NOT ALMOST EQUAL TO
+ 0x2AC5: [753,215,778,84,694], // SUBSET OF ABOVE EQUALS SIGN
+ 0x2AC6: [753,215,778,83,694], // SUPERSET OF ABOVE EQUALS SIGN
+ 0x2ACB: [783,385,778,82,693], // stix-subset not double equals, variant
+ 0x2ACC: [783,385,778,82,693], // SUPERSET OF ABOVE NOT EQUAL TO
+ 0xE006: [430,23,222,-20,240], // ??
+ 0xE007: [431,24,389,-20,407], // ??
+ 0xE008: [605,85,778,55,719], // ??
+ 0xE009: [434,6,667,37,734], // ??
+ 0xE00C: [752,284,778,82,693], // ??
+ 0xE00D: [752,284,778,82,693], // ??
+ 0xE00E: [919,421,778,82,694], // stix-not greater, double equals
+ 0xE00F: [801,303,778,82,694], // stix-not greater-or-equal, slanted
+ 0xE010: [801,303,778,82,694], // stix-not less-or-equal, slanted
+ 0xE011: [919,421,778,82,694], // stix-not less, double equals
+ 0xE016: [828,330,778,82,694], // stix-not subset, double equals
+ 0xE017: [752,332,778,82,694], // ??
+ 0xE018: [828,330,778,82,694], // stix-not superset, double equals
+ 0xE019: [752,333,778,82,693], // ??
+ 0xE01A: [634,255,778,84,693], // ??
+ 0xE01B: [634,254,778,82,691] // ??
+};
+
+CHTML.fontLoaded("TeX/"+font.substr(8));
+
+})(MathJax.OutputJax.CommonHTML);
+// @license-end
diff --git a/js/mathjax/jax/output/CommonHTML/fonts/TeX/Caligraphic-Bold.js b/js/mathjax/jax/output/CommonHTML/fonts/TeX/Caligraphic-Bold.js
new file mode 100644
index 0000000..8de81a8
--- /dev/null
+++ b/js/mathjax/jax/output/CommonHTML/fonts/TeX/Caligraphic-Bold.js
@@ -0,0 +1,101 @@
+// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0
+/*************************************************************
+ *
+ * MathJax/jax/output/CommonHTML/fonts/TeX/Caligraphic-Bold.js
+ *
+ * Copyright (c) 2015-2020 The MathJax Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+(function (CHTML) {
+
+var font = 'MathJax_Caligraphic-Bold';
+
+CHTML.FONTDATA.FONTS[font] = {
+ className: CHTML.FONTDATA.familyName(font),
+ centerline: 315, ascent: 840, descent: 211,
+ weight: 'bold',
+ skew: {
+ 0x41: 0.224,
+ 0x42: 0.16,
+ 0x43: 0.16,
+ 0x44: 0.0958,
+ 0x45: 0.128,
+ 0x46: 0.128,
+ 0x47: 0.128,
+ 0x48: 0.128,
+ 0x49: 0.0319,
+ 0x4A: 0.192,
+ 0x4B: 0.0639,
+ 0x4C: 0.16,
+ 0x4D: 0.16,
+ 0x4E: 0.0958,
+ 0x4F: 0.128,
+ 0x50: 0.0958,
+ 0x51: 0.128,
+ 0x52: 0.0958,
+ 0x53: 0.16,
+ 0x54: 0.0319,
+ 0x55: 0.0958,
+ 0x56: 0.0319,
+ 0x57: 0.0958,
+ 0x58: 0.16,
+ 0x59: 0.0958,
+ 0x5A: 0.16
+ },
+ 0x20: [0,0,250,0,0], // SPACE
+ 0x30: [460,17,575,46,528], // DIGIT ZERO
+ 0x31: [461,0,575,80,494], // DIGIT ONE
+ 0x32: [460,0,575,51,517], // DIGIT TWO
+ 0x33: [461,211,575,48,525], // DIGIT THREE
+ 0x34: [469,194,575,32,542], // DIGIT FOUR
+ 0x35: [461,211,575,57,517], // DIGIT FIVE
+ 0x36: [660,17,575,48,526], // DIGIT SIX
+ 0x37: [476,211,575,64,558], // DIGIT SEVEN
+ 0x38: [661,17,575,48,526], // DIGIT EIGHT
+ 0x39: [461,210,575,48,526], // DIGIT NINE
+ 0x41: [751,49,921,39,989], // LATIN CAPITAL LETTER A
+ 0x42: [705,17,748,40,740], // LATIN CAPITAL LETTER B
+ 0x43: [703,20,613,20,599], // LATIN CAPITAL LETTER C
+ 0x44: [686,0,892,20,885], // LATIN CAPITAL LETTER D
+ 0x45: [703,16,607,37,627], // LATIN CAPITAL LETTER E
+ 0x46: [686,30,814,17,930], // LATIN CAPITAL LETTER F
+ 0x47: [703,113,682,50,671], // LATIN CAPITAL LETTER G
+ 0x48: [686,48,987,20,946], // LATIN CAPITAL LETTER H
+ 0x49: [686,0,642,-27,746], // LATIN CAPITAL LETTER I
+ 0x4A: [686,114,779,53,937], // LATIN CAPITAL LETTER J
+ 0x4B: [703,17,871,40,834], // LATIN CAPITAL LETTER K
+ 0x4C: [703,17,788,41,751], // LATIN CAPITAL LETTER L
+ 0x4D: [703,49,1378,38,1353], // LATIN CAPITAL LETTER M
+ 0x4E: [840,49,937,-24,1105], // LATIN CAPITAL LETTER N
+ 0x4F: [703,17,906,63,882], // LATIN CAPITAL LETTER O
+ 0x50: [686,67,810,20,846], // LATIN CAPITAL LETTER P
+ 0x51: [703,146,939,120,905], // LATIN CAPITAL LETTER Q
+ 0x52: [686,17,990,20,981], // LATIN CAPITAL LETTER R
+ 0x53: [703,16,696,25,721], // LATIN CAPITAL LETTER S
+ 0x54: [720,69,644,38,947], // LATIN CAPITAL LETTER T
+ 0x55: [686,24,715,-10,771], // LATIN CAPITAL LETTER U
+ 0x56: [686,77,737,25,774], // LATIN CAPITAL LETTER V
+ 0x57: [686,77,1169,25,1206], // LATIN CAPITAL LETTER W
+ 0x58: [686,-1,817,56,906], // LATIN CAPITAL LETTER X
+ 0x59: [686,164,759,36,797], // LATIN CAPITAL LETTER Y
+ 0x5A: [686,0,818,46,853], // LATIN CAPITAL LETTER Z
+ 0xA0: [0,0,250,0,0] // NO-BREAK SPACE
+};
+
+CHTML.fontLoaded("TeX/"+font.substr(8));
+
+})(MathJax.OutputJax.CommonHTML);
+// @license-end
diff --git a/js/mathjax/jax/output/CommonHTML/fonts/TeX/Fraktur-Bold.js b/js/mathjax/jax/output/CommonHTML/fonts/TeX/Fraktur-Bold.js
new file mode 100644
index 0000000..2715d24
--- /dev/null
+++ b/js/mathjax/jax/output/CommonHTML/fonts/TeX/Fraktur-Bold.js
@@ -0,0 +1,127 @@
+// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0
+/*************************************************************
+ *
+ * MathJax/jax/output/CommonHTML/fonts/TeX/Fraktur-Regular.js
+ *
+ * Copyright (c) 2015-2020 The MathJax Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+(function (CHTML) {
+
+var font = 'MathJax_Fraktur-Bold';
+
+CHTML.FONTDATA.FONTS[font] = {
+ className: CHTML.FONTDATA.familyName(font),
+ centerline: 259, ascent: 740, descent: 223,
+ weight: 'bold',
+ 0x20: [0,0,250,0,0], // SPACE
+ 0x21: [689,12,349,107,241], // EXCLAMATION MARK
+ 0x22: [695,-432,254,10,231], // QUOTATION MARK
+ 0x26: [696,16,871,44,839], // AMPERSAND
+ 0x27: [695,-436,250,80,158], // APOSTROPHE
+ 0x28: [737,186,459,134,347], // LEFT PARENTHESIS
+ 0x29: [735,187,459,105,326], // RIGHT PARENTHESIS
+ 0x2A: [692,-449,328,40,277], // ASTERISK
+ 0x2B: [598,82,893,56,837], // PLUS SIGN
+ 0x2C: [107,191,328,118,253], // COMMA
+ 0x2D: [275,-236,893,54,833], // HYPHEN-MINUS
+ 0x2E: [102,15,328,103,237], // FULL STOP
+ 0x2F: [721,182,593,41,550], // SOLIDUS
+ 0x30: [501,12,593,42,533], // DIGIT ZERO
+ 0x31: [489,0,593,54,548], // DIGIT ONE
+ 0x32: [491,-2,593,44,563], // DIGIT TWO
+ 0x33: [487,193,593,31,523], // DIGIT THREE
+ 0x34: [495,196,593,13,565], // DIGIT FOUR
+ 0x35: [481,190,593,19,518], // DIGIT FIVE
+ 0x36: [704,12,593,48,547], // DIGIT SIX
+ 0x37: [479,197,593,54,591], // DIGIT SEVEN
+ 0x38: [714,5,593,45,542], // DIGIT EIGHT
+ 0x39: [487,195,593,29,549], // DIGIT NINE
+ 0x3A: [457,12,255,57,197], // COLON
+ 0x3B: [458,190,255,56,211], // SEMICOLON
+ 0x3D: [343,-168,582,22,559], // EQUALS SIGN
+ 0x3F: [697,14,428,40,422], // QUESTION MARK
+ 0x41: [686,31,847,29,827], // LATIN CAPITAL LETTER A
+ 0x42: [684,31,1044,57,965], // LATIN CAPITAL LETTER B
+ 0x43: [676,32,723,72,726], // LATIN CAPITAL LETTER C
+ 0x44: [683,29,982,31,896], // LATIN CAPITAL LETTER D
+ 0x45: [686,29,783,74,728], // LATIN CAPITAL LETTER E
+ 0x46: [684,146,722,17,727], // LATIN CAPITAL LETTER F
+ 0x47: [687,29,927,74,844], // LATIN CAPITAL LETTER G
+ 0x48: [683,126,851,6,752], // LATIN CAPITAL LETTER H
+ 0x49: [681,25,655,32,623], // LATIN CAPITAL LETTER I
+ 0x4A: [680,141,652,-8,616], // LATIN CAPITAL LETTER J
+ 0x4B: [681,26,789,20,806], // LATIN CAPITAL LETTER K
+ 0x4C: [683,28,786,30,764], // LATIN CAPITAL LETTER L
+ 0x4D: [683,32,1239,27,1232], // LATIN CAPITAL LETTER M
+ 0x4E: [679,30,983,26,973], // LATIN CAPITAL LETTER N
+ 0x4F: [726,30,976,12,881], // LATIN CAPITAL LETTER O
+ 0x50: [688,223,977,33,943], // LATIN CAPITAL LETTER P
+ 0x51: [726,83,976,12,918], // LATIN CAPITAL LETTER Q
+ 0x52: [688,28,978,31,978], // LATIN CAPITAL LETTER R
+ 0x53: [685,31,978,82,905], // LATIN CAPITAL LETTER S
+ 0x54: [686,30,790,31,802], // LATIN CAPITAL LETTER T
+ 0x55: [688,39,851,18,871], // LATIN CAPITAL LETTER U
+ 0x56: [685,29,982,25,966], // LATIN CAPITAL LETTER V
+ 0x57: [683,30,1235,26,1240], // LATIN CAPITAL LETTER W
+ 0x58: [681,35,849,32,835], // LATIN CAPITAL LETTER X
+ 0x59: [688,214,984,34,878], // LATIN CAPITAL LETTER Y
+ 0x5A: [677,148,711,-4,624], // LATIN CAPITAL LETTER Z
+ 0x5B: [740,130,257,36,226], // LEFT SQUARE BRACKET
+ 0x5D: [738,132,257,14,208], // RIGHT SQUARE BRACKET
+ 0x5E: [734,-452,590,1,584], // CIRCUMFLEX ACCENT
+ 0x61: [472,32,603,80,586], // LATIN SMALL LETTER A
+ 0x62: [690,32,590,86,504], // LATIN SMALL LETTER B
+ 0x63: [473,26,464,87,424], // LATIN SMALL LETTER C
+ 0x64: [632,28,589,-1,511], // LATIN SMALL LETTER D
+ 0x65: [471,27,472,81,428], // LATIN SMALL LETTER E
+ 0x66: [687,222,388,35,372], // LATIN SMALL LETTER F
+ 0x67: [472,208,595,17,541], // LATIN SMALL LETTER G
+ 0x68: [687,207,615,89,507], // LATIN SMALL LETTER H
+ 0x69: [686,25,331,3,327], // LATIN SMALL LETTER I
+ 0x6A: [682,203,332,-19,238], // LATIN SMALL LETTER J
+ 0x6B: [682,25,464,34,432], // LATIN SMALL LETTER K
+ 0x6C: [681,24,337,100,312], // LATIN SMALL LETTER L
+ 0x6D: [476,31,921,16,900], // LATIN SMALL LETTER M
+ 0x6E: [473,28,654,5,608], // LATIN SMALL LETTER N
+ 0x6F: [482,34,609,107,515], // LATIN SMALL LETTER O
+ 0x70: [557,207,604,-1,519], // LATIN SMALL LETTER P
+ 0x71: [485,211,596,87,515], // LATIN SMALL LETTER Q
+ 0x72: [472,26,460,13,453], // LATIN SMALL LETTER R
+ 0x73: [479,34,523,-23,481], // LATIN SMALL LETTER S
+ 0x74: [648,27,393,43,407], // LATIN SMALL LETTER T
+ 0x75: [472,32,589,9,603], // LATIN SMALL LETTER U
+ 0x76: [546,27,604,56,507], // LATIN SMALL LETTER V
+ 0x77: [549,32,918,55,815], // LATIN SMALL LETTER W
+ 0x78: [471,188,459,8,441], // LATIN SMALL LETTER X
+ 0x79: [557,221,589,60,512], // LATIN SMALL LETTER Y
+ 0x7A: [471,214,461,-7,378], // LATIN SMALL LETTER Z
+ 0xA0: [0,0,250,0,0], // NO-BREAK SPACE
+ 0x2018: [708,-411,254,53,187], // LEFT SINGLE QUOTATION MARK
+ 0x2019: [692,-394,254,58,193], // RIGHT SINGLE QUOTATION MARK
+ 0xE301: [630,27,587,64,512], // stix-MATHEMATICAL BOLD CAPITAL GAMMA SLASHED
+ 0xE302: [693,212,394,37,408], // stix-capital Delta, Greek slashed
+ 0xE303: [681,219,387,36,384], // stix-MATHEMATICAL BOLD CAPITAL DELTA SLASHED
+ 0xE304: [473,212,593,67,531], // stix-capital Epsilon, Greek slashed
+ 0xE305: [684,27,393,33,387], // stix-MATHEMATICAL BOLD CAPITAL EPSILON SLASHED
+ 0xE308: [679,220,981,32,875], // stix-capital Eta, Greek slashed
+ 0xE309: [717,137,727,17,633] // stix-MATHEMATICAL BOLD CAPITAL ETA SLASHED
+};
+
+CHTML.fontLoaded("TeX/"+font.substr(8));
+
+})(MathJax.OutputJax.CommonHTML);
+// @license-end
diff --git a/js/mathjax/jax/output/CommonHTML/fonts/TeX/Fraktur-Regular.js b/js/mathjax/jax/output/CommonHTML/fonts/TeX/Fraktur-Regular.js
new file mode 100644
index 0000000..1c9a35c
--- /dev/null
+++ b/js/mathjax/jax/output/CommonHTML/fonts/TeX/Fraktur-Regular.js
@@ -0,0 +1,127 @@
+// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0
+/*************************************************************
+ *
+ * MathJax/jax/output/CommonHTML/fonts/TeX/Fraktur-Regular.js
+ *
+ * Copyright (c) 2015-2020 The MathJax Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+(function (CHTML) {
+
+var font = 'MathJax_Fraktur';
+
+CHTML.FONTDATA.FONTS[font] = {
+ className: CHTML.FONTDATA.familyName(font),
+ centerline: 258, ascent: 740, descent: 224,
+ 0x20: [0,0,250,0,0], // SPACE
+ 0x21: [689,12,296,91,204], // EXCLAMATION MARK
+ 0x22: [695,-432,215,8,196], // QUOTATION MARK
+ 0x26: [698,11,738,49,733], // AMPERSAND
+ 0x27: [695,-436,212,69,134], // APOSTROPHE
+ 0x28: [737,186,389,114,293], // LEFT PARENTHESIS
+ 0x29: [735,187,389,89,276], // RIGHT PARENTHESIS
+ 0x2A: [692,-449,278,33,234], // ASTERISK
+ 0x2B: [598,82,756,47,709], // PLUS SIGN
+ 0x2C: [107,191,278,99,213], // COMMA
+ 0x2D: [275,-236,756,46,706], // HYPHEN-MINUS
+ 0x2E: [102,15,278,87,200], // FULL STOP
+ 0x2F: [721,182,502,34,466], // SOLIDUS
+ 0x30: [492,13,502,42,456], // DIGIT ZERO
+ 0x31: [468,2,502,47,460], // DIGIT ONE
+ 0x32: [474,-1,502,60,484], // DIGIT TWO
+ 0x33: [473,182,502,39,429], // DIGIT THREE
+ 0x34: [476,191,502,10,481], // DIGIT FOUR
+ 0x35: [458,184,502,47,440], // DIGIT FIVE
+ 0x36: [700,13,502,45,471], // DIGIT SIX
+ 0x37: [468,181,502,37,498], // DIGIT SEVEN
+ 0x38: [705,10,502,40,461], // DIGIT EIGHT
+ 0x39: [469,182,502,28,466], // DIGIT NINE
+ 0x3A: [457,12,216,50,168], // COLON
+ 0x3B: [458,189,216,47,179], // SEMICOLON
+ 0x3D: [368,-132,756,54,725], // EQUALS SIGN
+ 0x3F: [693,11,362,46,357], // QUESTION MARK
+ 0x41: [696,26,718,22,708], // LATIN CAPITAL LETTER A
+ 0x42: [691,27,884,48,820], // LATIN CAPITAL LETTER B
+ 0x43: [685,24,613,59,607], // LATIN CAPITAL LETTER C
+ 0x44: [685,27,832,27,745], // LATIN CAPITAL LETTER D
+ 0x45: [685,24,663,86,634], // LATIN CAPITAL LETTER E
+ 0x46: [686,153,611,11,612], // LATIN CAPITAL LETTER F
+ 0x47: [690,26,785,66,710], // LATIN CAPITAL LETTER G
+ 0x48: [666,133,720,1,644], // LATIN CAPITAL LETTER H
+ 0x49: [686,26,554,30,532], // LATIN CAPITAL LETTER I
+ 0x4A: [686,139,552,-10,522], // LATIN CAPITAL LETTER J
+ 0x4B: [680,27,668,17,682], // LATIN CAPITAL LETTER K
+ 0x4C: [686,26,666,33,644], // LATIN CAPITAL LETTER L
+ 0x4D: [692,27,1050,27,1048], // LATIN CAPITAL LETTER M
+ 0x4E: [686,25,832,27,825], // LATIN CAPITAL LETTER N
+ 0x4F: [729,27,827,12,744], // LATIN CAPITAL LETTER O
+ 0x50: [692,218,828,28,804], // LATIN CAPITAL LETTER P
+ 0x51: [729,69,827,11,782], // LATIN CAPITAL LETTER Q
+ 0x52: [686,26,828,27,824], // LATIN CAPITAL LETTER R
+ 0x53: [692,27,829,66,756], // LATIN CAPITAL LETTER S
+ 0x54: [701,27,669,34,676], // LATIN CAPITAL LETTER T
+ 0x55: [697,27,646,-25,665], // LATIN CAPITAL LETTER U
+ 0x56: [686,26,831,26,825], // LATIN CAPITAL LETTER V
+ 0x57: [686,27,1046,32,1054], // LATIN CAPITAL LETTER W
+ 0x58: [688,27,719,28,709], // LATIN CAPITAL LETTER X
+ 0x59: [686,218,833,27,740], // LATIN CAPITAL LETTER Y
+ 0x5A: [729,139,602,11,532], // LATIN CAPITAL LETTER Z
+ 0x5B: [740,130,278,117,278], // LEFT SQUARE BRACKET
+ 0x5D: [738,131,278,-4,160], // RIGHT SQUARE BRACKET
+ 0x5E: [734,-452,500,0,495], // CIRCUMFLEX ACCENT
+ 0x61: [470,35,500,66,497], // LATIN SMALL LETTER A
+ 0x62: [685,31,513,87,442], // LATIN SMALL LETTER B
+ 0x63: [466,29,389,72,359], // LATIN SMALL LETTER C
+ 0x64: [609,33,499,13,428], // LATIN SMALL LETTER D
+ 0x65: [467,30,401,70,364], // LATIN SMALL LETTER E
+ 0x66: [681,221,326,30,323], // LATIN SMALL LETTER F
+ 0x67: [470,209,504,17,455], // LATIN SMALL LETTER G
+ 0x68: [688,205,521,77,434], // LATIN SMALL LETTER H
+ 0x69: [673,20,279,14,267], // LATIN SMALL LETTER I
+ 0x6A: [672,208,281,-9,196], // LATIN SMALL LETTER J
+ 0x6B: [689,25,389,24,362], // LATIN SMALL LETTER K
+ 0x6C: [685,20,280,98,276], // LATIN SMALL LETTER L
+ 0x6D: [475,26,767,8,753], // LATIN SMALL LETTER M
+ 0x6E: [475,22,527,20,514], // LATIN SMALL LETTER N
+ 0x6F: [480,28,489,67,412], // LATIN SMALL LETTER O
+ 0x70: [541,212,500,12,430], // LATIN SMALL LETTER P
+ 0x71: [479,219,489,60,419], // LATIN SMALL LETTER Q
+ 0x72: [474,21,389,17,387], // LATIN SMALL LETTER R
+ 0x73: [478,29,443,-18,406], // LATIN SMALL LETTER S
+ 0x74: [640,20,333,27,348], // LATIN SMALL LETTER T
+ 0x75: [474,23,517,9,513], // LATIN SMALL LETTER U
+ 0x76: [530,28,512,55,434], // LATIN SMALL LETTER V
+ 0x77: [532,28,774,45,688], // LATIN SMALL LETTER W
+ 0x78: [472,188,389,10,363], // LATIN SMALL LETTER X
+ 0x79: [528,218,499,45,431], // LATIN SMALL LETTER Y
+ 0x7A: [471,214,391,-7,314], // LATIN SMALL LETTER Z
+ 0xA0: [0,0,250,0,0], // NO-BREAK SPACE
+ 0x2018: [708,-410,215,45,158], // LEFT SINGLE QUOTATION MARK
+ 0x2019: [692,-395,215,49,163], // RIGHT SINGLE QUOTATION MARK
+ 0xE300: [683,32,497,75,430], // stix-capital Gamma, Greek slashed
+ 0xE301: [616,30,498,35,432], // stix-MATHEMATICAL BOLD CAPITAL GAMMA SLASHED
+ 0xE302: [680,215,333,29,339], // stix-capital Delta, Greek slashed
+ 0xE303: [679,224,329,28,318], // stix-MATHEMATICAL BOLD CAPITAL DELTA SLASHED
+ 0xE304: [471,214,503,52,449], // stix-capital Epsilon, Greek slashed
+ 0xE305: [686,20,333,26,315], // stix-MATHEMATICAL BOLD CAPITAL EPSILON SLASHED
+ 0xE306: [577,21,334,29,347], // stix-capital Zeta, Greek slashed
+ 0xE307: [475,22,501,10,514] // stix-MATHEMATICAL BOLD CAPITAL ZETA SLASHED
+};
+
+CHTML.fontLoaded("TeX/"+font.substr(8));
+
+})(MathJax.OutputJax.CommonHTML);
+// @license-end
diff --git a/js/mathjax/jax/output/CommonHTML/fonts/TeX/Main-Bold.js b/js/mathjax/jax/output/CommonHTML/fonts/TeX/Main-Bold.js
new file mode 100644
index 0000000..1dd2251
--- /dev/null
+++ b/js/mathjax/jax/output/CommonHTML/fonts/TeX/Main-Bold.js
@@ -0,0 +1,210 @@
+// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0
+/*************************************************************
+ *
+ * MathJax/jax/output/CommonHTML/fonts/TeX/Main-Bold.js
+ *
+ * Copyright (c) 2015-2020 The MathJax Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+(function (CHTML) {
+
+var font = 'MathJax_Main-Bold';
+
+MathJax.Hub.Insert(CHTML.FONTDATA.FONTS[font],{
+ 0xA0: [0,0,250,0,0], // NO-BREAK SPACE
+ 0xA8: [695,-535,575,96,478], // DIAERESIS
+ 0xAC: [371,-61,767,64,702], // NOT SIGN
+ 0xAF: [607,-540,575,80,494], // MACRON
+ 0xB0: [702,-536,575,160,414], // DEGREE SIGN
+ 0xB1: [728,35,894,64,829], // PLUS-MINUS SIGN
+ 0xB4: [706,-503,575,236,460], // ACUTE ACCENT
+ 0xD7: [530,28,894,168,726], // MULTIPLICATION SIGN
+ 0xF7: [597,96,894,64,828], // DIVISION SIGN
+ 0x131: [452,8,394,24,367], // LATIN SMALL LETTER DOTLESS I
+ 0x237: [451,201,439,-12,420], // LATIN SMALL LETTER DOTLESS J
+ 0x2C6: [694,-520,575,126,448], // MODIFIER LETTER CIRCUMFLEX ACCENT
+ 0x2C7: [660,-515,575,130,444], // CARON
+ 0x2C9: [607,-540,575,80,494], // MODIFIER LETTER MACRON
+ 0x2CA: [706,-503,575,236,460], // MODIFIER LETTER ACUTE ACCENT
+ 0x2CB: [706,-503,575,114,338], // MODIFIER LETTER GRAVE ACCENT
+ 0x2D8: [694,-500,575,102,472], // BREVE
+ 0x2D9: [695,-525,575,202,372], // DOT ABOVE
+ 0x2DA: [702,-536,575,160,414], // RING ABOVE
+ 0x2DC: [694,-552,575,96,478], // SMALL TILDE
+ 0x300: [706,-503,0,-461,-237], // COMBINING GRAVE ACCENT
+ 0x301: [706,-503,0,-339,-115], // COMBINING ACUTE ACCENT
+ 0x302: [694,-520,0,-449,-127], // COMBINING CIRCUMFLEX ACCENT
+ 0x303: [694,-552,0,-479,-97], // COMBINING TILDE
+ 0x304: [607,-540,0,-495,-81], // COMBINING MACRON
+ 0x306: [694,-500,0,-473,-103], // COMBINING BREVE
+ 0x307: [695,-525,0,-373,-203], // COMBINING DOT ABOVE
+ 0x308: [695,-535,0,-479,-97], // COMBINING DIAERESIS
+ 0x30A: [702,-536,0,-415,-161], // COMBINING RING ABOVE
+ 0x30B: [714,-511,0,-442,-82], // COMBINING DOUBLE ACUTE ACCENT
+ 0x30C: [660,-515,0,-445,-131], // COMBINING CARON
+ 0x338: [711,210,0,-734,-161], // COMBINING LONG SOLIDUS OVERLAY
+ 0x2002: [0,0,500,0,0], // ??
+ 0x2003: [0,0,999,0,0], // ??
+ 0x2004: [0,0,333,0,0], // ??
+ 0x2005: [0,0,250,0,0], // ??
+ 0x2006: [0,0,167,0,0], // ??
+ 0x2009: [0,0,167,0,0], // ??
+ 0x200A: [0,0,83,0,0], // ??
+ 0x2013: [300,-249,575,0,574], // EN DASH
+ 0x2014: [300,-249,1150,0,1149], // EM DASH
+ 0x2018: [694,-329,319,58,245], // LEFT SINGLE QUOTATION MARK
+ 0x2019: [694,-329,319,74,261], // RIGHT SINGLE QUOTATION MARK
+ 0x201C: [694,-329,603,110,564], // LEFT DOUBLE QUOTATION MARK
+ 0x201D: [694,-329,603,38,492], // RIGHT DOUBLE QUOTATION MARK
+ 0x2020: [702,211,511,64,446], // DAGGER
+ 0x2021: [702,202,511,64,446], // DOUBLE DAGGER
+ 0x2026: [171,-1,1295,74,1221], // HORIZONTAL ELLIPSIS
+ 0x2032: [563,-33,344,35,331], // PRIME
+ 0x20D7: [723,-513,0,-542,-33], // COMBINING RIGHT ARROW ABOVE
+ 0x210F: [694,8,668,45,642], // stix-/hbar - Planck's over 2pi
+ 0x2111: [702,8,831,64,798], // BLACK-LETTER CAPITAL I
+ 0x2113: [702,19,474,-1,446], // SCRIPT SMALL L
+ 0x2118: [461,210,740,72,726], // SCRIPT CAPITAL P
+ 0x211C: [711,16,831,42,824], // BLACK-LETTER CAPITAL R
+ 0x2135: [694,0,703,64,638], // ALEF SYMBOL
+ 0x2190: [518,17,1150,64,1084], // LEFTWARDS ARROW
+ 0x2191: [694,193,575,14,561], // UPWARDS ARROW
+ 0x2192: [518,17,1150,65,1085], // RIGHTWARDS ARROW
+ 0x2193: [694,194,575,14,561], // DOWNWARDS ARROW
+ 0x2194: [518,17,1150,64,1085], // LEFT RIGHT ARROW
+ 0x2195: [767,267,575,14,561], // UP DOWN ARROW
+ 0x2196: [724,194,1150,64,1084], // NORTH WEST ARROW
+ 0x2197: [724,193,1150,64,1085], // NORTH EAST ARROW
+ 0x2198: [694,224,1150,65,1085], // SOUTH EAST ARROW
+ 0x2199: [694,224,1150,64,1085], // SOUTH WEST ARROW
+ 0x21A6: [518,17,1150,65,1085], // RIGHTWARDS ARROW FROM BAR
+ 0x21A9: [518,17,1282,64,1218], // LEFTWARDS ARROW WITH HOOK
+ 0x21AA: [518,17,1282,65,1217], // RIGHTWARDS ARROW WITH HOOK
+ 0x21BC: [518,-220,1150,64,1084], // LEFTWARDS HARPOON WITH BARB UPWARDS
+ 0x21BD: [281,17,1150,64,1084], // LEFTWARDS HARPOON WITH BARB DOWNWARDS
+ 0x21C0: [518,-220,1150,65,1085], // RIGHTWARDS HARPOON WITH BARB UPWARDS
+ 0x21C1: [281,17,1150,64,1085], // RIGHTWARDS HARPOON WITH BARB DOWNWARDS
+ 0x21CC: [718,17,1150,64,1085], // RIGHTWARDS HARPOON OVER LEFTWARDS HARPOON
+ 0x21D0: [547,46,1150,64,1085], // LEFTWARDS DOUBLE ARROW
+ 0x21D1: [694,193,703,30,672], // UPWARDS DOUBLE ARROW
+ 0x21D2: [547,46,1150,64,1084], // RIGHTWARDS DOUBLE ARROW
+ 0x21D3: [694,194,703,30,672], // DOWNWARDS DOUBLE ARROW
+ 0x21D4: [547,46,1150,47,1102], // LEFT RIGHT DOUBLE ARROW
+ 0x21D5: [767,267,703,30,672], // UP DOWN DOUBLE ARROW
+ 0x2200: [694,16,639,1,640], // FOR ALL
+ 0x2202: [710,17,628,60,657], // PARTIAL DIFFERENTIAL
+ 0x2203: [694,-1,639,64,574], // THERE EXISTS
+ 0x2205: [767,73,575,46,528], // EMPTY SET
+ 0x2207: [686,24,958,56,901], // NABLA
+ 0x2208: [587,86,767,97,670], // ELEMENT OF
+ 0x2209: [711,210,767,97,670], // stix-negated (vert) set membership, variant
+ 0x220B: [587,86,767,96,670], // CONTAINS AS MEMBER
+ 0x2212: [281,-221,894,96,797], // MINUS SIGN
+ 0x2213: [537,227,894,64,829], // MINUS-OR-PLUS SIGN
+ 0x2215: [750,250,575,63,511], // DIVISION SLASH
+ 0x2216: [750,250,575,63,511], // SET MINUS
+ 0x2217: [472,-28,575,73,501], // ASTERISK OPERATOR
+ 0x2218: [474,-28,575,64,510], // RING OPERATOR
+ 0x2219: [474,-28,575,64,510], // BULLET OPERATOR
+ 0x221A: [820,180,958,78,988], // SQUARE ROOT
+ 0x221D: [451,8,894,65,830], // PROPORTIONAL TO
+ 0x221E: [452,8,1150,65,1084], // INFINITY
+ 0x2220: [714,0,722,55,676], // ANGLE
+ 0x2223: [750,249,319,129,190], // DIVIDES
+ 0x2225: [750,248,575,145,430], // PARALLEL TO
+ 0x2227: [604,17,767,64,702], // LOGICAL AND
+ 0x2228: [604,16,767,64,702], // LOGICAL OR
+ 0x2229: [603,16,767,64,702], // stix-intersection, serifs
+ 0x222A: [604,16,767,64,702], // stix-union, serifs
+ 0x222B: [711,211,569,64,632], // INTEGRAL
+ 0x223C: [391,-109,894,64,828], // TILDE OPERATOR
+ 0x2240: [583,82,319,64,254], // WREATH PRODUCT
+ 0x2243: [502,3,894,64,829], // ASYMPTOTICALLY EQUAL TO
+ 0x2245: [638,27,1000,64,829], // APPROXIMATELY EQUAL TO
+ 0x2248: [524,-32,894,64,829], // ALMOST EQUAL TO
+ 0x224D: [533,32,894,64,829], // EQUIVALENT TO
+ 0x2250: [721,-109,894,64,829], // APPROACHES THE LIMIT
+ 0x2260: [711,210,894,64,829], // stix-not (vert) equals
+ 0x2261: [505,3,894,64,829], // IDENTICAL TO
+ 0x2264: [697,199,894,96,797], // LESS-THAN OR EQUAL TO
+ 0x2265: [697,199,894,96,797], // GREATER-THAN OR EQUAL TO
+ 0x226A: [617,116,1150,64,1085], // MUCH LESS-THAN
+ 0x226B: [618,116,1150,64,1085], // MUCH GREATER-THAN
+ 0x227A: [585,86,894,96,797], // PRECEDES
+ 0x227B: [586,86,894,96,797], // SUCCEEDS
+ 0x2282: [587,85,894,96,797], // SUBSET OF
+ 0x2283: [587,86,894,96,796], // SUPERSET OF
+ 0x2286: [697,199,894,96,797], // SUBSET OF OR EQUAL TO
+ 0x2287: [697,199,894,96,796], // SUPERSET OF OR EQUAL TO
+ 0x228E: [604,16,767,64,702], // MULTISET UNION
+ 0x2291: [697,199,894,96,828], // SQUARE IMAGE OF OR EQUAL TO
+ 0x2292: [697,199,894,66,797], // SQUARE ORIGINAL OF OR EQUAL TO
+ 0x2293: [604,-1,767,70,696], // stix-square intersection, serifs
+ 0x2294: [604,-1,767,70,696], // stix-square union, serifs
+ 0x2295: [632,132,894,64,828], // stix-circled plus (with rim)
+ 0x2296: [632,132,894,64,828], // CIRCLED MINUS
+ 0x2297: [632,132,894,64,828], // stix-circled times (with rim)
+ 0x2298: [632,132,894,64,828], // CIRCLED DIVISION SLASH
+ 0x2299: [632,132,894,64,828], // CIRCLED DOT OPERATOR
+ 0x22A2: [693,-1,703,65,637], // RIGHT TACK
+ 0x22A3: [693,-1,703,64,638], // LEFT TACK
+ 0x22A4: [694,-1,894,64,829], // DOWN TACK
+ 0x22A5: [693,-1,894,65,829], // UP TACK
+ 0x22A8: [750,249,974,129,918], // TRUE
+ 0x22C4: [523,21,575,15,560], // DIAMOND OPERATOR
+ 0x22C5: [336,-166,319,74,245], // DOT OPERATOR
+ 0x22C6: [502,0,575,24,550], // STAR OPERATOR
+ 0x22C8: [540,39,1000,33,967], // BOWTIE
+ 0x22EE: [951,29,319,74,245], // VERTICAL ELLIPSIS
+ 0x22EF: [336,-166,1295,74,1221], // MIDLINE HORIZONTAL ELLIPSIS
+ 0x22F1: [871,-101,1323,129,1194], // DOWN RIGHT DIAGONAL ELLIPSIS
+ 0x2308: [750,248,511,194,493], // LEFT CEILING
+ 0x2309: [750,248,511,17,317], // RIGHT CEILING
+ 0x230A: [749,248,511,194,493], // LEFT FLOOR
+ 0x230B: [749,248,511,17,317], // RIGHT FLOOR
+ 0x2322: [405,-108,1150,65,1084], // stix-small down curve
+ 0x2323: [392,-126,1150,64,1085], // stix-small up curve
+ 0x25B3: [711,-1,1022,69,953], // WHITE UP-POINTING TRIANGLE
+ 0x25B9: [540,39,575,33,542], // WHITE RIGHT-POINTING SMALL TRIANGLE
+ 0x25BD: [500,210,1022,68,953], // WHITE DOWN-POINTING TRIANGLE
+ 0x25C3: [539,38,575,33,542], // WHITE LEFT-POINTING SMALL TRIANGLE
+ 0x25EF: [711,211,1150,65,1084], // LARGE CIRCLE
+ 0x2660: [719,129,894,64,829], // BLACK SPADE SUIT
+ 0x2661: [711,24,894,65,828], // WHITE HEART SUIT
+ 0x2662: [719,154,894,64,828], // WHITE DIAMOND SUIT
+ 0x2663: [719,129,894,32,861], // BLACK CLUB SUIT
+ 0x266D: [750,17,447,64,381], // MUSIC FLAT SIGN
+ 0x266E: [741,223,447,57,389], // MUSIC NATURAL SIGN
+ 0x266F: [724,224,447,63,382], // MUSIC SHARP SIGN
+ 0x27E8: [750,249,447,127,382], // MATHEMATICAL LEFT ANGLE BRACKET
+ 0x27E9: [750,249,447,64,319], // MATHEMATICAL RIGHT ANGLE BRACKET
+ 0x27F5: [518,17,1805,64,1741], // LONG LEFTWARDS ARROW
+ 0x27F6: [518,17,1833,96,1773], // LONG RIGHTWARDS ARROW
+ 0x27F7: [518,17,2126,64,2061], // LONG LEFT RIGHT ARROW
+ 0x27F8: [547,46,1868,64,1804], // LONG LEFTWARDS DOUBLE ARROW
+ 0x27F9: [547,46,1870,64,1804], // LONG RIGHTWARDS DOUBLE ARROW
+ 0x27FA: [547,46,2126,64,2060], // LONG LEFT RIGHT DOUBLE ARROW
+ 0x27FC: [518,17,1833,65,1773], // LONG RIGHTWARDS ARROW FROM BAR
+ 0x2A3F: [686,0,900,39,860], // AMALGAMATION OR COPRODUCT
+ 0x2AAF: [696,199,894,96,797], // PRECEDES ABOVE SINGLE-LINE EQUALS SIGN
+ 0x2AB0: [697,199,894,96,797] // SUCCEEDS ABOVE SINGLE-LINE EQUALS SIGN
+});
+
+CHTML.fontLoaded("TeX/"+font.substr(8));
+
+})(MathJax.OutputJax.CommonHTML);
+// @license-end
diff --git a/js/mathjax/jax/output/CommonHTML/fonts/TeX/Math-BoldItalic.js b/js/mathjax/jax/output/CommonHTML/fonts/TeX/Math-BoldItalic.js
new file mode 100644
index 0000000..b6c46d3
--- /dev/null
+++ b/js/mathjax/jax/output/CommonHTML/fonts/TeX/Math-BoldItalic.js
@@ -0,0 +1,210 @@
+// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0
+/*************************************************************
+ *
+ * MathJax/jax/output/HTML-CSS/fonts/TeX/Math/BoldItalic/Main.js
+ *
+ * Copyright (c) 2009-2020 The MathJax Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+(function (CHTML) {
+
+var font = 'MathJax_Math-BoldItalic';
+
+CHTML.FONTDATA.FONTS[font] = {
+ className: CHTML.FONTDATA.familyName(font),
+ centerline: 255, ascent: 725, descent: 216,
+ weight: 'bold',
+ style: 'italic',
+ skew: {
+ 0x41: 0.16,
+ 0x42: 0.0958,
+ 0x43: 0.0958,
+ 0x44: 0.0639,
+ 0x45: 0.0958,
+ 0x46: 0.0958,
+ 0x47: 0.0958,
+ 0x48: 0.0639,
+ 0x49: 0.128,
+ 0x4A: 0.192,
+ 0x4B: 0.0639,
+ 0x4C: 0.0319,
+ 0x4D: 0.0958,
+ 0x4E: 0.0958,
+ 0x4F: 0.0958,
+ 0x50: 0.0958,
+ 0x51: 0.0958,
+ 0x52: 0.0958,
+ 0x53: 0.0958,
+ 0x54: 0.0958,
+ 0x55: 0.0319,
+ 0x58: 0.0958,
+ 0x5A: 0.0958,
+ 0x63: 0.0639,
+ 0x64: 0.192,
+ 0x65: 0.0639,
+ 0x66: 0.192,
+ 0x67: 0.0319,
+ 0x68: -0.0319,
+ 0x6C: 0.0958,
+ 0x6F: 0.0639,
+ 0x70: 0.0958,
+ 0x71: 0.0958,
+ 0x72: 0.0639,
+ 0x73: 0.0639,
+ 0x74: 0.0958,
+ 0x75: 0.0319,
+ 0x76: 0.0319,
+ 0x77: 0.0958,
+ 0x78: 0.0319,
+ 0x79: 0.0639,
+ 0x7A: 0.0639,
+ 0x393: 0.0958,
+ 0x394: 0.192,
+ 0x398: 0.0958,
+ 0x39B: 0.192,
+ 0x39E: 0.0958,
+ 0x3A0: 0.0639,
+ 0x3A3: 0.0958,
+ 0x3A5: 0.0639,
+ 0x3A6: 0.0958,
+ 0x3A8: 0.0639,
+ 0x3A9: 0.0958,
+ 0x3B1: 0.0319,
+ 0x3B2: 0.0958,
+ 0x3B4: 0.0639,
+ 0x3B5: 0.0958,
+ 0x3B6: 0.0958,
+ 0x3B7: 0.0639,
+ 0x3B8: 0.0958,
+ 0x3B9: 0.0639,
+ 0x3BC: 0.0319,
+ 0x3BD: 0.0319,
+ 0x3BE: 0.128,
+ 0x3BF: 0.0639,
+ 0x3C1: 0.0958,
+ 0x3C2: 0.0958,
+ 0x3C4: 0.0319,
+ 0x3C5: 0.0319,
+ 0x3C6: 0.0958,
+ 0x3C7: 0.0639,
+ 0x3C8: 0.128,
+ 0x3D1: 0.0958,
+ 0x3D5: 0.0958,
+ 0x3F1: 0.0958,
+ 0x3F5: 0.0639
+ },
+ 0x20: [0,0,250,0,0], // SPACE
+ 0x2F: [711,210,894,160,733], // SOLIDUS
+ 0x41: [711,0,869,45,839], // LATIN CAPITAL LETTER A
+ 0x42: [686,0,866,43,853], // LATIN CAPITAL LETTER B
+ 0x43: [703,17,817,55,855], // LATIN CAPITAL LETTER C
+ 0x44: [686,0,938,43,914], // LATIN CAPITAL LETTER D
+ 0x45: [680,0,810,43,825], // LATIN CAPITAL LETTER E
+ 0x46: [680,0,689,43,809], // LATIN CAPITAL LETTER F
+ 0x47: [703,16,887,56,854], // LATIN CAPITAL LETTER G
+ 0x48: [686,0,982,43,1027], // LATIN CAPITAL LETTER H
+ 0x49: [686,0,511,30,573], // LATIN CAPITAL LETTER I
+ 0x4A: [686,17,631,42,694], // LATIN CAPITAL LETTER J
+ 0x4B: [686,0,971,43,1003], // LATIN CAPITAL LETTER K
+ 0x4C: [686,0,756,43,711], // LATIN CAPITAL LETTER L
+ 0x4D: [686,0,1142,43,1219], // LATIN CAPITAL LETTER M
+ 0x4E: [686,0,950,43,1027], // LATIN CAPITAL LETTER N
+ 0x4F: [703,17,837,53,815], // LATIN CAPITAL LETTER O
+ 0x50: [686,0,723,43,847], // LATIN CAPITAL LETTER P
+ 0x51: [703,194,869,53,815], // LATIN CAPITAL LETTER Q
+ 0x52: [686,17,872,43,881], // LATIN CAPITAL LETTER R
+ 0x53: [703,17,693,63,714], // LATIN CAPITAL LETTER S
+ 0x54: [675,0,637,22,772], // LATIN CAPITAL LETTER T
+ 0x55: [686,16,800,63,877], // LATIN CAPITAL LETTER U
+ 0x56: [686,16,678,62,886], // LATIN CAPITAL LETTER V
+ 0x57: [686,17,1093,61,1207], // LATIN CAPITAL LETTER W
+ 0x58: [686,0,947,38,953], // LATIN CAPITAL LETTER X
+ 0x59: [686,0,675,40,876], // LATIN CAPITAL LETTER Y
+ 0x5A: [686,0,773,68,805], // LATIN CAPITAL LETTER Z
+ 0x61: [452,8,633,38,607], // LATIN SMALL LETTER A
+ 0x62: [694,8,521,45,513], // LATIN SMALL LETTER B
+ 0x63: [451,8,513,40,509], // LATIN SMALL LETTER C
+ 0x64: [694,8,610,38,612], // LATIN SMALL LETTER D
+ 0x65: [452,8,554,42,509], // LATIN SMALL LETTER E
+ 0x66: [701,201,568,64,624], // LATIN SMALL LETTER F
+ 0x67: [452,202,545,0,540], // LATIN SMALL LETTER G
+ 0x68: [694,8,668,45,642], // LATIN SMALL LETTER H
+ 0x69: [694,8,405,24,367], // LATIN SMALL LETTER I
+ 0x6A: [694,202,471,-12,456], // LATIN SMALL LETTER J
+ 0x6B: [694,8,604,45,578], // LATIN SMALL LETTER K
+ 0x6C: [694,8,348,27,296], // LATIN SMALL LETTER L
+ 0x6D: [452,8,1032,24,1006], // LATIN SMALL LETTER M
+ 0x6E: [452,8,713,24,687], // LATIN SMALL LETTER N
+ 0x6F: [452,8,585,39,576], // LATIN SMALL LETTER O
+ 0x70: [452,194,601,-23,593], // LATIN SMALL LETTER P
+ 0x71: [452,194,542,38,550], // LATIN SMALL LETTER Q
+ 0x72: [452,8,529,24,500], // LATIN SMALL LETTER R
+ 0x73: [451,8,531,57,476], // LATIN SMALL LETTER S
+ 0x74: [643,7,415,21,387], // LATIN SMALL LETTER T
+ 0x75: [452,8,681,24,655], // LATIN SMALL LETTER U
+ 0x76: [453,8,567,24,540], // LATIN SMALL LETTER V
+ 0x77: [453,8,831,24,796], // LATIN SMALL LETTER W
+ 0x78: [452,8,659,43,599], // LATIN SMALL LETTER X
+ 0x79: [452,202,590,24,587], // LATIN SMALL LETTER Y
+ 0x7A: [452,8,555,34,539], // LATIN SMALL LETTER Z
+ 0xA0: [0,0,250,0,0], // NO-BREAK SPACE
+ 0x393: [680,0,657,43,777], // GREEK CAPITAL LETTER GAMMA
+ 0x394: [711,0,958,59,904], // GREEK CAPITAL LETTER DELTA
+ 0x398: [702,17,867,54,844], // GREEK CAPITAL LETTER THETA
+ 0x39B: [711,0,806,44,776], // GREEK CAPITAL LETTER LAMDA
+ 0x39E: [675,0,841,62,867], // GREEK CAPITAL LETTER XI
+ 0x3A0: [680,0,982,43,1026], // GREEK CAPITAL LETTER PI
+ 0x3A3: [686,0,885,69,902], // GREEK CAPITAL LETTER SIGMA
+ 0x3A5: [703,0,671,32,802], // GREEK CAPITAL LETTER UPSILON
+ 0x3A6: [686,0,767,29,737], // GREEK CAPITAL LETTER PHI
+ 0x3A8: [686,0,714,22,790], // GREEK CAPITAL LETTER PSI
+ 0x3A9: [703,0,879,93,886], // GREEK CAPITAL LETTER OMEGA
+ 0x3B1: [452,8,761,39,712], // GREEK SMALL LETTER ALPHA
+ 0x3B2: [701,194,660,28,637], // GREEK SMALL LETTER BETA
+ 0x3B3: [451,211,590,5,617], // GREEK SMALL LETTER GAMMA
+ 0x3B4: [725,8,522,39,513], // GREEK SMALL LETTER DELTA
+ 0x3B5: [461,17,529,36,481], // GREEK SMALL LETTER EPSILON
+ 0x3B6: [711,202,508,48,521], // GREEK SMALL LETTER ZETA
+ 0x3B7: [452,211,600,24,600], // GREEK SMALL LETTER ETA
+ 0x3B8: [702,8,562,40,554], // GREEK SMALL LETTER THETA
+ 0x3B9: [452,8,412,38,386], // GREEK SMALL LETTER IOTA
+ 0x3BA: [452,8,668,45,642], // GREEK SMALL LETTER KAPPA
+ 0x3BB: [694,13,671,40,652], // GREEK SMALL LETTER LAMDA
+ 0x3BC: [452,211,708,33,682], // GREEK SMALL LETTER MU
+ 0x3BD: [452,2,577,38,608], // GREEK SMALL LETTER NU
+ 0x3BE: [711,201,508,23,490], // GREEK SMALL LETTER XI
+ 0x3BF: [452,8,585,39,576], // GREEK SMALL LETTER OMICRON
+ 0x3C0: [444,8,682,23,674], // GREEK SMALL LETTER PI
+ 0x3C1: [451,211,612,34,603], // GREEK SMALL LETTER RHO
+ 0x3C2: [451,105,424,33,457], // GREEK SMALL LETTER FINAL SIGMA
+ 0x3C3: [444,8,686,35,677], // GREEK SMALL LETTER SIGMA
+ 0x3C4: [444,13,521,23,610], // GREEK SMALL LETTER TAU
+ 0x3C5: [453,8,631,24,604], // GREEK SMALL LETTER UPSILON
+ 0x3C6: [452,216,747,53,703], // GREEK SMALL LETTER PHI
+ 0x3C7: [452,201,718,32,685], // GREEK SMALL LETTER CHI
+ 0x3C8: [694,202,758,24,732], // GREEK SMALL LETTER PSI
+ 0x3C9: [453,8,718,24,691], // GREEK SMALL LETTER OMEGA
+ 0x3D1: [701,8,692,24,656], // GREEK THETA SYMBOL
+ 0x3D5: [694,202,712,51,693], // GREEK PHI SYMBOL
+ 0x3D6: [444,8,975,23,961], // GREEK PI SYMBOL
+ 0x3F1: [451,194,612,75,603], // GREEK RHO SYMBOL
+ 0x3F5: [444,7,483,44,450] // GREEK LUNATE EPSILON SYMBOL
+};
+
+CHTML.fontLoaded("TeX/"+font.substr(8));
+
+})(MathJax.OutputJax.CommonHTML);
+// @license-end
diff --git a/js/mathjax/jax/output/CommonHTML/fonts/TeX/SansSerif-Bold.js b/js/mathjax/jax/output/CommonHTML/fonts/TeX/SansSerif-Bold.js
new file mode 100644
index 0000000..42553d0
--- /dev/null
+++ b/js/mathjax/jax/output/CommonHTML/fonts/TeX/SansSerif-Bold.js
@@ -0,0 +1,154 @@
+// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0
+/*************************************************************
+ *
+ * MathJax/jax/output/CommonHTML/fonts/TeX/SansSerif-Bold.js
+ *
+ * Copyright (c) 2015-2020 The MathJax Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+(function (CHTML) {
+
+var font = 'MathJax_SansSerif-Bold';
+
+CHTML.FONTDATA.FONTS[font] = {
+ className: CHTML.FONTDATA.familyName(font),
+ centerline: 250, ascent: 750, descent: 250,
+ weight: 'bold',
+ 0x20: [0,0,250,0,0], // SPACE
+ 0x21: [694,0,367,110,256], // EXCLAMATION MARK
+ 0x22: [694,-442,558,37,420], // QUOTATION MARK
+ 0x23: [694,193,917,61,855], // NUMBER SIGN
+ 0x24: [750,56,550,49,488], // DOLLAR SIGN
+ 0x25: [750,56,1029,61,966], // PERCENT SIGN
+ 0x26: [716,22,831,47,769], // AMPERSAND
+ 0x27: [694,-442,306,80,226], // APOSTROPHE
+ 0x28: [750,249,428,79,366], // LEFT PARENTHESIS
+ 0x29: [750,250,428,61,348], // RIGHT PARENTHESIS
+ 0x2A: [750,-293,550,67,482], // ASTERISK
+ 0x2B: [617,116,856,61,794], // PLUS SIGN
+ 0x2C: [146,106,306,80,226], // COMMA
+ 0x2D: [273,-186,367,12,305], // HYPHEN-MINUS
+ 0x2E: [146,0,306,80,226], // FULL STOP
+ 0x2F: [750,249,550,61,488], // SOLIDUS
+ 0x30: [715,22,550,43,506], // DIGIT ZERO
+ 0x31: [716,-1,550,76,473], // DIGIT ONE
+ 0x32: [716,0,550,46,495], // DIGIT TWO
+ 0x33: [716,22,550,46,503], // DIGIT THREE
+ 0x34: [694,0,550,31,518], // DIGIT FOUR
+ 0x35: [694,22,550,37,494], // DIGIT FIVE
+ 0x36: [716,22,550,46,503], // DIGIT SIX
+ 0x37: [695,11,550,46,503], // DIGIT SEVEN
+ 0x38: [715,22,550,46,503], // DIGIT EIGHT
+ 0x39: [716,22,550,46,503], // DIGIT NINE
+ 0x3A: [458,0,306,80,226], // COLON
+ 0x3B: [458,106,306,80,226], // SEMICOLON
+ 0x3D: [407,-94,856,61,794], // EQUALS SIGN
+ 0x3F: [705,0,519,61,457], // QUESTION MARK
+ 0x40: [704,11,733,61,671], // COMMERCIAL AT
+ 0x41: [694,0,733,42,690], // LATIN CAPITAL LETTER A
+ 0x42: [694,-1,733,92,671], // LATIN CAPITAL LETTER B
+ 0x43: [704,11,703,61,647], // LATIN CAPITAL LETTER C
+ 0x44: [694,-1,794,92,732], // LATIN CAPITAL LETTER D
+ 0x45: [691,0,642,92,595], // LATIN CAPITAL LETTER E
+ 0x46: [691,0,611,92,564], // LATIN CAPITAL LETTER F
+ 0x47: [705,11,733,61,659], // LATIN CAPITAL LETTER G
+ 0x48: [694,0,794,92,702], // LATIN CAPITAL LETTER H
+ 0x49: [694,0,331,85,246], // LATIN CAPITAL LETTER I
+ 0x4A: [694,22,519,46,427], // LATIN CAPITAL LETTER J
+ 0x4B: [694,0,764,92,701], // LATIN CAPITAL LETTER K
+ 0x4C: [694,0,581,92,534], // LATIN CAPITAL LETTER L
+ 0x4D: [694,0,978,92,886], // LATIN CAPITAL LETTER M
+ 0x4E: [694,0,794,92,702], // LATIN CAPITAL LETTER N
+ 0x4F: [716,22,794,62,731], // LATIN CAPITAL LETTER O
+ 0x50: [694,0,703,92,641], // LATIN CAPITAL LETTER P
+ 0x51: [716,106,794,62,732], // LATIN CAPITAL LETTER Q
+ 0x52: [694,0,703,92,654], // LATIN CAPITAL LETTER R
+ 0x53: [716,22,611,49,549], // LATIN CAPITAL LETTER S
+ 0x54: [688,0,733,40,692], // LATIN CAPITAL LETTER T
+ 0x55: [694,22,764,92,672], // LATIN CAPITAL LETTER U
+ 0x56: [694,-1,733,27,705], // LATIN CAPITAL LETTER V
+ 0x57: [694,0,1039,24,1014], // LATIN CAPITAL LETTER W
+ 0x58: [694,0,733,37,694], // LATIN CAPITAL LETTER X
+ 0x59: [694,0,733,24,708], // LATIN CAPITAL LETTER Y
+ 0x5A: [694,0,672,61,616], // LATIN CAPITAL LETTER Z
+ 0x5B: [750,250,343,79,318], // LEFT SQUARE BRACKET
+ 0x5D: [750,250,343,24,263], // RIGHT SQUARE BRACKET
+ 0x5E: [694,-537,550,108,441], // CIRCUMFLEX ACCENT
+ 0x5F: [-23,110,550,0,549], // LOW LINE
+ 0x61: [475,11,525,31,472], // LATIN SMALL LETTER A
+ 0x62: [694,10,561,54,523], // LATIN SMALL LETTER B
+ 0x63: [475,11,489,37,457], // LATIN SMALL LETTER C
+ 0x64: [694,11,561,37,507], // LATIN SMALL LETTER D
+ 0x65: [474,10,511,30,480], // LATIN SMALL LETTER E
+ 0x66: [705,0,336,29,381], // LATIN SMALL LETTER F
+ 0x67: [469,206,550,17,534], // LATIN SMALL LETTER G
+ 0x68: [694,0,561,53,508], // LATIN SMALL LETTER H
+ 0x69: [695,0,256,46,208], // LATIN SMALL LETTER I
+ 0x6A: [695,205,286,-71,232], // LATIN SMALL LETTER J
+ 0x6B: [694,0,531,63,496], // LATIN SMALL LETTER K
+ 0x6C: [694,0,256,54,201], // LATIN SMALL LETTER L
+ 0x6D: [469,0,867,53,815], // LATIN SMALL LETTER M
+ 0x6E: [468,0,561,53,508], // LATIN SMALL LETTER N
+ 0x6F: [474,11,550,32,518], // LATIN SMALL LETTER O
+ 0x70: [469,194,561,54,523], // LATIN SMALL LETTER P
+ 0x71: [469,194,561,37,507], // LATIN SMALL LETTER Q
+ 0x72: [469,0,372,54,356], // LATIN SMALL LETTER R
+ 0x73: [474,10,422,30,396], // LATIN SMALL LETTER S
+ 0x74: [589,10,404,20,373], // LATIN SMALL LETTER T
+ 0x75: [458,11,561,52,508], // LATIN SMALL LETTER U
+ 0x76: [458,0,500,26,473], // LATIN SMALL LETTER V
+ 0x77: [458,0,744,24,719], // LATIN SMALL LETTER W
+ 0x78: [458,0,500,24,475], // LATIN SMALL LETTER X
+ 0x79: [458,205,500,29,473], // LATIN SMALL LETTER Y
+ 0x7A: [458,0,476,31,442], // LATIN SMALL LETTER Z
+ 0x7E: [344,-198,550,92,457], // TILDE
+ 0xA0: [0,0,250,0,0], // NO-BREAK SPACE
+ 0x131: [458,0,256,54,201], // LATIN SMALL LETTER DOTLESS I
+ 0x237: [458,205,286,-71,232], // LATIN SMALL LETTER DOTLESS J
+ 0x300: [694,-537,0,-458,-218], // COMBINING GRAVE ACCENT
+ 0x301: [694,-537,0,-334,-93], // COMBINING ACUTE ACCENT
+ 0x302: [694,-537,0,-442,-109], // COMBINING CIRCUMFLEX ACCENT
+ 0x303: [694,-548,0,-458,-93], // COMBINING TILDE
+ 0x304: [660,-560,0,-474,-77], // COMBINING MACRON
+ 0x306: [694,-552,0,-470,-80], // COMBINING BREVE
+ 0x307: [695,-596,0,-356,-194], // COMBINING DOT ABOVE
+ 0x308: [695,-595,0,-459,-91], // COMBINING DIAERESIS
+ 0x30A: [694,-538,0,-365,-119], // COMBINING RING ABOVE
+ 0x30B: [694,-537,0,-440,-94], // COMBINING DOUBLE ACUTE ACCENT
+ 0x30C: [657,-500,0,-442,-109], // COMBINING CARON
+ 0x393: [691,0,581,92,534], // GREEK CAPITAL LETTER GAMMA
+ 0x394: [694,0,917,60,856], // GREEK CAPITAL LETTER DELTA
+ 0x398: [716,22,856,62,793], // GREEK CAPITAL LETTER THETA
+ 0x39B: [694,0,672,41,630], // GREEK CAPITAL LETTER LAMDA
+ 0x39E: [688,0,733,46,686], // GREEK CAPITAL LETTER XI
+ 0x3A0: [691,0,794,92,702], // GREEK CAPITAL LETTER PI
+ 0x3A3: [694,0,794,61,732], // GREEK CAPITAL LETTER SIGMA
+ 0x3A5: [715,0,856,62,793], // GREEK CAPITAL LETTER UPSILON
+ 0x3A6: [694,0,794,62,732], // GREEK CAPITAL LETTER PHI
+ 0x3A8: [694,0,856,61,794], // GREEK CAPITAL LETTER PSI
+ 0x3A9: [716,0,794,49,744], // GREEK CAPITAL LETTER OMEGA
+ 0x2013: [327,-240,550,0,549], // EN DASH
+ 0x2014: [327,-240,1100,0,1099], // EM DASH
+ 0x2018: [694,-443,306,81,226], // LEFT SINGLE QUOTATION MARK
+ 0x2019: [694,-442,306,80,226], // RIGHT SINGLE QUOTATION MARK
+ 0x201C: [694,-443,558,138,520], // LEFT DOUBLE QUOTATION MARK
+ 0x201D: [694,-442,558,37,420] // RIGHT DOUBLE QUOTATION MARK
+};
+
+CHTML.fontLoaded("TeX/"+font.substr(8));
+
+})(MathJax.OutputJax.CommonHTML);
+// @license-end
diff --git a/js/mathjax/jax/output/CommonHTML/fonts/TeX/SansSerif-Italic.js b/js/mathjax/jax/output/CommonHTML/fonts/TeX/SansSerif-Italic.js
new file mode 100644
index 0000000..bf70f15
--- /dev/null
+++ b/js/mathjax/jax/output/CommonHTML/fonts/TeX/SansSerif-Italic.js
@@ -0,0 +1,154 @@
+// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0
+/*************************************************************
+ *
+ * MathJax/jax/output/CommonHTML/fonts/TeX/SansSerif-Italic.js
+ *
+ * Copyright (c) 2015-2020 The MathJax Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+(function (CHTML) {
+
+var font = 'MathJax_SansSerif-Italic';
+
+CHTML.FONTDATA.FONTS[font] = {
+ className: CHTML.FONTDATA.familyName(font),
+ centerline: 250, ascent: 750, descent: 250,
+ style: 'italic',
+ 0x20: [0,0,250,0,0], // SPACE
+ 0x21: [694,0,319,110,355], // EXCLAMATION MARK
+ 0x22: [694,-471,500,133,472], // QUOTATION MARK
+ 0x23: [694,194,833,87,851], // NUMBER SIGN
+ 0x24: [750,56,500,56,565], // DOLLAR SIGN
+ 0x25: [750,56,833,165,815], // PERCENT SIGN
+ 0x26: [716,22,758,71,747], // AMPERSAND
+ 0x27: [694,-471,278,190,335], // APOSTROPHE
+ 0x28: [750,250,389,104,491], // LEFT PARENTHESIS
+ 0x29: [750,250,389,2,390], // RIGHT PARENTHESIS
+ 0x2A: [750,-306,500,156,568], // ASTERISK
+ 0x2B: [583,83,778,108,775], // PLUS SIGN
+ 0x2C: [98,125,278,63,209], // COMMA
+ 0x2D: [259,-186,333,51,332], // HYPHEN-MINUS
+ 0x2E: [98,0,278,90,209], // FULL STOP
+ 0x2F: [750,250,500,6,600], // SOLIDUS
+ 0x30: [678,22,500,88,549], // DIGIT ZERO
+ 0x31: [678,0,500,88,451], // DIGIT ONE
+ 0x32: [678,0,500,50,551], // DIGIT TWO
+ 0x33: [678,22,500,56,544], // DIGIT THREE
+ 0x34: [656,0,500,62,521], // DIGIT FOUR
+ 0x35: [656,22,500,50,555], // DIGIT FIVE
+ 0x36: [678,22,500,94,548], // DIGIT SIX
+ 0x37: [656,11,500,143,596], // DIGIT SEVEN
+ 0x38: [678,22,500,77,554], // DIGIT EIGHT
+ 0x39: [677,22,500,77,545], // DIGIT NINE
+ 0x3A: [444,0,278,90,282], // COLON
+ 0x3B: [444,125,278,63,282], // SEMICOLON
+ 0x3D: [370,-130,778,88,796], // EQUALS SIGN
+ 0x3F: [704,0,472,173,536], // QUESTION MARK
+ 0x40: [705,10,667,120,707], // COMMERCIAL AT
+ 0x41: [694,0,667,28,638], // LATIN CAPITAL LETTER A
+ 0x42: [694,0,667,90,696], // LATIN CAPITAL LETTER B
+ 0x43: [705,10,639,124,719], // LATIN CAPITAL LETTER C
+ 0x44: [694,0,722,88,747], // LATIN CAPITAL LETTER D
+ 0x45: [691,0,597,86,688], // LATIN CAPITAL LETTER E
+ 0x46: [691,0,569,86,673], // LATIN CAPITAL LETTER F
+ 0x47: [705,11,667,125,730], // LATIN CAPITAL LETTER G
+ 0x48: [694,0,708,86,768], // LATIN CAPITAL LETTER H
+ 0x49: [694,0,278,87,338], // LATIN CAPITAL LETTER I
+ 0x4A: [694,22,472,46,535], // LATIN CAPITAL LETTER J
+ 0x4B: [694,0,694,88,785], // LATIN CAPITAL LETTER K
+ 0x4C: [694,0,542,87,516], // LATIN CAPITAL LETTER L
+ 0x4D: [694,0,875,92,929], // LATIN CAPITAL LETTER M
+ 0x4E: [694,0,708,88,766], // LATIN CAPITAL LETTER N
+ 0x4F: [716,22,736,118,763], // LATIN CAPITAL LETTER O
+ 0x50: [694,0,639,88,690], // LATIN CAPITAL LETTER P
+ 0x51: [716,125,736,118,763], // LATIN CAPITAL LETTER Q
+ 0x52: [694,0,646,88,698], // LATIN CAPITAL LETTER R
+ 0x53: [716,22,556,54,609], // LATIN CAPITAL LETTER S
+ 0x54: [688,0,681,165,790], // LATIN CAPITAL LETTER T
+ 0x55: [694,22,688,131,747], // LATIN CAPITAL LETTER U
+ 0x56: [694,0,667,161,799], // LATIN CAPITAL LETTER V
+ 0x57: [694,0,944,161,1076], // LATIN CAPITAL LETTER W
+ 0x58: [694,0,667,14,758], // LATIN CAPITAL LETTER X
+ 0x59: [694,0,667,151,810], // LATIN CAPITAL LETTER Y
+ 0x5A: [694,0,611,55,702], // LATIN CAPITAL LETTER Z
+ 0x5B: [750,250,289,41,425], // LEFT SQUARE BRACKET
+ 0x5D: [750,250,289,-31,353], // RIGHT SQUARE BRACKET
+ 0x5E: [694,-527,500,190,533], // CIRCUMFLEX ACCENT
+ 0x5F: [-38,114,500,50,565], // LOW LINE
+ 0x61: [461,10,481,61,473], // LATIN SMALL LETTER A
+ 0x62: [694,11,517,75,539], // LATIN SMALL LETTER B
+ 0x63: [460,11,444,75,499], // LATIN SMALL LETTER C
+ 0x64: [694,10,517,73,588], // LATIN SMALL LETTER D
+ 0x65: [460,11,444,71,472], // LATIN SMALL LETTER E
+ 0x66: [705,0,306,94,494], // LATIN SMALL LETTER F
+ 0x67: [455,206,500,12,568], // LATIN SMALL LETTER G
+ 0x68: [694,0,517,73,513], // LATIN SMALL LETTER H
+ 0x69: [680,0,239,74,315], // LATIN SMALL LETTER I
+ 0x6A: [680,204,267,-96,336], // LATIN SMALL LETTER J
+ 0x6B: [694,0,489,76,543], // LATIN SMALL LETTER K
+ 0x6C: [694,0,239,74,311], // LATIN SMALL LETTER L
+ 0x6D: [455,0,794,73,790], // LATIN SMALL LETTER M
+ 0x6E: [454,0,517,73,513], // LATIN SMALL LETTER N
+ 0x6F: [461,11,500,69,523], // LATIN SMALL LETTER O
+ 0x70: [455,194,517,34,538], // LATIN SMALL LETTER P
+ 0x71: [455,194,517,72,538], // LATIN SMALL LETTER Q
+ 0x72: [455,0,342,74,424], // LATIN SMALL LETTER R
+ 0x73: [461,11,383,35,436], // LATIN SMALL LETTER S
+ 0x74: [571,11,361,97,410], // LATIN SMALL LETTER T
+ 0x75: [444,10,517,90,537], // LATIN SMALL LETTER U
+ 0x76: [444,0,461,108,540], // LATIN SMALL LETTER V
+ 0x77: [444,0,683,108,762], // LATIN SMALL LETTER W
+ 0x78: [444,0,461,1,537], // LATIN SMALL LETTER X
+ 0x79: [444,205,461,1,540], // LATIN SMALL LETTER Y
+ 0x7A: [444,0,435,28,494], // LATIN SMALL LETTER Z
+ 0x7E: [327,-193,500,199,560], // TILDE
+ 0xA0: [0,0,250,0,0], // NO-BREAK SPACE
+ 0x131: [444,0,239,74,258], // LATIN SMALL LETTER DOTLESS I
+ 0x237: [444,204,267,-96,286], // LATIN SMALL LETTER DOTLESS J
+ 0x300: [694,-527,0,-270,-87], // COMBINING GRAVE ACCENT
+ 0x301: [694,-527,0,-190,63], // COMBINING ACUTE ACCENT
+ 0x302: [694,-527,0,-310,33], // COMBINING CIRCUMFLEX ACCENT
+ 0x303: [677,-543,0,-301,60], // COMBINING TILDE
+ 0x304: [631,-552,0,-314,64], // COMBINING MACRON
+ 0x306: [694,-508,0,-284,73], // COMBINING BREVE
+ 0x307: [680,-576,0,-180,-54], // COMBINING DOT ABOVE
+ 0x308: [680,-582,0,-273,40], // COMBINING DIAERESIS
+ 0x30A: [693,-527,0,-227,-2], // COMBINING RING ABOVE
+ 0x30B: [694,-527,0,-287,63], // COMBINING DOUBLE ACUTE ACCENT
+ 0x30C: [654,-487,0,-283,60], // COMBINING CARON
+ 0x393: [691,0,542,87,646], // GREEK CAPITAL LETTER GAMMA
+ 0x394: [694,0,833,42,790], // GREEK CAPITAL LETTER DELTA
+ 0x398: [715,22,778,119,804], // GREEK CAPITAL LETTER THETA
+ 0x39B: [694,0,611,28,582], // GREEK CAPITAL LETTER LAMDA
+ 0x39E: [688,0,667,42,765], // GREEK CAPITAL LETTER XI
+ 0x3A0: [691,0,708,86,768], // GREEK CAPITAL LETTER PI
+ 0x3A3: [694,0,722,55,813], // GREEK CAPITAL LETTER SIGMA
+ 0x3A5: [716,0,778,173,843], // GREEK CAPITAL LETTER UPSILON
+ 0x3A6: [694,0,722,124,743], // GREEK CAPITAL LETTER PHI
+ 0x3A8: [694,0,778,171,854], // GREEK CAPITAL LETTER PSI
+ 0x3A9: [716,0,722,44,769], // GREEK CAPITAL LETTER OMEGA
+ 0x2013: [312,-236,500,50,565], // EN DASH
+ 0x2014: [312,-236,1000,50,1065], // EM DASH
+ 0x2018: [694,-471,278,190,336], // LEFT SINGLE QUOTATION MARK
+ 0x2019: [694,-471,278,190,335], // RIGHT SINGLE QUOTATION MARK
+ 0x201C: [694,-471,500,274,614], // LEFT DOUBLE QUOTATION MARK
+ 0x201D: [694,-471,500,133,472] // RIGHT DOUBLE QUOTATION MARK
+};
+
+CHTML.fontLoaded("TeX/"+font.substr(8));
+
+})(MathJax.OutputJax.CommonHTML);
+// @license-end
diff --git a/js/mathjax/jax/output/CommonHTML/fonts/TeX/SansSerif-Regular.js b/js/mathjax/jax/output/CommonHTML/fonts/TeX/SansSerif-Regular.js
new file mode 100644
index 0000000..a49d5ad
--- /dev/null
+++ b/js/mathjax/jax/output/CommonHTML/fonts/TeX/SansSerif-Regular.js
@@ -0,0 +1,154 @@
+// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0
+/*************************************************************
+ *
+ * MathJax/jax/output/CommonHTML/fonts/TeX/SansSerif-Regular.js
+ *
+ * Copyright (c) 2015-2020 The MathJax Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+(function (CHTML) {
+
+var font = 'MathJax_SansSerif';
+
+CHTML.FONTDATA.FONTS[font] = {
+ className: CHTML.FONTDATA.familyName(font),
+ centerline: 250, ascent: 750, descent: 250,
+
+ 0x20: [0,0,250,0,0], // SPACE
+ 0x21: [694,0,319,110,208], // EXCLAMATION MARK
+ 0x22: [694,-471,500,32,325], // QUOTATION MARK
+ 0x23: [694,194,833,56,777], // NUMBER SIGN
+ 0x24: [750,56,500,44,444], // DOLLAR SIGN
+ 0x25: [750,56,833,56,776], // PERCENT SIGN
+ 0x26: [716,22,758,42,702], // AMPERSAND
+ 0x27: [694,-471,278,89,188], // APOSTROPHE
+ 0x28: [750,250,389,74,333], // LEFT PARENTHESIS
+ 0x29: [750,250,389,55,314], // RIGHT PARENTHESIS
+ 0x2A: [750,-306,500,63,436], // ASTERISK
+ 0x2B: [583,82,778,56,722], // PLUS SIGN
+ 0x2C: [98,125,278,89,188], // COMMA
+ 0x2D: [259,-186,333,11,277], // HYPHEN-MINUS
+ 0x2E: [98,0,278,90,188], // FULL STOP
+ 0x2F: [750,250,500,56,445], // SOLIDUS
+ 0x30: [678,22,500,39,460], // DIGIT ZERO
+ 0x31: [678,0,500,83,430], // DIGIT ONE
+ 0x32: [677,0,500,42,449], // DIGIT TWO
+ 0x33: [678,22,500,42,457], // DIGIT THREE
+ 0x34: [656,0,500,28,471], // DIGIT FOUR
+ 0x35: [656,21,500,33,449], // DIGIT FIVE
+ 0x36: [677,22,500,42,457], // DIGIT SIX
+ 0x37: [656,11,500,42,457], // DIGIT SEVEN
+ 0x38: [678,22,500,43,456], // DIGIT EIGHT
+ 0x39: [677,22,500,42,457], // DIGIT NINE
+ 0x3A: [444,0,278,90,188], // COLON
+ 0x3B: [444,125,278,89,188], // SEMICOLON
+ 0x3D: [370,-130,778,56,722], // EQUALS SIGN
+ 0x3F: [704,0,472,55,416], // QUESTION MARK
+ 0x40: [704,11,667,56,612], // COMMERCIAL AT
+ 0x41: [694,0,667,28,638], // LATIN CAPITAL LETTER A
+ 0x42: [694,0,667,90,610], // LATIN CAPITAL LETTER B
+ 0x43: [705,11,639,59,587], // LATIN CAPITAL LETTER C
+ 0x44: [694,0,722,88,666], // LATIN CAPITAL LETTER D
+ 0x45: [691,0,597,86,554], // LATIN CAPITAL LETTER E
+ 0x46: [691,0,569,86,526], // LATIN CAPITAL LETTER F
+ 0x47: [704,11,667,59,599], // LATIN CAPITAL LETTER G
+ 0x48: [694,0,708,86,621], // LATIN CAPITAL LETTER H
+ 0x49: [694,0,278,87,191], // LATIN CAPITAL LETTER I
+ 0x4A: [694,22,472,42,388], // LATIN CAPITAL LETTER J
+ 0x4B: [694,0,694,88,651], // LATIN CAPITAL LETTER K
+ 0x4C: [694,0,542,87,499], // LATIN CAPITAL LETTER L
+ 0x4D: [694,0,875,92,782], // LATIN CAPITAL LETTER M
+ 0x4E: [694,0,708,88,619], // LATIN CAPITAL LETTER N
+ 0x4F: [715,22,736,55,680], // LATIN CAPITAL LETTER O
+ 0x50: [694,0,639,88,583], // LATIN CAPITAL LETTER P
+ 0x51: [715,125,736,55,680], // LATIN CAPITAL LETTER Q
+ 0x52: [694,0,646,88,617], // LATIN CAPITAL LETTER R
+ 0x53: [716,22,556,44,500], // LATIN CAPITAL LETTER S
+ 0x54: [688,0,681,36,644], // LATIN CAPITAL LETTER T
+ 0x55: [694,22,688,87,600], // LATIN CAPITAL LETTER U
+ 0x56: [694,0,667,14,652], // LATIN CAPITAL LETTER V
+ 0x57: [694,0,944,14,929], // LATIN CAPITAL LETTER W
+ 0x58: [694,0,667,14,652], // LATIN CAPITAL LETTER X
+ 0x59: [694,0,667,3,663], // LATIN CAPITAL LETTER Y
+ 0x5A: [694,0,611,55,560], // LATIN CAPITAL LETTER Z
+ 0x5B: [750,250,289,94,266], // LEFT SQUARE BRACKET
+ 0x5D: [750,250,289,22,194], // RIGHT SQUARE BRACKET
+ 0x5E: [694,-527,500,78,421], // CIRCUMFLEX ACCENT
+ 0x5F: [-38,114,500,0,499], // LOW LINE
+ 0x61: [460,10,481,38,407], // LATIN SMALL LETTER A
+ 0x62: [694,11,517,75,482], // LATIN SMALL LETTER B
+ 0x63: [460,10,444,34,415], // LATIN SMALL LETTER C
+ 0x64: [694,10,517,33,441], // LATIN SMALL LETTER D
+ 0x65: [461,10,444,28,415], // LATIN SMALL LETTER E
+ 0x66: [705,0,306,27,347], // LATIN SMALL LETTER F
+ 0x67: [455,206,500,28,485], // LATIN SMALL LETTER G
+ 0x68: [694,0,517,73,443], // LATIN SMALL LETTER H
+ 0x69: [680,0,239,67,171], // LATIN SMALL LETTER I
+ 0x6A: [680,205,267,-59,192], // LATIN SMALL LETTER J
+ 0x6B: [694,0,489,76,471], // LATIN SMALL LETTER K
+ 0x6C: [694,0,239,74,164], // LATIN SMALL LETTER L
+ 0x6D: [455,0,794,73,720], // LATIN SMALL LETTER M
+ 0x6E: [455,0,517,73,443], // LATIN SMALL LETTER N
+ 0x6F: [460,10,500,28,471], // LATIN SMALL LETTER O
+ 0x70: [455,194,517,75,483], // LATIN SMALL LETTER P
+ 0x71: [455,194,517,33,441], // LATIN SMALL LETTER Q
+ 0x72: [455,0,342,74,327], // LATIN SMALL LETTER R
+ 0x73: [460,10,383,28,360], // LATIN SMALL LETTER S
+ 0x74: [571,10,361,18,333], // LATIN SMALL LETTER T
+ 0x75: [444,10,517,73,443], // LATIN SMALL LETTER U
+ 0x76: [444,0,461,14,446], // LATIN SMALL LETTER V
+ 0x77: [444,0,683,14,668], // LATIN SMALL LETTER W
+ 0x78: [444,0,461,0,460], // LATIN SMALL LETTER X
+ 0x79: [444,204,461,14,446], // LATIN SMALL LETTER Y
+ 0x7A: [444,0,435,28,402], // LATIN SMALL LETTER Z
+ 0x7E: [327,-193,500,83,416], // TILDE
+ 0xA0: [0,0,250,0,0], // NO-BREAK SPACE
+ 0x131: [444,0,239,74,164], // LATIN SMALL LETTER DOTLESS I
+ 0x237: [444,205,267,-59,192], // LATIN SMALL LETTER DOTLESS J
+ 0x300: [694,-527,0,-417,-199], // COMBINING GRAVE ACCENT
+ 0x301: [694,-527,0,-302,-84], // COMBINING ACUTE ACCENT
+ 0x302: [694,-527,0,-422,-79], // COMBINING CIRCUMFLEX ACCENT
+ 0x303: [677,-543,0,-417,-84], // COMBINING TILDE
+ 0x304: [631,-552,0,-431,-70], // COMBINING MACRON
+ 0x306: [694,-508,0,-427,-74], // COMBINING BREVE
+ 0x307: [680,-576,0,-302,-198], // COMBINING DOT ABOVE
+ 0x308: [680,-582,0,-397,-104], // COMBINING DIAERESIS
+ 0x30A: [694,-527,0,-319,-99], // COMBINING RING ABOVE
+ 0x30B: [694,-527,0,-399,-84], // COMBINING DOUBLE ACUTE ACCENT
+ 0x30C: [654,-487,0,-422,-79], // COMBINING CARON
+ 0x393: [691,0,542,87,499], // GREEK CAPITAL LETTER GAMMA
+ 0x394: [694,0,833,42,790], // GREEK CAPITAL LETTER DELTA
+ 0x398: [716,21,778,56,722], // GREEK CAPITAL LETTER THETA
+ 0x39B: [694,0,611,28,582], // GREEK CAPITAL LETTER LAMDA
+ 0x39E: [688,0,667,42,624], // GREEK CAPITAL LETTER XI
+ 0x3A0: [691,0,708,86,621], // GREEK CAPITAL LETTER PI
+ 0x3A3: [694,0,722,55,666], // GREEK CAPITAL LETTER SIGMA
+ 0x3A5: [716,0,778,55,722], // GREEK CAPITAL LETTER UPSILON
+ 0x3A6: [694,0,722,55,666], // GREEK CAPITAL LETTER PHI
+ 0x3A8: [694,0,778,55,722], // GREEK CAPITAL LETTER PSI
+ 0x3A9: [716,0,722,44,677], // GREEK CAPITAL LETTER OMEGA
+ 0x2013: [312,-236,500,0,499], // EN DASH
+ 0x2014: [312,-236,1000,0,999], // EM DASH
+ 0x2018: [694,-471,278,90,189], // LEFT SINGLE QUOTATION MARK
+ 0x2019: [694,-471,278,89,188], // RIGHT SINGLE QUOTATION MARK
+ 0x201C: [694,-471,500,174,467], // LEFT DOUBLE QUOTATION MARK
+ 0x201D: [694,-471,500,32,325] // RIGHT DOUBLE QUOTATION MARK
+};
+
+CHTML.fontLoaded("TeX/"+font.substr(8));
+
+})(MathJax.OutputJax.CommonHTML);
+// @license-end
diff --git a/js/mathjax/jax/output/CommonHTML/fonts/TeX/Script-Regular.js b/js/mathjax/jax/output/CommonHTML/fonts/TeX/Script-Regular.js
new file mode 100644
index 0000000..95ef8d1
--- /dev/null
+++ b/js/mathjax/jax/output/CommonHTML/fonts/TeX/Script-Regular.js
@@ -0,0 +1,90 @@
+// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0
+/*************************************************************
+ *
+ * MathJax/jax/output/CommonHTML/fonts/TeX/Script-Regular.js
+ *
+ * Copyright (c) 2015-2020 The MathJax Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+(function (CHTML) {
+
+var font = 'MathJax_Script';
+
+CHTML.FONTDATA.FONTS[font] = {
+ className: CHTML.FONTDATA.familyName(font),
+ centerline: 211, ascent: 735, descent: 314,
+ skew: {
+ 0x41: 0.389,
+ 0x42: 0.194,
+ 0x43: 0.278,
+ 0x44: 0.111,
+ 0x45: 0.139,
+ 0x46: 0.222,
+ 0x47: 0.25,
+ 0x48: 0.333,
+ 0x49: 0.333,
+ 0x4A: 0.417,
+ 0x4B: 0.361,
+ 0x4C: 0.306,
+ 0x4D: 0.444,
+ 0x4E: 0.389,
+ 0x4F: 0.167,
+ 0x50: 0.222,
+ 0x51: 0.278,
+ 0x52: 0.194,
+ 0x53: 0.333,
+ 0x54: 0.222,
+ 0x55: 0.25,
+ 0x56: 0.222,
+ 0x57: 0.25,
+ 0x58: 0.278,
+ 0x59: 0.194,
+ 0x5A: 0.306
+ },
+ 0x20: [0,0,250,0,0], // SPACE
+ 0x41: [717,8,803,35,1016], // LATIN CAPITAL LETTER A
+ 0x42: [708,28,908,31,928], // LATIN CAPITAL LETTER B
+ 0x43: [728,26,666,26,819], // LATIN CAPITAL LETTER C
+ 0x44: [708,31,774,68,855], // LATIN CAPITAL LETTER D
+ 0x45: [707,8,562,46,718], // LATIN CAPITAL LETTER E
+ 0x46: [735,36,895,39,990], // LATIN CAPITAL LETTER F
+ 0x47: [717,37,610,12,738], // LATIN CAPITAL LETTER G
+ 0x48: [717,36,969,29,1241], // LATIN CAPITAL LETTER H
+ 0x49: [717,17,809,59,946], // LATIN CAPITAL LETTER I
+ 0x4A: [717,314,1052,92,1133], // LATIN CAPITAL LETTER J
+ 0x4B: [717,37,914,29,1204], // LATIN CAPITAL LETTER K
+ 0x4C: [717,17,874,14,1035], // LATIN CAPITAL LETTER L
+ 0x4D: [721,50,1080,30,1216], // LATIN CAPITAL LETTER M
+ 0x4E: [726,36,902,29,1208], // LATIN CAPITAL LETTER N
+ 0x4F: [707,8,738,96,805], // LATIN CAPITAL LETTER O
+ 0x50: [716,37,1013,90,1031], // LATIN CAPITAL LETTER P
+ 0x51: [717,17,883,54,885], // LATIN CAPITAL LETTER Q
+ 0x52: [717,17,850,-2,887], // LATIN CAPITAL LETTER R
+ 0x53: [708,36,868,29,1016], // LATIN CAPITAL LETTER S
+ 0x54: [735,37,747,92,996], // LATIN CAPITAL LETTER T
+ 0x55: [717,17,800,55,960], // LATIN CAPITAL LETTER U
+ 0x56: [717,17,622,56,850], // LATIN CAPITAL LETTER V
+ 0x57: [717,17,805,46,1026], // LATIN CAPITAL LETTER W
+ 0x58: [717,17,944,103,1131], // LATIN CAPITAL LETTER X
+ 0x59: [716,17,710,57,959], // LATIN CAPITAL LETTER Y
+ 0x5A: [717,16,821,83,1032], // LATIN CAPITAL LETTER Z
+ 0xA0: [0,0,250,0,0] // NO-BREAK SPACE
+};
+
+CHTML.fontLoaded("TeX/"+font.substr(8));
+
+})(MathJax.OutputJax.CommonHTML);
+// @license-end
diff --git a/js/mathjax/jax/output/CommonHTML/fonts/TeX/Typewriter-Regular.js b/js/mathjax/jax/output/CommonHTML/fonts/TeX/Typewriter-Regular.js
new file mode 100644
index 0000000..66cfd23
--- /dev/null
+++ b/js/mathjax/jax/output/CommonHTML/fonts/TeX/Typewriter-Regular.js
@@ -0,0 +1,157 @@
+// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0
+/*************************************************************
+ *
+ * MathJax/jax/output/CommonHTML/fonts/TeX/Typewriter-Regular.js
+ *
+ * Copyright (c) 2015-2020 The MathJax Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+(function (CHTML) {
+
+var font = 'MathJax_Typewriter';
+
+CHTML.FONTDATA.FONTS[font] = {
+ className: CHTML.FONTDATA.familyName(font),
+ centerline: 233, ascent: 694, descent: 229,
+
+ 0x20: [0,0,250,0,0], // SPACE
+ 0x21: [622,0,525,206,320], // EXCLAMATION MARK
+ 0x22: [623,-333,525,122,402], // QUOTATION MARK
+ 0x23: [611,0,525,36,489], // NUMBER SIGN
+ 0x24: [694,82,525,58,466], // DOLLAR SIGN
+ 0x25: [694,83,525,35,489], // PERCENT SIGN
+ 0x26: [622,11,525,28,490], // AMPERSAND
+ 0x27: [611,-287,525,175,349], // APOSTROPHE
+ 0x28: [694,82,525,166,437], // LEFT PARENTHESIS
+ 0x29: [694,82,525,87,358], // RIGHT PARENTHESIS
+ 0x2A: [520,-90,525,68,456], // ASTERISK
+ 0x2B: [531,-81,525,38,487], // PLUS SIGN
+ 0x2C: [140,139,525,173,353], // COMMA
+ 0x2D: [341,-271,525,57,468], // HYPHEN-MINUS
+ 0x2E: [140,-1,525,193,332], // FULL STOP
+ 0x2F: [694,83,525,58,466], // SOLIDUS
+ 0x30: [621,10,525,42,482], // DIGIT ZERO
+ 0x31: [622,-1,525,99,450], // DIGIT ONE
+ 0x32: [622,-1,525,52,472], // DIGIT TWO
+ 0x33: [622,11,525,44,479], // DIGIT THREE
+ 0x34: [624,-1,525,29,495], // DIGIT FOUR
+ 0x35: [611,10,525,52,472], // DIGIT FIVE
+ 0x36: [622,11,525,45,479], // DIGIT SIX
+ 0x37: [627,10,525,44,480], // DIGIT SEVEN
+ 0x38: [621,10,525,45,479], // DIGIT EIGHT
+ 0x39: [622,11,525,46,479], // DIGIT NINE
+ 0x3A: [431,-1,525,193,332], // COLON
+ 0x3B: [431,139,525,175,337], // SEMICOLON
+ 0x3C: [557,-55,525,57,468], // LESS-THAN SIGN
+ 0x3D: [417,-195,525,38,487], // EQUALS SIGN
+ 0x3E: [557,-55,525,57,468], // GREATER-THAN SIGN
+ 0x3F: [617,0,525,62,462], // QUESTION MARK
+ 0x40: [617,6,525,44,481], // COMMERCIAL AT
+ 0x41: [623,-1,525,28,496], // LATIN CAPITAL LETTER A
+ 0x42: [611,-1,525,17,482], // LATIN CAPITAL LETTER B
+ 0x43: [622,11,525,40,484], // LATIN CAPITAL LETTER C
+ 0x44: [611,-1,525,16,485], // LATIN CAPITAL LETTER D
+ 0x45: [611,-1,525,19,502], // LATIN CAPITAL LETTER E
+ 0x46: [611,-1,525,22,490], // LATIN CAPITAL LETTER F
+ 0x47: [622,11,525,38,496], // LATIN CAPITAL LETTER G
+ 0x48: [611,-1,525,16,508], // LATIN CAPITAL LETTER H
+ 0x49: [611,-1,525,72,452], // LATIN CAPITAL LETTER I
+ 0x4A: [611,11,525,57,479], // LATIN CAPITAL LETTER J
+ 0x4B: [611,-1,525,18,495], // LATIN CAPITAL LETTER K
+ 0x4C: [611,0,525,25,488], // LATIN CAPITAL LETTER L
+ 0x4D: [611,-1,525,12,512], // LATIN CAPITAL LETTER M
+ 0x4E: [611,0,525,20,504], // LATIN CAPITAL LETTER N
+ 0x4F: [621,10,525,56,468], // LATIN CAPITAL LETTER O
+ 0x50: [611,-1,525,19,480], // LATIN CAPITAL LETTER P
+ 0x51: [621,138,525,56,468], // LATIN CAPITAL LETTER Q
+ 0x52: [611,11,525,16,522], // LATIN CAPITAL LETTER R
+ 0x53: [622,11,525,52,472], // LATIN CAPITAL LETTER S
+ 0x54: [611,-1,525,26,498], // LATIN CAPITAL LETTER T
+ 0x55: [611,11,525,-3,528], // LATIN CAPITAL LETTER U
+ 0x56: [611,7,525,19,505], // LATIN CAPITAL LETTER V
+ 0x57: [611,7,525,12,512], // LATIN CAPITAL LETTER W
+ 0x58: [611,-1,525,28,495], // LATIN CAPITAL LETTER X
+ 0x59: [611,-1,525,20,505], // LATIN CAPITAL LETTER Y
+ 0x5A: [611,-1,525,48,481], // LATIN CAPITAL LETTER Z
+ 0x5B: [694,82,525,214,483], // LEFT SQUARE BRACKET
+ 0x5C: [694,83,525,58,466], // REVERSE SOLIDUS
+ 0x5D: [694,82,525,41,310], // RIGHT SQUARE BRACKET
+ 0x5E: [611,-460,525,96,428], // CIRCUMFLEX ACCENT
+ 0x5F: [-25,95,525,57,468], // LOW LINE
+ 0x60: [681,-357,525,176,350], // GRAVE ACCENT
+ 0x61: [439,6,525,48,524], // LATIN SMALL LETTER A
+ 0x62: [611,6,525,4,492], // LATIN SMALL LETTER B
+ 0x63: [440,6,525,66,466], // LATIN SMALL LETTER C
+ 0x64: [611,6,525,31,520], // LATIN SMALL LETTER D
+ 0x65: [440,6,525,48,464], // LATIN SMALL LETTER E
+ 0x66: [617,-1,525,35,437], // LATIN SMALL LETTER F
+ 0x67: [442,229,525,28,509], // LATIN SMALL LETTER G
+ 0x68: [611,-1,525,4,520], // LATIN SMALL LETTER H
+ 0x69: [612,-1,525,72,462], // LATIN SMALL LETTER I
+ 0x6A: [612,228,525,48,376], // LATIN SMALL LETTER J
+ 0x6B: [611,-1,525,13,507], // LATIN SMALL LETTER K
+ 0x6C: [611,-1,525,51,474], // LATIN SMALL LETTER L
+ 0x6D: [436,-1,525,-12,536], // LATIN SMALL LETTER M
+ 0x6E: [436,-1,525,4,520], // LATIN SMALL LETTER N
+ 0x6F: [440,6,525,52,472], // LATIN SMALL LETTER O
+ 0x70: [437,221,525,4,492], // LATIN SMALL LETTER P
+ 0x71: [437,221,525,34,545], // LATIN SMALL LETTER Q
+ 0x72: [437,-1,525,24,487], // LATIN SMALL LETTER R
+ 0x73: [440,6,525,72,458], // LATIN SMALL LETTER S
+ 0x74: [554,6,525,25,448], // LATIN SMALL LETTER T
+ 0x75: [431,5,525,4,520], // LATIN SMALL LETTER U
+ 0x76: [431,4,525,24,500], // LATIN SMALL LETTER V
+ 0x77: [431,4,525,16,508], // LATIN SMALL LETTER W
+ 0x78: [431,-1,525,29,495], // LATIN SMALL LETTER X
+ 0x79: [431,228,525,26,500], // LATIN SMALL LETTER Y
+ 0x7A: [431,-1,525,34,475], // LATIN SMALL LETTER Z
+ 0x7B: [694,83,525,50,475], // LEFT CURLY BRACKET
+ 0x7C: [694,82,525,228,297], // VERTICAL LINE
+ 0x7D: [694,83,525,49,475], // RIGHT CURLY BRACKET
+ 0x7E: [611,-466,525,87,437], // TILDE
+ 0x7F: [612,-519,525,104,421], // ??
+ 0xA0: [0,0,250,0,0], // NO-BREAK SPACE
+ 0x131: [431,-1,525,72,462], // LATIN SMALL LETTER DOTLESS I
+ 0x237: [431,228,525,48,376], // LATIN SMALL LETTER DOTLESS J
+ 0x300: [611,-485,0,-409,-195], // COMBINING GRAVE ACCENT
+ 0x301: [611,-485,0,-331,-117], // COMBINING ACUTE ACCENT
+ 0x302: [611,-460,0,-429,-97], // COMBINING CIRCUMFLEX ACCENT
+ 0x303: [611,-466,0,-438,-88], // COMBINING TILDE
+ 0x304: [577,-500,0,-452,-74], // COMBINING MACRON
+ 0x306: [611,-504,0,-446,-79], // COMBINING BREVE
+ 0x308: [612,-519,0,-421,-104], // COMBINING DIAERESIS
+ 0x30A: [619,-499,0,-344,-182], // COMBINING RING ABOVE
+ 0x30C: [577,-449,0,-427,-99], // COMBINING CARON
+ 0x393: [611,0,525,25,488], // GREEK CAPITAL LETTER GAMMA
+ 0x394: [623,0,525,35,489], // GREEK CAPITAL LETTER DELTA
+ 0x398: [621,10,525,56,468], // GREEK CAPITAL LETTER THETA
+ 0x39B: [623,-1,525,30,495], // GREEK CAPITAL LETTER LAMDA
+ 0x39E: [611,-1,525,33,491], // GREEK CAPITAL LETTER XI
+ 0x3A0: [611,-1,525,16,508], // GREEK CAPITAL LETTER PI
+ 0x3A3: [611,-1,525,40,484], // GREEK CAPITAL LETTER SIGMA
+ 0x3A5: [622,-1,525,38,486], // GREEK CAPITAL LETTER UPSILON
+ 0x3A6: [611,-1,525,41,483], // GREEK CAPITAL LETTER PHI
+ 0x3A8: [611,-1,525,37,487], // GREEK CAPITAL LETTER PSI
+ 0x3A9: [622,-1,525,32,492], // GREEK CAPITAL LETTER OMEGA
+ 0x7E2: [611,-287,525,175,349], // ??
+ 0x7E3: [681,-357,525,176,350], // ??
+ 0x2032: [623,-334,525,211,313] // PRIME
+};
+
+CHTML.fontLoaded("TeX/"+font.substr(8));
+
+})(MathJax.OutputJax.CommonHTML);
+// @license-end
diff --git a/js/mathjax/jax/output/CommonHTML/fonts/TeX/fontdata-extra.js b/js/mathjax/jax/output/CommonHTML/fonts/TeX/fontdata-extra.js
new file mode 100644
index 0000000..62d7389
--- /dev/null
+++ b/js/mathjax/jax/output/CommonHTML/fonts/TeX/fontdata-extra.js
@@ -0,0 +1,242 @@
+// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0
+/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
+/* vim: set ts=2 et sw=2 tw=80: */
+
+/*************************************************************
+ *
+ * MathJax/jax/output/CommonHTML/fonts/TeX/fontdata-extra.js
+ *
+ * Adds extra stretchy characters to the TeX font data.
+ *
+ * ---------------------------------------------------------------------
+ *
+ * Copyright (c) 2015-2020 The MathJax Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+(function (CHTML) {
+ var VERSION = "2.7.9";
+
+ var DELIMITERS = CHTML.FONTDATA.DELIMITERS;
+
+ var MAIN = "MathJax_Main",
+ BOLD = "MathJax_Main-Bold",
+ AMS = "MathJax_AMS",
+ SIZE1 = "MathJax_Size1",
+ SIZE4 = "MathJax_Size4";
+ var H = "H", V = "V";
+ var ARROWREP = [0x2212,MAIN,0,0,0,-.31,-.31]; // remove extra height/depth added below
+ var DARROWREP = [0x3D,MAIN,0,0,0,0,.1]; // add depth for arrow extender
+
+ var delim = {
+ 0x003D: // equal sign
+ {
+ dir: H, HW: [[.767,MAIN]], stretch: {rep:[0x003D,MAIN]}
+ },
+ 0x219E: // left two-headed arrow
+ {
+ dir: H, HW: [[1,AMS]], stretch: {left:[0x219E,AMS], rep:ARROWREP}
+ },
+ 0x21A0: // right two-headed arrow
+ {
+ dir: H, HW: [[1,AMS]], stretch: {right:[0x21A0,AMS], rep:ARROWREP}
+ },
+ 0x21A4: // left arrow from bar
+ {
+ dir: H, HW: [],
+ stretch: {min:1, left:[0x2190,MAIN], rep:ARROWREP, right:[0x2223,SIZE1,0,-.05,.9]}
+ },
+ 0x21A5: // up arrow from bar
+ {
+ dir: V, HW: [],
+ stretch: {min:.6, bot:[0x22A5,BOLD,0,0,.75], ext:[0x23D0,SIZE1], top:[0x2191,SIZE1]}
+ },
+ 0x21A6: // right arrow from bar
+ {
+ dir: H, HW: [[1,MAIN]],
+ stretch: {left:[0x2223,SIZE1,-.09,-.05,.9], rep:ARROWREP, right:[0x2192,MAIN]}
+ },
+ 0x21A7: // down arrow from bar
+ {
+ dir: V, HW: [],
+ stretch: {min:.6, top:[0x22A4,BOLD,0,0,.75], ext:[0x23D0,SIZE1], bot:[0x2193,SIZE1]}
+ },
+ 0x21B0: // up arrow with top leftwards
+ {
+ dir: V, HW: [[.722,AMS]],
+ stretch: {top:[0x21B0,AMS], ext:[0x23D0,SIZE1,.097]}
+ },
+ 0x21B1: // up arrow with top right
+ {
+ dir: V, HW: [[.722,AMS]],
+ stretch: {top:[0x21B1,AMS,.27], ext:[0x23D0,SIZE1]}
+ },
+ 0x21BC: // left harpoon with barb up
+ {
+ dir: H, HW: [[1,MAIN]],
+ stretch: {left:[0x21BC,MAIN], rep:ARROWREP}
+ },
+ 0x21BD: // left harpoon with barb down
+ {
+ dir: H, HW: [[1,MAIN]],
+ stretch: {left:[0x21BD,MAIN], rep:ARROWREP}
+ },
+ 0x21BE: // up harpoon with barb right
+ {
+ dir: V, HW: [[.888,AMS]],
+ stretch: {top:[0x21BE,AMS,.12,0,1.1], ext:[0x23D0,SIZE1]}
+ },
+ 0x21BF: // up harpoon with barb left
+ {
+ dir: V, HW: [[.888,AMS]],
+ stretch: {top:[0x21BF,AMS,.12,0,1.1], ext:[0x23D0,SIZE1]}
+ },
+ 0x21C0: // right harpoon with barb up
+ {
+ dir: H, HW: [[1,MAIN]],
+ stretch: {right:[0x21C0,MAIN], rep:ARROWREP}
+ },
+ 0x21C1: // right harpoon with barb down
+ {
+ dir: H, HW: [[1,MAIN]],
+ stretch: {right:[0x21C1,MAIN], rep:ARROWREP}
+ },
+ 0x21C2: // down harpoon with barb right
+ {
+ dir: V, HW: [[.888,AMS]],
+ stretch: {bot:[0x21C2,AMS,.12,0,1.1], ext:[0x23D0,SIZE1]}
+ },
+ 0x21C3: // down harpoon with barb left
+ {
+ dir: V, HW: [[.888,AMS]],
+ stretch: {bot:[0x21C3,AMS,.12,0,1.1], ext:[0x23D0,SIZE1]}
+ },
+ 0x21DA: // left triple arrow
+ {
+ dir: H, HW: [[1,AMS]],
+ stretch: {left:[0x21DA,AMS], rep:[0x2261,MAIN]}
+ },
+ 0x21DB: // right triple arrow
+ {
+ dir: H, HW: [[1,AMS]],
+ stretch: {right:[0x21DB,AMS], rep:[0x2261,MAIN]}
+ },
+ 0x23B4: // top square bracket
+ {
+ dir: H, HW: [],
+ stretch: {min:.5, left:[0x250C,AMS,0,-.1], rep:[0x2212,MAIN,0,.35], right:[0x2510,AMS,0,-.1]}
+ },
+ 0x23B5: // bottom square bracket
+ {
+ dir: H, HW: [],
+ stretch: {min:.5, left:[0x2514,AMS,0,.26], rep:[0x2212,MAIN,0,0,0,.25], right:[0x2518,AMS,0,.26]}
+ },
+ 0x23DC: // top paren
+ {
+ dir: H, HW: [[.778,AMS,0,0x2322],[1,MAIN,0,0x2322]],
+ stretch: {left:[0xE150,SIZE4], rep:[0xE154,SIZE4], right:[0xE151,SIZE4]}
+ },
+ 0x23DD: // bottom paren
+ {
+ dir: H, HW: [[.778,AMS,0,0x2323],[1,MAIN,0,0x2323]],
+ stretch: {left:[0xE152,SIZE4], rep:[0xE154,SIZE4], right:[0xE153,SIZE4]}
+ },
+ 0x23E0: // top tortoise shell
+ {
+ dir: H, HW: [],
+ stretch: {min:1.25, left:[0x2CA,MAIN,-.1], rep:[0x2C9,MAIN,0,.13], right:[0x2CB,MAIN], fullExtenders:true}
+ },
+ 0x23E1: // bottom tortoise shell
+ {
+ dir: H, HW: [],
+ stretch: {min:1.5, left:[0x2CB,MAIN,-.1,.1], rep:[0x2C9,MAIN], right:[0x2CA,MAIN,-.1,.1], fullExtenders:true}
+ },
+ 0x2906: // leftwards double arrow from bar
+ {
+ dir: H, HW: [],
+ stretch: {min:1, left:[0x21D0,MAIN], rep:DARROWREP, right:[0x2223,SIZE1,0,-.1]}
+ },
+ 0x2907: // rightwards double arrow from bar
+ {
+ dir: H, HW: [],
+ stretch: {min:.7, left:[0x22A8,AMS,0,-.12], rep:DARROWREP, right:[0x21D2,MAIN]}
+ },
+ 0x294E: // left barb up right barb up harpoon
+ {
+ dir: H, HW: [],
+ stretch: {min:.5, left:[0x21BC,MAIN], rep:ARROWREP, right:[0x21C0,MAIN]}
+ },
+ 0x294F: // up barb right down barb right harpoon
+ {
+ dir: V, HW: [],
+ stretch: {min:.5, top:[0x21BE,AMS,.12,0,1.1], ext:[0x23D0,SIZE1], bot:[0x21C2,AMS,.12,0,1.1]}
+ },
+ 0x2950: // left barb dow right barb down harpoon
+ {
+ dir: H, HW: [],
+ stretch: {min:.5, left:[0x21BD,MAIN], rep:ARROWREP, right:[0x21C1,MAIN]}
+ },
+ 0x2951: // up barb left down barb left harpoon
+ {
+ dir: V, HW: [],
+ stretch: {min:.5, top:[0x21BF,AMS,.12,0,1.1], ext:[0x23D0,SIZE1], bot:[0x21C3,AMS,.12,0,1.1]}
+ },
+ 0x295A: // leftwards harpoon with barb up from bar
+ {
+ dir: H, HW: [],
+ stretch: {min:1, left:[0x21BC,MAIN], rep:ARROWREP, right:[0x2223,SIZE1,0,-.05,.9]}
+ },
+ 0x295B: // rightwards harpoon with barb up from bar
+ {
+ dir: H, HW: [],
+ stretch: {min:1, left:[0x2223,SIZE1,-.05,-.05,.9], rep:ARROWREP, right:[0x21C0,MAIN]}
+ },
+ 0x295C: // up harpoon with barb right from bar
+ {
+ dir: V, HW: [],
+ stretch: {min:.7, bot:[0x22A5,BOLD,0,0,.75], ext:[0x23D0,SIZE1], top:[0x21BE,AMS,.12,0,1.1]}
+ },
+ 0x295D: // down harpoon with barb right from bar
+ {
+ dir: V, HW: [],
+ stretch: {min:.7, top:[0x22A4,BOLD,0,0,.75], ext:[0x23D0,SIZE1], bot:[0x21C2,AMS,.12,0,1.1]}
+ },
+ 0x295E: // leftwards harpoon with barb down from bar
+ {
+ dir: H, HW: [],
+ stretch: {min:1, left:[0x21BD,MAIN], rep:ARROWREP, right:[0x2223,SIZE1,0,-.05,.9]}
+ },
+ 0x295F: // rightwards harpoon with barb down from bar
+ {
+ dir: H, HW: [],
+ stretch: {min:1, left:[0x2223,SIZE1,-.05,-.05,.9], rep:ARROWREP, right:[0x21C1,MAIN]}
+ },
+ 0x2960: // up harpoon with barb left from bar
+ {
+ dir: V, HW: [],
+ stretch: {min:.7, bot:[0x22A5,BOLD,0,0,.75], ext:[0x23D0,SIZE1], top:[0x21BF,AMS,.12,0,1.1]}
+ },
+ 0x2961: // down harpoon with barb left from bar
+ {
+ dir: V, HW: [],
+ stretch: {min:.7, top:[0x22A4,BOLD,0,0,.75], ext:[0x23D0,SIZE1], bot:[0x21C3,AMS,.12,0,1.1]}
+ }
+ };
+
+ for (var id in delim) {if (delim.hasOwnProperty(id)) {DELIMITERS[id] = delim[id]}};
+
+ CHTML.fontLoaded("TeX/fontdata-extra");
+
+})(MathJax.OutputJax.CommonHTML);
+// @license-end
diff --git a/js/mathjax/jax/output/CommonHTML/fonts/TeX/fontdata.js b/js/mathjax/jax/output/CommonHTML/fonts/TeX/fontdata.js
new file mode 100644
index 0000000..9036c71
--- /dev/null
+++ b/js/mathjax/jax/output/CommonHTML/fonts/TeX/fontdata.js
@@ -0,0 +1,1786 @@
+// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0
+/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
+/* vim: set ts=2 et sw=2 tw=80: */
+
+/*************************************************************
+ *
+ * MathJax/jax/output/CommonHTML/fonts/TeX/fontdata.js
+ *
+ * Initializes the CommonHTML OutputJax to use the MathJax TeX fonts
+ * for displaying mathematics.
+ *
+ * ---------------------------------------------------------------------
+ *
+ * Copyright (c) 2015-2020 The MathJax Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+(function (CHTML,MML,AJAX) {
+ var VERSION = "2.7.9";
+
+ var MAIN = "MathJax_Main",
+ BOLD = "MathJax_Main-Bold",
+ ITALIC = "MathJax_Math-Italic",
+ AMS = "MathJax_AMS",
+ SIZE1 = "MathJax_Size1",
+ SIZE2 = "MathJax_Size2",
+ SIZE3 = "MathJax_Size3",
+ SIZE4 = "MathJax_Size4";
+ var H = "H", V = "V", EXTRAH = {load:"extra", dir:H}, EXTRAV = {load:"extra", dir:V};
+ var ARROWREP = [0x2212,MAIN,0,0,0,-.31,-.31]; // remove extra height/depth added below
+ var DARROWREP = [0x3D,MAIN,0,0,0,0,.1]; // add depth for arrow extender
+
+ var UNDEFINEDFAMILY = CHTML.config.undefinedFamily;
+
+ MathJax.Hub.Insert(CHTML.config.styles,{
+ ".MJXc-TeX-unknown-R": {"font-family":UNDEFINEDFAMILY, "font-style":"normal", "font-weight":"normal"},
+ ".MJXc-TeX-unknown-I": {"font-family":UNDEFINEDFAMILY, "font-style":"italic", "font-weight":"normal"},
+ ".MJXc-TeX-unknown-B": {"font-family":UNDEFINEDFAMILY, "font-style":"normal", "font-weight":"bold"},
+ ".MJXc-TeX-unknown-BI": {"font-family":UNDEFINEDFAMILY, "font-style":"italic", "font-weight":"bold"}
+ });
+
+ CHTML.TEX = CHTML.TEXDEF; // use default TeX parameters
+ CHTML.FONTDEF.TeX = {
+ version: VERSION,
+
+ baselineskip: 1.2,
+ lineH: .8, lineD: .2,
+
+ FONTS: {
+//
+// These ones are defined below
+//
+// "MathJax_Main":
+// "MathJax_Main-Bold":
+// "MathJax_Main-Italic":
+// "MathJax_Math-Italic":
+// "MathJax_Caligraphic":
+// "MathJax_Size1":
+// "MathJax_Size2":
+// "MathJax_Size3":
+// "MathJax_Size4":
+
+ "MathJax_AMS": "TeX/AMS-Regular.js",
+ "MathJax_Caligraphic-Bold": "TeX/Caligraphic-Bold.js",
+ "MathJax_Fraktur": "TeX/Fraktur-Regular.js",
+ "MathJax_Fraktur-Bold": "TeX/Fraktur-Bold.js",
+ "MathJax_Math-BoldItalic": "TeX/Math-BoldItalic.js",
+ "MathJax_SansSerif": "TeX/SansSerif-Regular.js",
+ "MathJax_SansSerif-Bold": "TeX/SansSerif-Bold.js",
+ "MathJax_SansSerif-Italic": "TeX/SansSerif-Italic.js",
+ "MathJax_Script": "TeX/Script-Regular.js",
+ "MathJax_Typewriter": "TeX/Typewriter-Regular.js"
+ },
+
+ UNKNOWN: {
+ R: {className:"MJXc-TeX-unknown-R"},
+ I: {className:"MJXc-TeX-unknown-I"},
+ B: {className:"MJXc-TeX-unknown-B"},
+ BI: {className:"MJXc-TeX-unknown-BI"}
+ },
+
+ VARIANT: {
+ "normal": {fonts:[MAIN,SIZE1,AMS], cache: {},
+ offsetG: 0x03B1, variantG: "italic",
+ remap: {0x391:0x41, 0x392:0x42, 0x395:0x45, 0x396:0x5A, 0x397:0x48,
+ 0x399:0x49, 0x39A:0x4B, 0x39C:0x4D, 0x39D:0x4E, 0x39F:0x4F,
+ 0x3A1:0x50, 0x3A4:0x54, 0x3A7:0x58,
+ 0xE160:[0x2192, "-TeX-vec"], // HACK for \vec (#1709)
+ 0x2016:0x2225,
+ 0x2216:[0x2216,"-TeX-variant",true], // \smallsetminus
+ 0x210F:[0x210F,"-TeX-variant",true], // \hbar
+ 0x2032:[0x27,"sans-serif-italic"], // HACK: a smaller prime
+ 0x29F8:[0x002F,MML.VARIANT.ITALIC]}},
+ "bold": {fonts:[BOLD], bold:true, cache: {}, chain:"normal",
+ offsetG: 0x03B1, variantG: "bold-italic",
+ remap: {0x391:0x41, 0x392:0x42, 0x395:0x45, 0x396:0x5A, 0x397:0x48,
+ 0x399:0x49, 0x39A:0x4B, 0x39C:0x4D, 0x39D:0x4E, 0x39F:0x4F,
+ 0x3A1:0x50, 0x3A4:0x54, 0x3A7:0x58, 0x29F8:[0x002F,"bold-italic"],
+ 0xE160:[0x2192, "-TeX-vec-bold"], // HACK for \vec (#1709)
+ 0x2016:0x2225,
+ 0x219A:"\u2190\u0338", 0x219B:"\u2192\u0338", 0x21AE:"\u2194\u0338",
+ 0x21CD:"\u21D0\u0338", 0x21CE:"\u21D4\u0338", 0x21CF:"\u21D2\u0338",
+ 0x2204:"\u2203\u0338", 0x2224:"\u2223\u0338", 0x2226:"\u2225\u0338",
+ 0x2241:"\u223C\u0338", 0x2247:"\u2245\u0338",
+ 0x226E:"<\u0338", 0x226F:">\u0338",
+ 0x2270:"\u2264\u0338", 0x2271:"\u2265\u0338",
+ 0x2280:"\u227A\u0338", 0x2281:"\u227B\u0338",
+ 0x2288:"\u2286\u0338", 0x2289:"\u2287\u0338",
+ 0x22AC:"\u22A2\u0338", 0x22AD:"\u22A8\u0338",
+// 0x22AE:"\u22A9\u0338", 0x22AF:"\u22AB\u0338",
+ 0x22E0:"\u227C\u0338", 0x22E1:"\u227D\u0338"//,
+// 0x22EA:"\u22B2\u0338", 0x22EB:"\u22B3\u0338",
+// 0x22EC:"\u22B4\u0338", 0x22ED:"\u22B5\u0338"
+ }},
+ "italic": {fonts:[ITALIC,"MathJax_Main-Italic"], italic:true, cache: {}, chain:"normal",
+ remap: {0x391:0x41, 0x392:0x42, 0x395:0x45, 0x396:0x5A, 0x397:0x48,
+ 0x399:0x49, 0x39A:0x4B, 0x39C:0x4D, 0x39D:0x4E, 0x39F:0x4F,
+ 0x3A1:0x50, 0x3A4:0x54, 0x3A7:0x58}},
+ "bold-italic": {fonts:["MathJax_Math-BoldItalic"], bold:true, italic:true,
+ cache: {}, chain:"bold",
+ remap: {0x391:0x41, 0x392:0x42, 0x395:0x45, 0x396:0x5A, 0x397:0x48,
+ 0x399:0x49, 0x39A:0x4B, 0x39C:0x4D, 0x39D:0x4E, 0x39F:0x4F,
+ 0x3A1:0x50, 0x3A4:0x54, 0x3A7:0x58}},
+ "double-struck": {fonts:[AMS,MAIN,SIZE1], cache:{}},
+ "fraktur": {fonts:["MathJax_Fraktur"], cache:{}, chain:"normal"},
+ "bold-fraktur": {fonts:["MathJax_Fraktur-Bold"], bold:true, cache:{}, chain:"bold"},
+ "script": {fonts:["MathJax_Script"], cache:{}, chain:"normal"},
+ "bold-script": {fonts:["MathJax_Script"], bold:true, cache:{}, chain:"bold"},
+ "sans-serif": {fonts:["MathJax_SansSerif"], cache:{}, chain:"normal"},
+ "bold-sans-serif": {fonts:["MathJax_SansSerif-Bold"], bold:true, cache:{}, chain:"bold"},
+ "sans-serif-italic": {fonts:["MathJax_SansSerif-Italic"], italic:true, cache:{}, chain:"italic"},
+ "sans-serif-bold-italic": {fonts:["MathJax_SansSerif-Italic"], bold:true, italic:true, cache:{}, chain:"italic"},
+ "monospace": {fonts:["MathJax_Typewriter"], cache:{}, chain:"normal"},
+ "-tex-caligraphic": {fonts:["MathJax_Caligraphic"], offsetA: 0x41, variantA: "italic", cache:{}, chain:"normal"},
+ "-tex-oldstyle": {fonts:["MathJax_Caligraphic"], cache:{}, chain:"normal"},
+ "-tex-mathit": {fonts:["MathJax_Main-Italic"], italic:true, noIC: true, cache:{}, chain:"normal",
+ remap: {0x391:0x41, 0x392:0x42, 0x395:0x45, 0x396:0x5A, 0x397:0x48,
+ 0x399:0x49, 0x39A:0x4B, 0x39C:0x4D, 0x39D:0x4E, 0x39F:0x4F,
+ 0x3A1:0x50, 0x3A4:0x54, 0x3A7:0x58}},
+ "-TeX-variant": {fonts:[AMS,MAIN,SIZE1], cache:{}, // HACK: to get larger prime for \prime
+ remap: {
+ 0x2268: 0xE00C, 0x2269: 0xE00D, 0x2270: 0xE011, 0x2271: 0xE00E,
+ 0x2A87: 0xE010, 0x2A88: 0xE00F, 0x2224: 0xE006, 0x2226: 0xE007,
+ 0x2288: 0xE016, 0x2289: 0xE018, 0x228A: 0xE01A, 0x228B: 0xE01B,
+ 0x2ACB: 0xE017, 0x2ACC: 0xE019, 0x03DC: 0xE008, 0x03F0: 0xE009,
+ 0x2216:[0x2216,MML.VARIANT.NORMAL,true], // \setminus
+ 0x210F:[0x210F,MML.VARIANT.NORMAL,true] // \hslash
+ }},
+ "-TeX-vec": {fonts: ["MathJax_Vector"], cache:{}}, // HACK: non-combining \vec
+ "-TeX-vec-bold": {fonts: ["MathJax_Vector-Bold"], cache:{}}, // HACK: non-combining \vec
+ "-largeOp": {fonts:[SIZE2,SIZE1,MAIN,AMS],cache:{}},
+ "-smallOp": {fonts:[SIZE1,MAIN,AMS], cache:{}},
+ "-tex-caligraphic-bold": {fonts:["MathJax_Caligraphic-Bold","MathJax_Main-Bold"], bold:true, cache:{}, chain:"normal",
+ offsetA: 0x41, variantA: "bold-italic"},
+ "-tex-oldstyle-bold": {fonts:["MathJax_Caligraphic-Bold","MathJax_Main-Bold"], bold:true, cache:{}, chain:"normal"}
+ },
+
+ RANGES: [
+ {name: "alpha", low: 0x61, high: 0x7A, offset: "A", add: 32},
+ {name: "number", low: 0x30, high: 0x39, offset: "N"},
+ {name: "greek", low: 0x03B1, high: 0x03F6, offset: "G"}
+ ],
+
+ REMAP: {
+ 0xA: 0x20, // newline
+ 0x203E: 0x2C9, // overline
+ 0xFE37: 0x23DE, 0xFE38: 0x23DF, // OverBrace, UnderBrace
+
+ 0xB7: 0x22C5, // center dot
+ 0x2B9: 0x2032, // prime,
+ 0x3D2: 0x3A5, // Upsilon
+ 0x2206: 0x394, // increment
+ 0x2015: 0x2014, 0x2017: 0x5F, // horizontal bars
+ 0x2022: 0x2219, 0x2044: 0x2F, // bullet, fraction slash
+ 0x2305: 0x22BC, 0x2306: 0x2A5E, // barwedge, doublebarwedge
+ 0x25AA: 0x25A0, 0x25B4: 0x25B2, // blacksquare, blacktriangle
+ 0x25B5: 0x25B3, 0x25B8: 0x25B6, // triangle, blacktriangleright
+ 0x25BE: 0x25BC, 0x25BF: 0x25BD, // blacktriangledown, triangledown
+ 0x25C2: 0x25C0, // blacktriangleleft
+ 0x2329: 0x27E8, 0x232A: 0x27E9, // langle, rangle
+ 0x3008: 0x27E8, 0x3009: 0x27E9, // langle, rangle
+ 0x2758: 0x2223, // VerticalSeparator
+ 0x2A2F: 0xD7, // cross product
+
+ 0x25FB: 0x25A1, 0x25FC: 0x25A0, // square, blacksquare
+
+ //
+ // Letter-like symbols (that appear elsewhere)
+ //
+ 0x2102: [0x0043,MML.VARIANT.DOUBLESTRUCK],
+// 0x210A: [0x0067,MML.VARIANT.SCRIPT],
+ 0x210B: [0x0048,MML.VARIANT.SCRIPT],
+ 0x210C: [0x0048,MML.VARIANT.FRAKTUR],
+ 0x210D: [0x0048,MML.VARIANT.DOUBLESTRUCK],
+ 0x210E: [0x0068,MML.VARIANT.ITALIC],
+ 0x2110: [0x004A,MML.VARIANT.SCRIPT],
+ 0x2111: [0x0049,MML.VARIANT.FRAKTUR],
+ 0x2112: [0x004C,MML.VARIANT.SCRIPT],
+ 0x2115: [0x004E,MML.VARIANT.DOUBLESTRUCK],
+ 0x2119: [0x0050,MML.VARIANT.DOUBLESTRUCK],
+ 0x211A: [0x0051,MML.VARIANT.DOUBLESTRUCK],
+ 0x211B: [0x0052,MML.VARIANT.SCRIPT],
+ 0x211C: [0x0052,MML.VARIANT.FRAKTUR],
+ 0x211D: [0x0052,MML.VARIANT.DOUBLESTRUCK],
+ 0x2124: [0x005A,MML.VARIANT.DOUBLESTRUCK],
+ 0x2126: [0x03A9,MML.VARIANT.NORMAL],
+ 0x2128: [0x005A,MML.VARIANT.FRAKTUR],
+ 0x212C: [0x0042,MML.VARIANT.SCRIPT],
+ 0x212D: [0x0043,MML.VARIANT.FRAKTUR],
+// 0x212F: [0x0065,MML.VARIANT.SCRIPT],
+ 0x2130: [0x0045,MML.VARIANT.SCRIPT],
+ 0x2131: [0x0046,MML.VARIANT.SCRIPT],
+ 0x2133: [0x004D,MML.VARIANT.SCRIPT],
+// 0x2134: [0x006F,MML.VARIANT.SCRIPT],
+
+ 0x2247: 0x2246, // wrong placement of this character
+ 0x231C: 0x250C, 0x231D:0x2510, // wrong placement of \ulcorner, \urcorner
+ 0x231E: 0x2514, 0x231F:0x2518, // wrong placement of \llcorner, \lrcorner
+
+ //
+ // compound symbols not in these fonts
+ //
+ 0x2204: "\u2203\u0338", // \not\exists
+ 0x220C: "\u220B\u0338", // \not\ni
+ 0x2244: "\u2243\u0338", // \not\simeq
+ 0x2249: "\u2248\u0338", // \not\approx
+ 0x2262: "\u2261\u0338", // \not\equiv
+ 0x226D: "\u224D\u0338", // \not\asymp
+ 0x2274: "\u2272\u0338", // \not\lesssim
+ 0x2275: "\u2273\u0338", // \not\gtrsim
+ 0x2278: "\u2276\u0338", // \not\lessgtr
+ 0x2279: "\u2277\u0338", // \not\gtrless
+ 0x2284: "\u2282\u0338", // \not\subset
+ 0x2285: "\u2283\u0338", // \not\supset
+ 0x22E2: "\u2291\u0338", // \not\sqsubseteq
+ 0x22E3: "\u2292\u0338", // \not\sqsupseteq
+
+ 0x2A0C: "\u222C\u222C", // quadruple integral
+
+ 0x2033: "\u2032\u2032", // double prime
+ 0x2034: "\u2032\u2032\u2032", // triple prime
+ 0x2036: "\u2035\u2035", // double back prime
+ 0x2037: "\u2035\u2035\u2035", // trile back prime
+ 0x2057: "\u2032\u2032\u2032\u2032", // quadruple prime
+ },
+
+ REMAPACCENT: {
+ "\u0300":"\u02CB", // grave accent
+ "\u0301":"\u02CA", // acute accent
+ "\u0302":"\u02C6", // curcumflex
+ "\u0303":"\u02DC", // tilde accent
+ "\u0304":"\u02C9", // macron
+ "\u0306":"\u02D8", // breve
+ "\u0307":"\u02D9", // dot
+ "\u0308":"\u00A8", // diaresis
+ "\u030A":"\u02DA", // ring above
+ "\u030C":"\u02C7", // caron
+ "\u20D7":"\uE160", // HACK: for non-combining \vec (#1709)
+ "\u2192":"\uE160",
+ "\u2032":"'",
+ "\u2035":"`",
+ "\u20D0":"\u21BC", "\u20D1":"\u21C0", // combining left and right harpoons
+ "\u20D6":"\u2190", "\u20E1":"\u2194", // combining left arrow and lef-right arrow
+ "\u20F0":"*", // combining asterisk
+ "\u20DB":"...", // combining three dots above
+ "\u20DC":"...." // combining four dots above
+ },
+ REMAPACCENTUNDER: {
+ "\u20EC":"\u21C1", "\u20ED":"\u21BD", // combining low right and left harpoons
+ "\u20EE":"\u2190", "\u20EF":"\u2192", // combining low left and right arrows
+ "\u20DB":"...", // combining three dots above
+ "\u20DC":"...." // combining four dots above
+ },
+
+ PLANE1MAP: [
+ [0x1D400,0x1D419, 0x41, MML.VARIANT.BOLD],
+ [0x1D41A,0x1D433, 0x61, MML.VARIANT.BOLD],
+ [0x1D434,0x1D44D, 0x41, MML.VARIANT.ITALIC],
+ [0x1D44E,0x1D467, 0x61, MML.VARIANT.ITALIC],
+ [0x1D468,0x1D481, 0x41, MML.VARIANT.BOLDITALIC],
+ [0x1D482,0x1D49B, 0x61, MML.VARIANT.BOLDITALIC],
+ [0x1D49C,0x1D4B5, 0x41, MML.VARIANT.SCRIPT],
+// [0x1D4B6,0x1D4CF, 0x61, MML.VARIANT.SCRIPT],
+// [0x1D4D0,0x1D4E9, 0x41, MML.VARIANT.BOLDSCRIPT],
+// [0x1D4EA,0x1D503, 0x61, MML.VARIANT.BOLDSCRIPT],
+ [0x1D504,0x1D51D, 0x41, MML.VARIANT.FRAKTUR],
+ [0x1D51E,0x1D537, 0x61, MML.VARIANT.FRAKTUR],
+ [0x1D538,0x1D551, 0x41, MML.VARIANT.DOUBLESTRUCK],
+// [0x1D552,0x1D56B, 0x61, MML.VARIANT.DOUBLESTRUCK],
+ [0x1D56C,0x1D585, 0x41, MML.VARIANT.BOLDFRAKTUR],
+ [0x1D586,0x1D59F, 0x61, MML.VARIANT.BOLDFRAKTUR],
+ [0x1D5A0,0x1D5B9, 0x41, MML.VARIANT.SANSSERIF],
+ [0x1D5BA,0x1D5D3, 0x61, MML.VARIANT.SANSSERIF],
+ [0x1D5D4,0x1D5ED, 0x41, MML.VARIANT.BOLDSANSSERIF],
+ [0x1D5EE,0x1D607, 0x61, MML.VARIANT.BOLDSANSSERIF],
+ [0x1D608,0x1D621, 0x41, MML.VARIANT.SANSSERIFITALIC],
+ [0x1D622,0x1D63B, 0x61, MML.VARIANT.SANSSERIFITALIC],
+// [0x1D63C,0x1D655, 0x41, MML.VARIANT.SANSSERIFBOLDITALIC],
+// [0x1D656,0x1D66F, 0x61, MML.VARIANT.SANSSERIFBOLDITALIC],
+ [0x1D670,0x1D689, 0x41, MML.VARIANT.MONOSPACE],
+ [0x1D68A,0x1D6A3, 0x61, MML.VARIANT.MONOSPACE],
+
+ [0x1D6A8,0x1D6C1, 0x391, MML.VARIANT.BOLD],
+// [0x1D6C2,0x1D6E1, 0x3B1, MML.VARIANT.BOLD],
+ [0x1D6E2,0x1D6FA, 0x391, MML.VARIANT.ITALIC],
+ [0x1D6FC,0x1D71B, 0x3B1, MML.VARIANT.ITALIC],
+ [0x1D71C,0x1D734, 0x391, MML.VARIANT.BOLDITALIC],
+ [0x1D736,0x1D755, 0x3B1, MML.VARIANT.BOLDITALIC],
+ [0x1D756,0x1D76E, 0x391, MML.VARIANT.BOLDSANSSERIF],
+// [0x1D770,0x1D78F, 0x3B1, MML.VARIANT.BOLDSANSSERIF],
+ [0x1D790,0x1D7A8, 0x391, MML.VARIANT.SANSSERIFBOLDITALIC],
+// [0x1D7AA,0x1D7C9, 0x3B1, MML.VARIANT.SANSSERIFBOLDITALIC],
+
+ [0x1D7CE,0x1D7D7, 0x30, MML.VARIANT.BOLD],
+// [0x1D7D8,0x1D7E1, 0x30, MML.VARIANT.DOUBLESTRUCK],
+ [0x1D7E2,0x1D7EB, 0x30, MML.VARIANT.SANSSERIF],
+ [0x1D7EC,0x1D7F5, 0x30, MML.VARIANT.BOLDSANSSERIF],
+ [0x1D7F6,0x1D7FF, 0x30, MML.VARIANT.MONOSPACE]
+ ],
+
+ REMAPGREEK: {
+ 0x391: 0x41, 0x392: 0x42, 0x395: 0x45, 0x396: 0x5A,
+ 0x397: 0x48, 0x399: 0x49, 0x39A: 0x4B, 0x39C: 0x4D,
+ 0x39D: 0x4E, 0x39F: 0x4F, 0x3A1: 0x50, 0x3A2: 0x398,
+ 0x3A4: 0x54, 0x3A7: 0x58, 0x3AA: 0x2207,
+ 0x3CA: 0x2202, 0x3CB: 0x3F5, 0x3CC: 0x3D1, 0x3CD: 0x3F0,
+ 0x3CE: 0x3D5, 0x3CF: 0x3F1, 0x3D0: 0x3D6
+ },
+
+ RemapPlane1: function (n,variant) {
+ for (var i = 0, m = this.PLANE1MAP.length; i < m; i++) {
+ if (n < this.PLANE1MAP[i][0]) break;
+ if (n <= this.PLANE1MAP[i][1]) {
+ n = n - this.PLANE1MAP[i][0] + this.PLANE1MAP[i][2];
+ if (this.REMAPGREEK[n]) {n = this.REMAPGREEK[n]}
+ variant = this.VARIANT[this.PLANE1MAP[i][3]];
+ break;
+ }
+ }
+ return {n: n, variant: variant};
+ },
+
+ DELIMITERS: {
+ 0x0028: // (
+ {
+ dir: V, HW: [[1,MAIN],[1.2,SIZE1],[1.8,SIZE2],[2.4,SIZE3],[3.0,SIZE4]],
+ stretch: {top: [0x239B,SIZE4], ext: [0x239C,SIZE4], bot: [0x239D,SIZE4]}
+ },
+ 0x0029: // )
+ {
+ dir: V, HW: [[1,MAIN],[1.2,SIZE1],[1.8,SIZE2],[2.4,SIZE3],[3.0,SIZE4]],
+ stretch: {top:[0x239E,SIZE4], ext:[0x239F,SIZE4], bot:[0x23A0,SIZE4]}
+ },
+ 0x002F: // /
+ {
+ dir: V, HW: [[1,MAIN],[1.2,SIZE1],[1.8,SIZE2],[2.4,SIZE3],[3.0,SIZE4]]
+ },
+ 0x005B: // [
+ {
+ dir: V, HW: [[1,MAIN],[1.2,SIZE1],[1.8,SIZE2],[2.4,SIZE3],[3.0,SIZE4]],
+ stretch: {top:[0x23A1,SIZE4], ext:[0x23A2,SIZE4], bot:[0x23A3,SIZE4]}
+ },
+ 0x005C: // \
+ {
+ dir: V, HW: [[1,MAIN],[1.2,SIZE1],[1.8,SIZE2],[2.4,SIZE3],[3.0,SIZE4]]
+ },
+ 0x005D: // ]
+ {
+ dir: V, HW: [[1,MAIN],[1.2,SIZE1],[1.8,SIZE2],[2.4,SIZE3],[3.0,SIZE4]],
+ stretch: {top:[0x23A4,SIZE4], ext:[0x23A5,SIZE4], bot:[0x23A6,SIZE4]}
+ },
+ 0x007B: // {
+ {
+ dir: V, HW: [[1,MAIN],[1.2,SIZE1],[1.8,SIZE2],[2.4,SIZE3],[3.0,SIZE4]],
+ stretch: {top:[0x23A7,SIZE4], mid:[0x23A8,SIZE4], bot:[0x23A9,SIZE4], ext:[0x23AA,SIZE4]}
+ },
+ 0x007C: // |
+ {
+ dir: V, HW: [[1,MAIN]], stretch: {ext:[0x2223,MAIN]}
+ },
+ 0x007D: // }
+ {
+ dir: V, HW: [[1,MAIN],[1.2,SIZE1],[1.8,SIZE2],[2.4,SIZE3],[3.0,SIZE4]],
+ stretch: {top: [0x23AB,SIZE4], mid:[0x23AC,SIZE4], bot: [0x23AD,SIZE4], ext: [0x23AA,SIZE4]}
+ },
+ 0x00AF: // macron
+ {
+ dir: H, HW: [[.59,MAIN]], stretch: {rep:[0xAF,MAIN]}
+ },
+ 0x02C6: // wide hat
+ {
+ dir: H, HW: [[.267+.25,MAIN],[.567+.25,SIZE1],[1.005+.33,SIZE2],[1.447+.33,SIZE3],[1.909,SIZE4]]
+ },
+ 0x02DC: // wide tilde
+ {
+ dir: H, HW: [[.333+.25,MAIN],[.555+.25,SIZE1],[1+.33,SIZE2],[1.443+.33,SIZE3],[1.887,SIZE4]]
+ },
+ 0x2013: // en-dash
+ {
+ dir: H, HW: [[.5,MAIN]], stretch: {rep:[0x2013,MAIN]}
+ },
+ 0x2016: // vertical arrow extension
+ {
+ dir: V, HW: [[.602,SIZE1],[1,MAIN,null,0x2225]], stretch: {ext:[0x2225,MAIN]}
+ },
+ 0x2190: // left arrow
+ {
+ dir: H, HW: [[1,MAIN]], stretch: {left:[0x2190,MAIN], rep:ARROWREP}
+ },
+ 0x2191: // \uparrow
+ {
+ dir: V, HW: [[.888,MAIN]], stretch: {top:[0x2191,SIZE1], ext:[0x23D0,SIZE1]}
+ },
+ 0x2192: // right arrow
+ {
+ dir: H, HW: [[1,MAIN]], stretch: {rep:ARROWREP, right:[0x2192,MAIN]}
+ },
+ 0x2193: // \downarrow
+ {
+ dir: V, HW: [[.888,MAIN]], stretch: {ext:[0x23D0,SIZE1], bot:[0x2193,SIZE1]}
+ },
+ 0x2194: // left-right arrow
+ {
+ dir: H, HW: [[1,MAIN]],
+ stretch: {left:[0x2190,MAIN], rep:ARROWREP, right:[0x2192,MAIN]}
+ },
+ 0x2195: // \updownarrow
+ {
+ dir: V, HW: [[1.044,MAIN]],
+ stretch: {top:[0x2191,SIZE1], ext:[0x23D0,SIZE1], bot:[0x2193,SIZE1]}
+ },
+ 0x21D0: // left double arrow
+ {
+ dir: H, HW: [[1,MAIN]], stretch: {left:[0x21D0,MAIN], rep:DARROWREP}
+ },
+ 0x21D1: // \Uparrow
+ {
+ dir: V, HW: [[.888,MAIN]], stretch: {top:[0x21D1,SIZE1], ext:[0x2016,SIZE1]}
+ },
+ 0x21D2: // right double arrow
+ {
+ dir: H, HW: [[1,MAIN]], stretch: {rep:DARROWREP, right:[0x21D2,MAIN]}
+ },
+ 0x21D3: // \Downarrow
+ {
+ dir: V, HW: [[.888,MAIN]], stretch: {ext:[0x2016,SIZE1], bot:[0x21D3,SIZE1]}
+ },
+ 0x21D4: // left-right double arrow
+ {
+ dir: H, HW: [[1,MAIN]],
+ stretch: {left:[0x21D0,MAIN], rep:DARROWREP, right:[0x21D2,MAIN]}
+ },
+ 0x21D5: // \Updownarrow
+ {
+ dir: V, HW: [[1.044,MAIN]],
+ stretch: {top:[0x21D1,SIZE1], ext:[0x2016,SIZE1], bot:[0x21D3,SIZE1]}
+ },
+ 0x2212: // horizontal line
+ {
+ dir: H, HW: [[.778,MAIN]], stretch: {rep:[0x2212,MAIN]}
+ },
+ 0x221A: // \surd
+ {
+ dir: V, HW: [[1,MAIN],[1.2,SIZE1],[1.8,SIZE2],[2.4,SIZE3],[3,SIZE4]],
+ stretch: {top:[0xE001,SIZE4], ext:[0xE000,SIZE4], bot:[0x23B7,SIZE4], fullExtenders:true}
+ },
+ 0x2223: // \vert
+ {
+ dir: V, HW: [[1,MAIN]], stretch: {ext:[0x2223,MAIN]}
+ },
+ 0x2225: // \Vert
+ {
+ dir: V, HW: [[1,MAIN]], stretch: {ext:[0x2225,MAIN]}
+ },
+ 0x2308: // \lceil
+ {
+ dir: V, HW: [[1,MAIN],[1.2,SIZE1],[1.8,SIZE2],[2.4,SIZE3],[3.0,SIZE4]],
+ stretch: {top:[0x23A1,SIZE4], ext:[0x23A2,SIZE4]}
+ },
+ 0x2309: // \rceil
+ {
+ dir: V, HW: [[1,MAIN],[1.2,SIZE1],[1.8,SIZE2],[2.4,SIZE3],[3.0,SIZE4]],
+ stretch: {top:[0x23A4,SIZE4], ext:[0x23A5,SIZE4]}
+ },
+ 0x230A: // \lfloor
+ {
+ dir: V, HW: [[1,MAIN],[1.2,SIZE1],[1.8,SIZE2],[2.4,SIZE3],[3.0,SIZE4]],
+ stretch: {ext:[0x23A2,SIZE4], bot:[0x23A3,SIZE4]}
+ },
+ 0x230B: // \rfloor
+ {
+ dir: V, HW: [[1,MAIN],[1.2,SIZE1],[1.8,SIZE2],[2.4,SIZE3],[3.0,SIZE4]],
+ stretch: {ext:[0x23A5,SIZE4], bot:[0x23A6,SIZE4]}
+ },
+ 0x23AA: // \bracevert
+ {
+ dir: V, HW: [[.32,SIZE4]],
+ stretch: {top:[0x23AA,SIZE4], ext:[0x23AA,SIZE4], bot:[0x23AA,SIZE4]}
+ },
+ 0x23B0: // \lmoustache
+ {
+ dir: V, HW: [[.989,MAIN]],
+ stretch: {top:[0x23A7,SIZE4], ext:[0x23AA,SIZE4], bot:[0x23AD,SIZE4]}
+ },
+ 0x23B1: // \rmoustache
+ {
+ dir: V, HW: [[.989,MAIN]],
+ stretch: {top:[0x23AB,SIZE4], ext:[0x23AA,SIZE4], bot:[0x23A9,SIZE4]}
+ },
+ 0x23D0: // vertical line extension
+ {
+ dir: V, HW: [[.602,SIZE1],[1,MAIN,null,0x2223]], stretch: {ext:[0x2223,MAIN]}
+ },
+ 0x23DE: // horizontal brace down
+ {
+ dir: H, HW: [],
+ stretch: {min:.9, left:[0xE150,SIZE4], mid:[[0xE153,0xE152],SIZE4], right:[0xE151,SIZE4], rep:[0xE154,SIZE4]}
+ },
+ 0x23DF: // horizontal brace up
+ {
+ dir: H, HW: [],
+ stretch: {min:.9, left:[0xE152,SIZE4], mid:[[0xE151,0xE150],SIZE4], right:[0xE153,SIZE4], rep:[0xE154,SIZE4]}
+ },
+ 0x27E8: // \langle
+ {
+ dir: V, HW: [[1,MAIN],[1.2,SIZE1],[1.8,SIZE2],[2.4,SIZE3],[3.0,SIZE4]]
+ },
+ 0x27E9: // \rangle
+ {
+ dir: V, HW: [[1,MAIN],[1.2,SIZE1],[1.8,SIZE2],[2.4,SIZE3],[3.0,SIZE4]]
+ },
+ 0x27EE: // \lgroup
+ {
+ dir: V, HW: [[.989,MAIN]],
+ stretch: {top:[0x23A7,SIZE4], ext:[0x23AA,SIZE4], bot:[0x23A9,SIZE4]}
+ },
+ 0x27EF: // \rgroup
+ {
+ dir: V, HW: [[.989,MAIN]],
+ stretch: {top:[0x23AB,SIZE4], ext:[0x23AA,SIZE4], bot:[0x23AD,SIZE4]}
+ },
+ 0x002D: {alias: 0x2212, dir:H}, // minus
+ 0x005E: {alias: 0x02C6, dir:H}, // wide hat
+ 0x005F: {alias: 0x2013, dir:H}, // low line
+ 0x007E: {alias: 0x02DC, dir:H}, // wide tilde
+ 0x02C9: {alias: 0x00AF, dir:H}, // macron
+ 0x0302: {alias: 0x02C6, dir:H}, // wide hat
+ 0x0303: {alias: 0x02DC, dir:H}, // wide tilde
+ 0x030C: {alias: 0x02C7, dir:H}, // wide caron
+ 0x0332: {alias: 0x2013, dir:H}, // combining low line
+ 0x2014: {alias: 0x2013, dir:H}, // em-dash
+ 0x2015: {alias: 0x2013, dir:H}, // horizontal line
+ 0x2017: {alias: 0x2013, dir:H}, // horizontal line
+ 0x203E: {alias: 0x00AF, dir:H}, // overline
+ 0x20D7: {alias: 0x2192, dir:H}, // combining over right arrow (vector arrow)
+ 0x2215: {alias: 0x002F, dir:V}, // division slash
+ 0x2329: {alias: 0x27E8, dir:V}, // langle
+ 0x232A: {alias: 0x27E9, dir:V}, // rangle
+ 0x23AF: {alias: 0x2013, dir:H}, // horizontal line extension
+ 0x2500: {alias: 0x2013, dir:H}, // horizontal line
+ 0x2758: {alias: 0x2223, dir:V}, // vertical separator
+ 0x3008: {alias: 0x27E8, dir:V}, // langle
+ 0x3009: {alias: 0x27E9, dir:V}, // rangle
+ 0xFE37: {alias: 0x23DE, dir:H}, // horizontal brace down
+ 0xFE38: {alias: 0x23DF, dir:H}, // horizontal brace up
+
+ 0x003D: EXTRAH, // equal sign
+ 0x219E: EXTRAH, // left two-headed arrow
+ 0x21A0: EXTRAH, // right two-headed arrow
+ 0x21A4: EXTRAH, // left arrow from bar
+ 0x21A5: EXTRAV, // up arrow from bar
+ 0x21A6: EXTRAH, // right arrow from bar
+ 0x21A7: EXTRAV, // down arrow from bar
+ 0x21B0: EXTRAV, // up arrow with top leftwards
+ 0x21B1: EXTRAV, // up arrow with top right
+ 0x21BC: EXTRAH, // left harpoon with barb up
+ 0x21BD: EXTRAH, // left harpoon with barb down
+ 0x21BE: EXTRAV, // up harpoon with barb right
+ 0x21BF: EXTRAV, // up harpoon with barb left
+ 0x21C0: EXTRAH, // right harpoon with barb up
+ 0x21C1: EXTRAH, // right harpoon with barb down
+ 0x21C2: EXTRAV, // down harpoon with barb right
+ 0x21C3: EXTRAV, // down harpoon with barb left
+ 0x21DA: EXTRAH, // left triple arrow
+ 0x21DB: EXTRAH, // right triple arrow
+ 0x23B4: EXTRAH, // top square bracket
+ 0x23B5: EXTRAH, // bottom square bracket
+ 0x23DC: EXTRAH, // top paren
+ 0x23DD: EXTRAH, // bottom paren
+ 0x23E0: EXTRAH, // top tortoise shell
+ 0x23E1: EXTRAH, // bottom tortoise shell
+ 0x2906: EXTRAH, // leftwards double arrow from bar
+ 0x2907: EXTRAH, // rightwards double arrow from bar
+ 0x294E: EXTRAH, // left barb up right barb up harpoon
+ 0x294F: EXTRAV, // up barb right down barb right harpoon
+ 0x2950: EXTRAH, // left barb dow right barb down harpoon
+ 0x2951: EXTRAV, // up barb left down barb left harpoon
+ 0x295A: EXTRAH, // leftwards harpoon with barb up from bar
+ 0x295B: EXTRAH, // rightwards harpoon with barb up from bar
+ 0x295C: EXTRAV, // up harpoon with barb right from bar
+ 0x295D: EXTRAV, // down harpoon with barb right from bar
+ 0x295E: EXTRAH, // leftwards harpoon with barb down from bar
+ 0x295F: EXTRAH, // rightwards harpoon with barb down from bar
+ 0x2960: EXTRAV, // up harpoon with barb left from bar
+ 0x2961: EXTRAV, // down harpoon with barb left from bar
+ 0x2312: {alias: 0x23DC, dir:H}, // arc
+ 0x2322: {alias: 0x23DC, dir:H}, // frown
+ 0x2323: {alias: 0x23DD, dir:H}, // smile
+ 0x27F5: {alias: 0x2190, dir:H}, // long left arrow
+ 0x27F6: {alias: 0x2192, dir:H}, // long right arrow
+ 0x27F7: {alias: 0x2194, dir:H}, // long left-right arrow
+ 0x27F8: {alias: 0x21D0, dir:H}, // long left double arrow
+ 0x27F9: {alias: 0x21D2, dir:H}, // long right double arrow
+ 0x27FA: {alias: 0x21D4, dir:H}, // long left-right double arrow
+ 0x27FB: {alias: 0x21A4, dir:H}, // long left arrow from bar
+ 0x27FC: {alias: 0x21A6, dir:H}, // long right arrow from bar
+ 0x27FD: {alias: 0x2906, dir:H}, // long left double arrow from bar
+ 0x27FE: {alias: 0x2907, dir:H}, // long right double arrow from bar
+ 0xE160: {alias: 0x2190, dir:H}, // replacement vector arrow
+ }
+ };
+
+ CHTML.FONTDATA = CHTML.FONTDEF["TeX"];
+
+ CHTML.FONTDATA.FONTS['MathJax_Caligraphic'] = {
+ centerline: 287, ascent: 789, descent: 216,
+ skew: {
+ 0x41: 0.194,
+ 0x42: 0.139,
+ 0x43: 0.139,
+ 0x44: 0.0833,
+ 0x45: 0.111,
+ 0x46: 0.111,
+ 0x47: 0.111,
+ 0x48: 0.111,
+ 0x49: 0.0278,
+ 0x4A: 0.167,
+ 0x4B: 0.0556,
+ 0x4C: 0.139,
+ 0x4D: 0.139,
+ 0x4E: 0.0833,
+ 0x4F: 0.111,
+ 0x50: 0.0833,
+ 0x51: 0.111,
+ 0x52: 0.0833,
+ 0x53: 0.139,
+ 0x54: 0.0278,
+ 0x55: 0.0833,
+ 0x56: 0.0278,
+ 0x57: 0.0833,
+ 0x58: 0.139,
+ 0x59: 0.0833,
+ 0x5A: 0.139
+ },
+ 0x20: [0,0,250,0,0], // SPACE
+ 0x30: [452,22,500,39,460], // DIGIT ZERO
+ 0x31: [453,0,500,86,426], // DIGIT ONE
+ 0x32: [453,0,500,44,449], // DIGIT TWO
+ 0x33: [452,216,500,42,456], // DIGIT THREE
+ 0x34: [464,194,500,28,471], // DIGIT FOUR
+ 0x35: [453,216,500,50,448], // DIGIT FIVE
+ 0x36: [665,22,500,42,456], // DIGIT SIX
+ 0x37: [463,216,500,55,485], // DIGIT SEVEN
+ 0x38: [666,21,500,43,456], // DIGIT EIGHT
+ 0x39: [453,216,500,42,457], // DIGIT NINE
+ 0x41: [728,50,798,30,819], // LATIN CAPITAL LETTER A
+ 0x42: [705,22,657,32,664], // LATIN CAPITAL LETTER B
+ 0x43: [705,25,527,12,533], // LATIN CAPITAL LETTER C
+ 0x44: [683,0,771,19,766], // LATIN CAPITAL LETTER D
+ 0x45: [705,22,528,30,564], // LATIN CAPITAL LETTER E
+ 0x46: [683,32,719,18,829], // LATIN CAPITAL LETTER F
+ 0x47: [704,119,595,44,599], // LATIN CAPITAL LETTER G
+ 0x48: [683,48,845,18,803], // LATIN CAPITAL LETTER H
+ 0x49: [683,0,545,-30,642], // LATIN CAPITAL LETTER I
+ 0x4A: [683,119,678,47,839], // LATIN CAPITAL LETTER J
+ 0x4B: [705,22,762,32,732], // LATIN CAPITAL LETTER K
+ 0x4C: [705,22,690,32,656], // LATIN CAPITAL LETTER L
+ 0x4D: [705,50,1201,28,1137], // LATIN CAPITAL LETTER M
+ 0x4E: [789,50,820,-27,979], // LATIN CAPITAL LETTER N
+ 0x4F: [705,22,796,58,777], // LATIN CAPITAL LETTER O
+ 0x50: [683,57,696,19,733], // LATIN CAPITAL LETTER P
+ 0x51: [705,131,817,114,787], // LATIN CAPITAL LETTER Q
+ 0x52: [682,22,848,19,837], // LATIN CAPITAL LETTER R
+ 0x53: [705,22,606,18,642], // LATIN CAPITAL LETTER S
+ 0x54: [717,68,545,34,833], // LATIN CAPITAL LETTER T
+ 0x55: [683,28,626,-17,687], // LATIN CAPITAL LETTER U
+ 0x56: [683,52,613,25,658], // LATIN CAPITAL LETTER V
+ 0x57: [683,53,988,25,1034], // LATIN CAPITAL LETTER W
+ 0x58: [683,0,713,52,807], // LATIN CAPITAL LETTER X
+ 0x59: [683,143,668,31,714], // LATIN CAPITAL LETTER Y
+ 0x5A: [683,0,725,37,767], // LATIN CAPITAL LETTER Z
+ 0xA0: [0,0,250,0,0] // NO-BREAK SPACE
+ };
+
+ CHTML.FONTDATA.FONTS['MathJax_Main-Bold'] = {
+ centerline: 342, ascent: 951, descent: 267,
+ weight: 'bold',
+ file: "TeX/Main-Bold.js",
+ Extra: [
+ 0xA0, 0xA8, 0xAC, [0xAF,0xB1], 0xB4, 0xD7, 0xF7,
+ 0x131, 0x237,
+ [0x2C6,0x2CB],[0x2D8,0x2DC],
+ [0x300,0x30C], 0x338,
+ [0x2002,0x2006], 0x2009, 0x200A, 0x2013, 0x2014, 0x2018, 0x2019,
+ 0x201C, 0x201D, 0x2020, 0x2021, 0x2026, 0x2032,
+ 0x20D7,
+ [0x210F,0x2113], 0x2118, 0x211C, 0x2135,
+ [0x2190,0x2199], 0x21A6, 0x21A9, 0x21AA, 0x21BC, 0x21BD, 0x21C0,
+ 0x21C1, 0x21CC, [0x21D0,0x21D5],
+ [0x2200,0x220B], [0x2212,0x221A], [0x221D,0x2220],
+ [0x2223,0x223C], 0x2240, 0x2243, 0x2245, 0x2248, 0x224D, 0x2250,
+ 0x2260, 0x2261, 0x2264, 0x2265, 0x226A, 0x226B, 0x227A, 0x227B,
+ 0x2282, 0x2283, 0x2286, 0x2287, 0x228E, [0x2291,0x2299],
+ [0x22A2,0x22A5], 0x22A8, [0x22C4,0x22C8], [0x22EE,0x22F1],
+ [0x2308,0x230B], 0x2322, 0x2323,
+ 0x25B3, 0x25B9, 0x25BD, 0x25C3, 0x25EF,
+ [0x2660,0x2663], [0x266D,0x266F],
+ 0x27E8, 0x27E9,
+ [0x27F5,0x27FC],
+ 0x2A3F, 0x2AAF, 0x2AB0
+ ],
+ skew: {
+ 0x131: 0.0319,
+ 0x237: 0.0958,
+ 0x210F: -0.0319,
+ 0x2113: 0.128,
+ 0x2202: 0.0958
+ },
+ 0x20: [0,0,250,0,0], // SPACE
+ 0x21: [705,-1,350,89,260], // EXCLAMATION MARK
+ 0x22: [694,-329,603,38,492], // QUOTATION MARK
+ 0x23: [694,193,958,64,893], // NUMBER SIGN
+ 0x24: [750,56,575,64,510], // DOLLAR SIGN
+ 0x25: [750,56,958,65,893], // PERCENT SIGN
+ 0x26: [705,11,894,48,836], // AMPERSAND
+ 0x27: [694,-329,319,74,261], // APOSTROPHE
+ 0x28: [750,249,447,103,382], // LEFT PARENTHESIS
+ 0x29: [750,249,447,64,343], // RIGHT PARENTHESIS
+ 0x2A: [750,-306,575,73,501], // ASTERISK
+ 0x2B: [633,131,894,64,829], // PLUS SIGN
+ 0x2C: [171,194,319,74,258], // COMMA
+ 0x2D: [278,-166,383,13,318], // HYPHEN-MINUS
+ 0x2E: [171,-1,319,74,245], // FULL STOP
+ 0x2F: [750,250,575,63,511], // SOLIDUS
+ 0x30: [654,10,575,45,529], // DIGIT ZERO
+ 0x31: [655,0,575,80,494], // DIGIT ONE
+ 0x32: [654,0,575,57,517], // DIGIT TWO
+ 0x33: [655,11,575,47,526], // DIGIT THREE
+ 0x34: [656,0,575,32,542], // DIGIT FOUR
+ 0x35: [655,11,575,57,517], // DIGIT FIVE
+ 0x36: [655,11,575,48,526], // DIGIT SIX
+ 0x37: [676,11,575,64,558], // DIGIT SEVEN
+ 0x38: [654,11,575,48,526], // DIGIT EIGHT
+ 0x39: [654,11,575,48,526], // DIGIT NINE
+ 0x3A: [444,-1,319,74,245], // COLON
+ 0x3B: [444,194,319,74,248], // SEMICOLON
+ 0x3C: [587,85,894,96,797], // LESS-THAN SIGN
+ 0x3D: [393,-109,894,64,829], // EQUALS SIGN
+ 0x3E: [587,85,894,96,797], // GREATER-THAN SIGN
+ 0x3F: [700,-1,543,65,478], // QUESTION MARK
+ 0x40: [699,6,894,64,829], // COMMERCIAL AT
+ 0x41: [698,0,869,40,828], // LATIN CAPITAL LETTER A
+ 0x42: [686,0,818,39,752], // LATIN CAPITAL LETTER B
+ 0x43: [697,11,831,64,766], // LATIN CAPITAL LETTER C
+ 0x44: [686,0,882,39,817], // LATIN CAPITAL LETTER D
+ 0x45: [680,0,756,39,723], // LATIN CAPITAL LETTER E
+ 0x46: [680,0,724,39,675], // LATIN CAPITAL LETTER F
+ 0x47: [697,10,904,64,845], // LATIN CAPITAL LETTER G
+ 0x48: [686,0,900,39,860], // LATIN CAPITAL LETTER H
+ 0x49: [686,0,436,25,410], // LATIN CAPITAL LETTER I
+ 0x4A: [686,11,594,8,527], // LATIN CAPITAL LETTER J
+ 0x4B: [686,0,901,39,852], // LATIN CAPITAL LETTER K
+ 0x4C: [686,0,692,39,643], // LATIN CAPITAL LETTER L
+ 0x4D: [686,0,1092,39,1052], // LATIN CAPITAL LETTER M
+ 0x4E: [686,0,900,39,860], // LATIN CAPITAL LETTER N
+ 0x4F: [696,10,864,64,798], // LATIN CAPITAL LETTER O
+ 0x50: [686,0,786,39,721], // LATIN CAPITAL LETTER P
+ 0x51: [696,193,864,64,805], // LATIN CAPITAL LETTER Q
+ 0x52: [686,11,862,39,858], // LATIN CAPITAL LETTER R
+ 0x53: [697,11,639,64,574], // LATIN CAPITAL LETTER S
+ 0x54: [675,0,800,41,758], // LATIN CAPITAL LETTER T
+ 0x55: [686,11,885,39,845], // LATIN CAPITAL LETTER U
+ 0x56: [686,7,869,25,843], // LATIN CAPITAL LETTER V
+ 0x57: [686,7,1189,24,1164], // LATIN CAPITAL LETTER W
+ 0x58: [686,0,869,33,835], // LATIN CAPITAL LETTER X
+ 0x59: [686,0,869,19,849], // LATIN CAPITAL LETTER Y
+ 0x5A: [686,0,703,64,645], // LATIN CAPITAL LETTER Z
+ 0x5B: [750,250,319,128,293], // LEFT SQUARE BRACKET
+ 0x5C: [750,250,575,63,511], // REVERSE SOLIDUS
+ 0x5D: [750,250,319,25,190], // RIGHT SQUARE BRACKET
+ 0x5E: [694,-520,575,126,448], // CIRCUMFLEX ACCENT
+ 0x5F: [-10,61,575,0,574], // LOW LINE
+ 0x60: [706,-503,575,114,338], // GRAVE ACCENT
+ 0x61: [453,6,559,32,558], // LATIN SMALL LETTER A
+ 0x62: [694,6,639,29,600], // LATIN SMALL LETTER B
+ 0x63: [453,6,511,39,478], // LATIN SMALL LETTER C
+ 0x64: [694,6,639,38,609], // LATIN SMALL LETTER D
+ 0x65: [452,6,527,32,494], // LATIN SMALL LETTER E
+ 0x66: [700,0,351,40,452], // LATIN SMALL LETTER F
+ 0x67: [455,201,575,30,558], // LATIN SMALL LETTER G
+ 0x68: [694,0,639,37,623], // LATIN SMALL LETTER H
+ 0x69: [695,0,319,40,294], // LATIN SMALL LETTER I
+ 0x6A: [695,200,351,-71,274], // LATIN SMALL LETTER J
+ 0x6B: [694,0,607,29,587], // LATIN SMALL LETTER K
+ 0x6C: [694,0,319,40,301], // LATIN SMALL LETTER L
+ 0x6D: [450,0,958,37,942], // LATIN SMALL LETTER M
+ 0x6E: [450,0,639,37,623], // LATIN SMALL LETTER N
+ 0x6F: [452,5,575,32,542], // LATIN SMALL LETTER O
+ 0x70: [450,194,639,29,600], // LATIN SMALL LETTER P
+ 0x71: [450,194,607,38,609], // LATIN SMALL LETTER Q
+ 0x72: [450,0,474,29,442], // LATIN SMALL LETTER R
+ 0x73: [453,6,454,38,414], // LATIN SMALL LETTER S
+ 0x74: [635,5,447,21,382], // LATIN SMALL LETTER T
+ 0x75: [450,6,639,37,623], // LATIN SMALL LETTER U
+ 0x76: [444,3,607,26,580], // LATIN SMALL LETTER V
+ 0x77: [444,4,831,25,805], // LATIN SMALL LETTER W
+ 0x78: [444,0,607,21,586], // LATIN SMALL LETTER X
+ 0x79: [444,200,607,23,580], // LATIN SMALL LETTER Y
+ 0x7A: [444,0,511,32,462], // LATIN SMALL LETTER Z
+ 0x7B: [750,250,575,70,504], // LEFT CURLY BRACKET
+ 0x7C: [750,249,319,129,190], // VERTICAL LINE
+ 0x7D: [750,250,575,70,504], // RIGHT CURLY BRACKET
+ 0x7E: [344,-202,575,96,478], // TILDE
+ 0x393: [680,0,692,39,643], // GREEK CAPITAL LETTER GAMMA
+ 0x394: [698,0,958,56,901], // GREEK CAPITAL LETTER DELTA
+ 0x398: [696,10,894,64,829], // GREEK CAPITAL LETTER THETA
+ 0x39B: [698,0,806,40,765], // GREEK CAPITAL LETTER LAMDA
+ 0x39E: [675,0,767,48,718], // GREEK CAPITAL LETTER XI
+ 0x3A0: [680,0,900,39,860], // GREEK CAPITAL LETTER PI
+ 0x3A3: [686,0,831,63,766], // GREEK CAPITAL LETTER SIGMA
+ 0x3A5: [697,0,894,64,829], // GREEK CAPITAL LETTER UPSILON
+ 0x3A6: [686,0,831,64,766], // GREEK CAPITAL LETTER PHI
+ 0x3A8: [686,0,894,64,829], // GREEK CAPITAL LETTER PSI
+ 0x3A9: [696,0,831,51,779] // GREEK CAPITAL LETTER OMEGA
+ };
+
+ CHTML.FONTDATA.FONTS['MathJax_Main-Italic'] = {
+ centerline: 250, ascent: 750, descent: 250,
+ style: 'italic',
+ 0x20: [0,0,250,0,0], // SPACE
+ 0x21: [716,0,307,107,380], // EXCLAMATION MARK
+ 0x22: [694,-379,514,176,538], // QUOTATION MARK
+ 0x23: [694,194,818,115,828], // NUMBER SIGN
+ 0x25: [750,56,818,145,847], // PERCENT SIGN
+ 0x26: [716,22,767,127,802], // AMPERSAND
+ 0x27: [694,-379,307,213,377], // APOSTROPHE
+ 0x28: [750,250,409,144,517], // LEFT PARENTHESIS
+ 0x29: [750,250,409,17,390], // RIGHT PARENTHESIS
+ 0x2A: [750,-320,511,195,584], // ASTERISK
+ 0x2B: [557,57,767,139,753], // PLUS SIGN
+ 0x2C: [121,194,307,69,232], // COMMA
+ 0x2D: [251,-180,358,84,341], // HYPHEN-MINUS
+ 0x2E: [121,0,307,107,231], // FULL STOP
+ 0x2F: [750,250,511,19,617], // SOLIDUS
+ 0x30: [665,21,511,110,562], // DIGIT ZERO
+ 0x31: [666,0,511,110,468], // DIGIT ONE
+ 0x32: [666,22,511,76,551], // DIGIT TWO
+ 0x33: [666,22,511,96,562], // DIGIT THREE
+ 0x34: [666,194,511,46,478], // DIGIT FOUR
+ 0x35: [666,22,511,106,567], // DIGIT FIVE
+ 0x36: [665,22,511,120,565], // DIGIT SIX
+ 0x37: [666,22,511,136,634], // DIGIT SEVEN
+ 0x38: [666,21,511,99,553], // DIGIT EIGHT
+ 0x39: [666,22,511,107,553], // DIGIT NINE
+ 0x3A: [431,0,307,107,308], // COLON
+ 0x3B: [431,194,307,70,308], // SEMICOLON
+ 0x3D: [367,-133,767,116,776], // EQUALS SIGN
+ 0x3F: [716,0,511,195,551], // QUESTION MARK
+ 0x40: [705,11,767,152,789], // COMMERCIAL AT
+ 0x41: [716,0,743,58,696], // LATIN CAPITAL LETTER A
+ 0x42: [683,0,704,57,732], // LATIN CAPITAL LETTER B
+ 0x43: [705,21,716,150,812], // LATIN CAPITAL LETTER C
+ 0x44: [683,0,755,56,775], // LATIN CAPITAL LETTER D
+ 0x45: [680,0,678,54,743], // LATIN CAPITAL LETTER E
+ 0x46: [680,-1,653,54,731], // LATIN CAPITAL LETTER F
+ 0x47: [705,22,774,150,812], // LATIN CAPITAL LETTER G
+ 0x48: [683,0,743,54,860], // LATIN CAPITAL LETTER H
+ 0x49: [683,0,386,49,508], // LATIN CAPITAL LETTER I
+ 0x4A: [683,21,525,78,622], // LATIN CAPITAL LETTER J
+ 0x4B: [683,0,769,54,859], // LATIN CAPITAL LETTER K
+ 0x4C: [683,0,627,54,628], // LATIN CAPITAL LETTER L
+ 0x4D: [683,0,897,58,1010], // LATIN CAPITAL LETTER M
+ 0x4E: [683,0,743,54,860], // LATIN CAPITAL LETTER N
+ 0x4F: [704,22,767,149,788], // LATIN CAPITAL LETTER O
+ 0x50: [683,0,678,55,729], // LATIN CAPITAL LETTER P
+ 0x51: [704,194,767,149,788], // LATIN CAPITAL LETTER Q
+ 0x52: [683,22,729,55,723], // LATIN CAPITAL LETTER R
+ 0x53: [705,22,562,74,633], // LATIN CAPITAL LETTER S
+ 0x54: [677,0,716,171,806], // LATIN CAPITAL LETTER T
+ 0x55: [683,22,743,194,860], // LATIN CAPITAL LETTER U
+ 0x56: [683,22,743,205,868], // LATIN CAPITAL LETTER V
+ 0x57: [683,22,999,205,1124], // LATIN CAPITAL LETTER W
+ 0x58: [683,0,743,50,825], // LATIN CAPITAL LETTER X
+ 0x59: [683,0,743,198,875], // LATIN CAPITAL LETTER Y
+ 0x5A: [683,0,613,80,704], // LATIN CAPITAL LETTER Z
+ 0x5B: [750,250,307,73,446], // LEFT SQUARE BRACKET
+ 0x5D: [750,250,307,-14,359], // RIGHT SQUARE BRACKET
+ 0x5E: [694,-527,511,260,528], // CIRCUMFLEX ACCENT
+ 0x5F: [-25,62,511,91,554], // LOW LINE
+ 0x61: [442,11,511,101,543], // LATIN SMALL LETTER A
+ 0x62: [694,11,460,108,467], // LATIN SMALL LETTER B
+ 0x63: [441,10,460,103,469], // LATIN SMALL LETTER C
+ 0x64: [694,11,511,101,567], // LATIN SMALL LETTER D
+ 0x65: [442,10,460,107,470], // LATIN SMALL LETTER E
+ 0x66: [705,204,307,-23,450], // LATIN SMALL LETTER F
+ 0x67: [442,205,460,46,494], // LATIN SMALL LETTER G
+ 0x68: [694,11,511,69,544], // LATIN SMALL LETTER H
+ 0x69: [656,10,307,75,340], // LATIN SMALL LETTER I
+ 0x6A: [656,204,307,-32,364], // LATIN SMALL LETTER J
+ 0x6B: [694,11,460,69,498], // LATIN SMALL LETTER K
+ 0x6C: [694,11,256,87,312], // LATIN SMALL LETTER L
+ 0x6D: [442,11,818,75,851], // LATIN SMALL LETTER M
+ 0x6E: [442,11,562,75,595], // LATIN SMALL LETTER N
+ 0x6F: [442,11,511,103,517], // LATIN SMALL LETTER O
+ 0x70: [442,194,511,6,518], // LATIN SMALL LETTER P
+ 0x71: [442,194,460,101,504], // LATIN SMALL LETTER Q
+ 0x72: [442,11,422,75,484], // LATIN SMALL LETTER R
+ 0x73: [442,11,409,76,418], // LATIN SMALL LETTER S
+ 0x74: [626,11,332,87,373], // LATIN SMALL LETTER T
+ 0x75: [441,11,537,75,570], // LATIN SMALL LETTER U
+ 0x76: [443,10,460,75,492], // LATIN SMALL LETTER V
+ 0x77: [443,11,664,75,696], // LATIN SMALL LETTER W
+ 0x78: [442,11,464,58,513], // LATIN SMALL LETTER X
+ 0x79: [441,205,486,75,522], // LATIN SMALL LETTER Y
+ 0x7A: [442,11,409,54,466], // LATIN SMALL LETTER Z
+ 0x7E: [318,-208,511,246,571], // TILDE
+ 0xA0: [0,0,250,0,0], // NO-BREAK SPACE
+ 0xA3: [714,11,769,88,699], // POUND SIGN
+ 0x131: [441,10,307,75,340], // LATIN SMALL LETTER DOTLESS I
+ 0x237: [442,204,332,-32,327], // LATIN SMALL LETTER DOTLESS J
+ 0x300: [697,-500,0,-222,-74], // COMBINING GRAVE ACCENT
+ 0x301: [697,-500,0,-173,39], // COMBINING ACUTE ACCENT
+ 0x302: [694,-527,0,-251,17], // COMBINING CIRCUMFLEX ACCENT
+ 0x303: [668,-558,0,-265,60], // COMBINING TILDE
+ 0x304: [589,-544,0,-282,54], // COMBINING MACRON
+ 0x306: [694,-515,0,-237,62], // COMBINING BREVE
+ 0x307: [669,-548,0,-165,-41], // COMBINING DOT ABOVE
+ 0x308: [669,-554,0,-251,45], // COMBINING DIAERESIS
+ 0x30A: [716,-542,0,-199,3], // COMBINING RING ABOVE
+ 0x30B: [697,-503,0,-248,65], // COMBINING DOUBLE ACUTE ACCENT
+ 0x30C: [638,-502,0,-236,29], // COMBINING CARON
+ 0x393: [680,0,627,54,705], // GREEK CAPITAL LETTER GAMMA
+ 0x394: [716,0,818,70,751], // GREEK CAPITAL LETTER DELTA
+ 0x398: [704,22,767,149,788], // GREEK CAPITAL LETTER THETA
+ 0x39B: [716,0,692,58,646], // GREEK CAPITAL LETTER LAMDA
+ 0x39E: [677,0,664,74,754], // GREEK CAPITAL LETTER XI
+ 0x3A0: [680,0,743,54,859], // GREEK CAPITAL LETTER PI
+ 0x3A3: [683,0,716,80,782], // GREEK CAPITAL LETTER SIGMA
+ 0x3A5: [705,0,767,213,832], // GREEK CAPITAL LETTER UPSILON
+ 0x3A6: [683,0,716,159,728], // GREEK CAPITAL LETTER PHI
+ 0x3A8: [683,0,767,207,824], // GREEK CAPITAL LETTER PSI
+ 0x3A9: [705,0,716,100,759], // GREEK CAPITAL LETTER OMEGA
+ 0x2013: [285,-248,511,91,554], // EN DASH
+ 0x2014: [285,-248,1022,117,1038], // EM DASH
+ 0x2018: [694,-379,307,197,362], // LEFT SINGLE QUOTATION MARK
+ 0x2019: [694,-379,307,213,377], // RIGHT SINGLE QUOTATION MARK
+ 0x201C: [694,-379,514,243,606], // LEFT DOUBLE QUOTATION MARK
+ 0x201D: [694,-379,514,176,538], // RIGHT DOUBLE QUOTATION MARK
+ 0x210F: [695,13,540,42,562] // stix-/hbar - Planck's over 2pi
+ };
+
+ CHTML.FONTDATA.FONTS['MathJax_Main'] = {
+ centerline: 314, ascent: 900, descent: 272,
+ skew: {
+ 0x131: 0.0278,
+ 0x237: 0.0833,
+ 0x2113: 0.111,
+ 0x2118: 0.111,
+ 0x2202: 0.0833
+ },
+ 0x20: [0,0,250,0,0], // SPACE
+ 0x21: [716,-1,278,78,199], // EXCLAMATION MARK
+ 0x22: [694,-379,500,34,372], // QUOTATION MARK
+ 0x23: [694,194,833,56,777], // NUMBER SIGN
+ 0x24: [750,56,500,55,444], // DOLLAR SIGN
+ 0x25: [750,56,833,56,776], // PERCENT SIGN
+ 0x26: [716,22,778,42,727], // AMPERSAND
+ 0x27: [694,-379,278,78,212], // APOSTROPHE
+ 0x28: [750,250,389,94,333], // LEFT PARENTHESIS
+ 0x29: [750,250,389,55,294], // RIGHT PARENTHESIS
+ 0x2A: [750,-320,500,64,435], // ASTERISK
+ 0x2B: [583,82,778,56,722], // PLUS SIGN
+ 0x2C: [121,194,278,78,210], // COMMA
+ 0x2D: [252,-179,333,11,277], // HYPHEN-MINUS
+ 0x2E: [120,0,278,78,199], // FULL STOP
+ 0x2F: [750,250,500,56,445], // SOLIDUS
+ 0x30: [666,22,500,39,460], // DIGIT ZERO
+ 0x31: [666,0,500,83,427], // DIGIT ONE
+ 0x32: [666,0,500,50,449], // DIGIT TWO
+ 0x33: [665,22,500,42,457], // DIGIT THREE
+ 0x34: [677,0,500,28,471], // DIGIT FOUR
+ 0x35: [666,22,500,50,449], // DIGIT FIVE
+ 0x36: [666,22,500,42,456], // DIGIT SIX
+ 0x37: [676,22,500,55,485], // DIGIT SEVEN
+ 0x38: [666,22,500,43,457], // DIGIT EIGHT
+ 0x39: [666,22,500,42,456], // DIGIT NINE
+ 0x3A: [430,0,278,78,199], // COLON
+ 0x3B: [430,194,278,78,202], // SEMICOLON
+ 0x3C: [540,40,778,83,694], // LESS-THAN SIGN
+ 0x3D: [367,-133,778,56,722], // EQUALS SIGN
+ 0x3E: [540,40,778,83,694], // GREATER-THAN SIGN
+ 0x3F: [705,-1,472,55,416], // QUESTION MARK
+ 0x40: [705,11,778,56,722], // COMMERCIAL AT
+ 0x41: [716,0,750,32,717], // LATIN CAPITAL LETTER A
+ 0x42: [683,0,708,28,651], // LATIN CAPITAL LETTER B
+ 0x43: [705,21,722,56,666], // LATIN CAPITAL LETTER C
+ 0x44: [683,0,764,27,708], // LATIN CAPITAL LETTER D
+ 0x45: [680,0,681,25,652], // LATIN CAPITAL LETTER E
+ 0x46: [680,0,653,25,610], // LATIN CAPITAL LETTER F
+ 0x47: [705,22,785,56,735], // LATIN CAPITAL LETTER G
+ 0x48: [683,0,750,25,724], // LATIN CAPITAL LETTER H
+ 0x49: [683,0,361,21,339], // LATIN CAPITAL LETTER I
+ 0x4A: [683,22,514,25,465], // LATIN CAPITAL LETTER J
+ 0x4B: [683,0,778,25,736], // LATIN CAPITAL LETTER K
+ 0x4C: [683,0,625,25,582], // LATIN CAPITAL LETTER L
+ 0x4D: [683,0,917,29,887], // LATIN CAPITAL LETTER M
+ 0x4E: [683,0,750,25,724], // LATIN CAPITAL LETTER N
+ 0x4F: [705,22,778,56,722], // LATIN CAPITAL LETTER O
+ 0x50: [683,0,681,27,624], // LATIN CAPITAL LETTER P
+ 0x51: [705,193,778,56,728], // LATIN CAPITAL LETTER Q
+ 0x52: [683,22,736,27,732], // LATIN CAPITAL LETTER R
+ 0x53: [705,22,556,55,500], // LATIN CAPITAL LETTER S
+ 0x54: [677,0,722,36,685], // LATIN CAPITAL LETTER T
+ 0x55: [683,22,750,25,724], // LATIN CAPITAL LETTER U
+ 0x56: [683,22,750,19,730], // LATIN CAPITAL LETTER V
+ 0x57: [683,22,1028,18,1009], // LATIN CAPITAL LETTER W
+ 0x58: [683,0,750,23,726], // LATIN CAPITAL LETTER X
+ 0x59: [683,0,750,11,738], // LATIN CAPITAL LETTER Y
+ 0x5A: [683,0,611,55,560], // LATIN CAPITAL LETTER Z
+ 0x5B: [750,250,278,118,255], // LEFT SQUARE BRACKET
+ 0x5C: [750,250,500,56,444], // REVERSE SOLIDUS
+ 0x5D: [750,250,278,22,159], // RIGHT SQUARE BRACKET
+ 0x5E: [694,-531,500,112,387], // CIRCUMFLEX ACCENT
+ 0x5F: [-25,62,500,0,499], // LOW LINE
+ 0x60: [699,-505,500,106,295], // GRAVE ACCENT
+ 0x61: [448,11,500,34,493], // LATIN SMALL LETTER A
+ 0x62: [694,11,556,20,522], // LATIN SMALL LETTER B
+ 0x63: [448,11,444,34,415], // LATIN SMALL LETTER C
+ 0x64: [694,11,556,34,535], // LATIN SMALL LETTER D
+ 0x65: [448,11,444,28,415], // LATIN SMALL LETTER E
+ 0x66: [705,0,306,26,372], // LATIN SMALL LETTER F
+ 0x67: [453,206,500,29,485], // LATIN SMALL LETTER G
+ 0x68: [694,0,556,25,542], // LATIN SMALL LETTER H
+ 0x69: [669,0,278,26,255], // LATIN SMALL LETTER I
+ 0x6A: [669,205,306,-55,218], // LATIN SMALL LETTER J
+ 0x6B: [694,0,528,20,511], // LATIN SMALL LETTER K
+ 0x6C: [694,0,278,26,263], // LATIN SMALL LETTER L
+ 0x6D: [442,0,833,25,819], // LATIN SMALL LETTER M
+ 0x6E: [442,0,556,25,542], // LATIN SMALL LETTER N
+ 0x6F: [448,10,500,28,471], // LATIN SMALL LETTER O
+ 0x70: [442,194,556,20,522], // LATIN SMALL LETTER P
+ 0x71: [442,194,528,33,535], // LATIN SMALL LETTER Q
+ 0x72: [442,0,392,20,364], // LATIN SMALL LETTER R
+ 0x73: [448,11,394,33,359], // LATIN SMALL LETTER S
+ 0x74: [615,10,389,18,333], // LATIN SMALL LETTER T
+ 0x75: [442,11,556,25,542], // LATIN SMALL LETTER U
+ 0x76: [431,11,528,19,508], // LATIN SMALL LETTER V
+ 0x77: [431,11,722,18,703], // LATIN SMALL LETTER W
+ 0x78: [431,0,528,11,516], // LATIN SMALL LETTER X
+ 0x79: [431,204,528,19,508], // LATIN SMALL LETTER Y
+ 0x7A: [431,0,444,28,401], // LATIN SMALL LETTER Z
+ 0x7B: [750,250,500,65,434], // LEFT CURLY BRACKET
+ 0x7C: [750,249,278,119,159], // VERTICAL LINE
+ 0x7D: [750,250,500,65,434], // RIGHT CURLY BRACKET
+ 0x7E: [318,-215,500,83,416], // TILDE
+ 0xA0: [0,0,250,0,0], // NO-BREAK SPACE
+ 0xA8: [669,-554,500,95,404], // DIAERESIS
+ 0xAC: [356,-89,667,56,611], // NOT SIGN
+ 0xAF: [590,-544,500,69,430], // MACRON
+ 0xB0: [715,-542,500,147,352], // DEGREE SIGN
+ 0xB1: [666,0,778,56,722], // PLUS-MINUS SIGN
+ 0xB4: [699,-505,500,203,393], // ACUTE ACCENT
+ 0xD7: [491,-9,778,147,630], // MULTIPLICATION SIGN
+ 0xF7: [537,36,778,56,721], // DIVISION SIGN
+ 0x131: [442,0,278,26,255], // LATIN SMALL LETTER DOTLESS I
+ 0x237: [442,205,306,-55,218], // LATIN SMALL LETTER DOTLESS J
+ 0x2C6: [694,-531,500,112,387], // MODIFIER LETTER CIRCUMFLEX ACCENT
+ 0x2C7: [644,-513,500,114,385], // CARON
+ 0x2C9: [590,-544,500,69,430], // MODIFIER LETTER MACRON
+ 0x2CA: [699,-505,500,203,393], // MODIFIER LETTER ACUTE ACCENT
+ 0x2CB: [699,-505,500,106,295], // MODIFIER LETTER GRAVE ACCENT
+ 0x2D8: [694,-515,500,92,407], // BREVE
+ 0x2D9: [669,-549,500,190,309], // DOT ABOVE
+ 0x2DC: [668,-565,500,83,416], // SMALL TILDE
+ 0x2DA: [715,-542,500,147,352], // RING ABOVE
+ 0x300: [699,-505,0,-394,-205], // COMBINING GRAVE ACCENT
+ 0x301: [699,-505,0,-297,-107], // COMBINING ACUTE ACCENT
+ 0x302: [694,-531,0,-388,-113], // COMBINING CIRCUMFLEX ACCENT
+ 0x303: [668,-565,0,-417,-84], // COMBINING TILDE
+ 0x304: [590,-544,0,-431,-70], // COMBINING MACRON
+ 0x306: [694,-515,0,-408,-93], // COMBINING BREVE
+ 0x307: [669,-549,0,-310,-191], // COMBINING DOT ABOVE
+ 0x308: [669,-554,0,-405,-96], // COMBINING DIAERESIS
+ 0x30A: [715,-542,0,-353,-148], // COMBINING RING ABOVE
+ 0x30B: [701,-510,0,-378,-80], // COMBINING DOUBLE ACUTE ACCENT
+ 0x30C: [644,-513,0,-386,-115], // COMBINING CARON
+ 0x338: [716,215,0,-639,-140], // COMBINING LONG SOLIDUS OVERLAY
+ 0x393: [680,0,625,25,582], // GREEK CAPITAL LETTER GAMMA
+ 0x394: [716,0,833,46,786], // GREEK CAPITAL LETTER DELTA
+ 0x398: [705,22,778,56,722], // GREEK CAPITAL LETTER THETA
+ 0x39B: [716,0,694,32,661], // GREEK CAPITAL LETTER LAMDA
+ 0x39E: [677,0,667,42,624], // GREEK CAPITAL LETTER XI
+ 0x3A0: [680,0,750,25,724], // GREEK CAPITAL LETTER PI
+ 0x3A3: [683,0,722,55,666], // GREEK CAPITAL LETTER SIGMA
+ 0x3A5: [705,0,778,55,722], // GREEK CAPITAL LETTER UPSILON
+ 0x3A6: [683,0,722,56,665], // GREEK CAPITAL LETTER PHI
+ 0x3A8: [683,0,778,55,722], // GREEK CAPITAL LETTER PSI
+ 0x3A9: [704,0,722,44,677], // GREEK CAPITAL LETTER OMEGA
+ 0x2002: [0,0,500,0,0], // ??
+ 0x2003: [0,0,999,0,0], // ??
+ 0x2004: [0,0,333,0,0], // ??
+ 0x2005: [0,0,250,0,0], // ??
+ 0x2006: [0,0,167,0,0], // ??
+ 0x2009: [0,0,167,0,0], // ??
+ 0x200A: [0,0,83,0,0], // ??
+ 0x2013: [285,-248,500,0,499], // EN DASH
+ 0x2014: [285,-248,1000,0,999], // EM DASH
+ 0x2018: [694,-379,278,64,198], // LEFT SINGLE QUOTATION MARK
+ 0x2019: [694,-379,278,78,212], // RIGHT SINGLE QUOTATION MARK
+ 0x201C: [694,-379,500,128,466], // LEFT DOUBLE QUOTATION MARK
+ 0x201D: [694,-379,500,34,372], // RIGHT DOUBLE QUOTATION MARK
+ 0x2020: [705,216,444,55,389], // DAGGER
+ 0x2021: [705,205,444,55,389], // DOUBLE DAGGER
+ 0x2026: [120,0,1172,78,1093], // HORIZONTAL ELLIPSIS
+ 0x2032: [560,-43,275,30,262], // PRIME
+ 0x20D7: [714,-516,0,-471,-29], // COMBINING RIGHT ARROW ABOVE
+ 0x210F: [695,13,540,42,562], // stix-/hbar - Planck's over 2pi
+ 0x2111: [705,10,722,55,693], // BLACK-LETTER CAPITAL I
+ 0x2113: [705,20,417,6,397], // SCRIPT SMALL L
+ 0x2118: [453,216,636,67,625], // SCRIPT CAPITAL P
+ 0x211C: [716,22,722,40,715], // BLACK-LETTER CAPITAL R
+ 0x2135: [694,0,611,55,555], // ALEF SYMBOL
+ 0x2190: [511,11,1000,55,944], // LEFTWARDS ARROW
+ 0x2191: [694,193,500,17,483], // UPWARDS ARROW
+ 0x2192: [511,11,1000,56,944], // RIGHTWARDS ARROW
+ 0x2193: [694,194,500,17,483], // DOWNWARDS ARROW
+ 0x2194: [511,11,1000,55,944], // LEFT RIGHT ARROW
+ 0x2195: [772,272,500,17,483], // UP DOWN ARROW
+ 0x2196: [720,195,1000,29,944], // NORTH WEST ARROW
+ 0x2197: [720,195,1000,55,970], // NORTH EAST ARROW
+ 0x2198: [695,220,1000,55,970], // SOUTH EAST ARROW
+ 0x2199: [695,220,1000,29,944], // SOUTH WEST ARROW
+ 0x21A6: [511,11,1000,55,944], // RIGHTWARDS ARROW FROM BAR
+ 0x21A9: [511,11,1126,55,1070], // LEFTWARDS ARROW WITH HOOK
+ 0x21AA: [511,11,1126,55,1070], // RIGHTWARDS ARROW WITH HOOK
+ 0x21BC: [511,-230,1000,55,944], // LEFTWARDS HARPOON WITH BARB UPWARDS
+ 0x21BD: [270,11,1000,55,944], // LEFTWARDS HARPOON WITH BARB DOWNWARDS
+ 0x21C0: [511,-230,1000,56,944], // RIGHTWARDS HARPOON WITH BARB UPWARDS
+ 0x21C1: [270,11,1000,56,944], // RIGHTWARDS HARPOON WITH BARB DOWNWARDS
+ 0x21CC: [671,11,1000,55,944], // RIGHTWARDS HARPOON OVER LEFTWARDS HARPOON
+ 0x21D0: [525,24,1000,56,944], // LEFTWARDS DOUBLE ARROW
+ 0x21D1: [694,194,611,31,579], // UPWARDS DOUBLE ARROW
+ 0x21D2: [525,24,1000,56,944], // RIGHTWARDS DOUBLE ARROW
+ 0x21D3: [694,194,611,31,579], // DOWNWARDS DOUBLE ARROW
+ 0x21D4: [526,25,1000,34,966], // LEFT RIGHT DOUBLE ARROW
+ 0x21D5: [772,272,611,31,579], // UP DOWN DOUBLE ARROW
+ 0x2200: [694,22,556,0,556], // FOR ALL
+ 0x2202: [715,22,531,42,566], // PARTIAL DIFFERENTIAL
+ 0x2203: [694,0,556,56,500], // THERE EXISTS
+ 0x2205: [772,78,500,39,460], // EMPTY SET
+ 0x2207: [683,33,833,46,786], // NABLA
+ 0x2208: [540,40,667,84,583], // ELEMENT OF
+ 0x2209: [716,215,667,84,583], // stix-negated (vert) set membership, variant
+ 0x220B: [540,40,667,83,582], // CONTAINS AS MEMBER
+ 0x2212: [270,-230,778,84,694], // MINUS SIGN
+ 0x2213: [500,166,778,56,722], // MINUS-OR-PLUS SIGN
+ 0x2215: [750,250,500,56,445], // DIVISION SLASH
+ 0x2216: [750,250,500,56,444], // SET MINUS
+ 0x2217: [465,-35,500,64,435], // ASTERISK OPERATOR
+ 0x2218: [444,-55,500,55,444], // RING OPERATOR
+ 0x2219: [444,-55,500,55,444], // BULLET OPERATOR
+ 0x221A: [800,200,833,72,853], // SQUARE ROOT
+ 0x221D: [442,11,778,56,722], // PROPORTIONAL TO
+ 0x221E: [442,11,1000,55,944], // INFINITY
+ 0x2220: [694,0,722,55,666], // ANGLE
+ 0x2223: [750,249,278,119,159], // DIVIDES
+ 0x2225: [750,250,500,132,367], // PARALLEL TO
+ 0x2227: [598,22,667,55,611], // LOGICAL AND
+ 0x2228: [598,22,667,55,611], // LOGICAL OR
+ 0x2229: [598,22,667,55,611], // stix-intersection, serifs
+ 0x222A: [598,22,667,55,611], // stix-union, serifs
+ 0x222B: [716,216,417,55,472], // INTEGRAL
+ 0x223C: [367,-133,778,55,722], // TILDE OPERATOR
+ 0x2240: [583,83,278,55,222], // WREATH PRODUCT
+ 0x2243: [464,-36,778,55,722], // ASYMPTOTICALLY EQUAL TO
+ 0x2245: [589,-22,1000,55,722], // APPROXIMATELY EQUAL TO
+ 0x2248: [483,-55,778,55,722], // ALMOST EQUAL TO
+ 0x224D: [484,-16,778,55,722], // EQUIVALENT TO
+ 0x2250: [670,-133,778,56,722], // APPROACHES THE LIMIT
+ 0x2260: [716,215,778,56,722], // stix-not (vert) equals
+ 0x2261: [464,-36,778,56,722], // IDENTICAL TO
+ 0x2264: [636,138,778,83,694], // LESS-THAN OR EQUAL TO
+ 0x2265: [636,138,778,83,694], // GREATER-THAN OR EQUAL TO
+ 0x226A: [568,67,1000,56,944], // MUCH LESS-THAN
+ 0x226B: [567,67,1000,55,944], // MUCH GREATER-THAN
+ 0x227A: [539,41,778,84,694], // PRECEDES
+ 0x227B: [539,41,778,83,694], // SUCCEEDS
+ 0x2282: [540,40,778,84,694], // SUBSET OF
+ 0x2283: [540,40,778,83,693], // SUPERSET OF
+ 0x2286: [636,138,778,84,694], // SUBSET OF OR EQUAL TO
+ 0x2287: [636,138,778,83,693], // SUPERSET OF OR EQUAL TO
+ 0x228E: [598,22,667,55,611], // MULTISET UNION
+ 0x2291: [636,138,778,84,714], // SQUARE IMAGE OF OR EQUAL TO
+ 0x2292: [636,138,778,64,694], // SQUARE ORIGINAL OF OR EQUAL TO
+ 0x2293: [598,0,667,61,605], // stix-square intersection, serifs
+ 0x2294: [598,0,667,61,605], // stix-square union, serifs
+ 0x2295: [583,83,778,56,722], // stix-circled plus (with rim)
+ 0x2296: [583,83,778,56,722], // CIRCLED MINUS
+ 0x2297: [583,83,778,56,722], // stix-circled times (with rim)
+ 0x2298: [583,83,778,56,722], // CIRCLED DIVISION SLASH
+ 0x2299: [583,83,778,56,722], // CIRCLED DOT OPERATOR
+ 0x22A2: [694,0,611,55,555], // RIGHT TACK
+ 0x22A3: [694,0,611,55,555], // LEFT TACK
+ 0x22A4: [668,0,778,55,723], // DOWN TACK
+ 0x22A5: [668,0,778,55,723], // UP TACK
+ 0x22A8: [750,249,867,119,811], // TRUE
+ 0x22C4: [488,-12,500,12,488], // DIAMOND OPERATOR
+ 0x22C5: [310,-190,278,78,199], // DOT OPERATOR
+ 0x22C6: [486,-16,500,3,497], // STAR OPERATOR
+ 0x22C8: [505,5,900,26,873], // BOWTIE
+ 0x22EE: [900,30,278,78,199], // VERTICAL ELLIPSIS
+ 0x22EF: [310,-190,1172,78,1093], // MIDLINE HORIZONTAL ELLIPSIS
+ 0x22F1: [820,-100,1282,133,1148], // DOWN RIGHT DIAGONAL ELLIPSIS
+ 0x2308: [750,250,444,174,422], // LEFT CEILING
+ 0x2309: [750,250,444,21,269], // RIGHT CEILING
+ 0x230A: [750,250,444,174,422], // LEFT FLOOR
+ 0x230B: [750,250,444,21,269], // RIGHT FLOOR
+ 0x2322: [388,-122,1000,55,944], // stix-small down curve
+ 0x2323: [378,-134,1000,55,944], // stix-small up curve
+ 0x23B0: [744,244,412,55,357], // UPPER LEFT OR LOWER RIGHT CURLY BRACKET SECTION
+ 0x23B1: [744,244,412,56,357], // UPPER RIGHT OR LOWER LEFT CURLY BRACKET SECTION
+ 0x25B3: [716,0,889,59,828], // WHITE UP-POINTING TRIANGLE
+ 0x25B9: [505,5,500,26,474], // WHITE RIGHT-POINTING SMALL TRIANGLE
+ 0x25BD: [500,215,889,59,828], // WHITE DOWN-POINTING TRIANGLE
+ 0x25C3: [505,5,500,26,473], // WHITE LEFT-POINTING SMALL TRIANGLE
+ 0x25EF: [715,215,1000,56,944], // LARGE CIRCLE
+ 0x2660: [727,130,778,55,723], // BLACK SPADE SUIT
+ 0x2661: [716,33,778,55,723], // WHITE HEART SUIT
+ 0x2662: [727,162,778,55,723], // WHITE DIAMOND SUIT
+ 0x2663: [726,130,778,28,750], // BLACK CLUB SUIT
+ 0x266D: [750,22,389,55,332], // MUSIC FLAT SIGN
+ 0x266E: [734,223,389,65,324], // MUSIC NATURAL SIGN
+ 0x266F: [723,223,389,55,333], // MUSIC SHARP SIGN
+ 0x27E8: [750,250,389,110,333], // MATHEMATICAL LEFT ANGLE BRACKET
+ 0x27E9: [750,250,389,55,278], // MATHEMATICAL RIGHT ANGLE BRACKET
+ 0x27EE: [744,244,412,173,357], // MATHEMATICAL LEFT FLATTENED PARENTHESIS
+ 0x27EF: [744,244,412,56,240], // MATHEMATICAL RIGHT FLATTENED PARENTHESIS
+ 0x27F5: [511,11,1609,55,1525], // LONG LEFTWARDS ARROW
+ 0x27F6: [511,11,1638,84,1553], // LONG RIGHTWARDS ARROW
+ 0x27F7: [511,11,1859,55,1803], // LONG LEFT RIGHT ARROW
+ 0x27F8: [525,24,1609,56,1553], // LONG LEFTWARDS DOUBLE ARROW
+ 0x27F9: [525,24,1638,56,1582], // LONG RIGHTWARDS DOUBLE ARROW
+ 0x27FA: [525,24,1858,56,1802], // LONG LEFT RIGHT DOUBLE ARROW
+ 0x27FC: [511,11,1638,55,1553], // LONG RIGHTWARDS ARROW FROM BAR
+ 0x2A3F: [683,0,750,28,721], // AMALGAMATION OR COPRODUCT
+ 0x2AAF: [636,138,778,84,694], // PRECEDES ABOVE SINGLE-LINE EQUALS SIGN
+ 0x2AB0: [636,138,778,83,694] // SUCCEEDS ABOVE SINGLE-LINE EQUALS SIGN
+ };
+
+ CHTML.FONTDATA.FONTS['MathJax_Math-Italic'] = {
+ centerline: 250, ascent: 717, descent: 218,
+ style: 'italic',
+ skew: {
+ 0x41: 0.139,
+ 0x42: 0.0833,
+ 0x43: 0.0833,
+ 0x44: 0.0556,
+ 0x45: 0.0833,
+ 0x46: 0.0833,
+ 0x47: 0.0833,
+ 0x48: 0.0556,
+ 0x49: 0.111,
+ 0x4A: 0.167,
+ 0x4B: 0.0556,
+ 0x4C: 0.0278,
+ 0x4D: 0.0833,
+ 0x4E: 0.0833,
+ 0x4F: 0.0833,
+ 0x50: 0.0833,
+ 0x51: 0.0833,
+ 0x52: 0.0833,
+ 0x53: 0.0833,
+ 0x54: 0.0833,
+ 0x55: 0.0278,
+ 0x58: 0.0833,
+ 0x5A: 0.0833,
+ 0x63: 0.0556,
+ 0x64: 0.167,
+ 0x65: 0.0556,
+ 0x66: 0.167,
+ 0x67: 0.0278,
+ 0x68: -0.0278,
+ 0x6C: 0.0833,
+ 0x6F: 0.0556,
+ 0x70: 0.0833,
+ 0x71: 0.0833,
+ 0x72: 0.0556,
+ 0x73: 0.0556,
+ 0x74: 0.0833,
+ 0x75: 0.0278,
+ 0x76: 0.0278,
+ 0x77: 0.0833,
+ 0x78: 0.0278,
+ 0x79: 0.0556,
+ 0x7A: 0.0556,
+ 0x393: 0.0833,
+ 0x394: 0.167,
+ 0x398: 0.0833,
+ 0x39B: 0.167,
+ 0x39E: 0.0833,
+ 0x3A0: 0.0556,
+ 0x3A3: 0.0833,
+ 0x3A5: 0.0556,
+ 0x3A6: 0.0833,
+ 0x3A8: 0.0556,
+ 0x3A9: 0.0833,
+ 0x3B1: 0.0278,
+ 0x3B2: 0.0833,
+ 0x3B4: 0.0556,
+ 0x3B5: 0.0833,
+ 0x3B6: 0.0833,
+ 0x3B7: 0.0556,
+ 0x3B8: 0.0833,
+ 0x3B9: 0.0556,
+ 0x3BC: 0.0278,
+ 0x3BD: 0.0278,
+ 0x3BE: 0.111,
+ 0x3BF: 0.0556,
+ 0x3C1: 0.0833,
+ 0x3C2: 0.0833,
+ 0x3C4: 0.0278,
+ 0x3C5: 0.0278,
+ 0x3C6: 0.0833,
+ 0x3C7: 0.0556,
+ 0x3C8: 0.111,
+ 0x3D1: 0.0833,
+ 0x3D5: 0.0833,
+ 0x3F1: 0.0833,
+ 0x3F5: 0.0556
+ },
+ 0x20: [0,0,250,0,0], // SPACE
+ 0x2F: [716,215,778,139,638], // SOLIDUS
+ 0x41: [716,0,750,35,726], // LATIN CAPITAL LETTER A
+ 0x42: [683,0,759,35,756], // LATIN CAPITAL LETTER B
+ 0x43: [705,22,715,50,760], // LATIN CAPITAL LETTER C
+ 0x44: [683,0,828,33,803], // LATIN CAPITAL LETTER D
+ 0x45: [680,0,738,31,764], // LATIN CAPITAL LETTER E
+ 0x46: [680,0,643,31,749], // LATIN CAPITAL LETTER F
+ 0x47: [705,22,786,50,760], // LATIN CAPITAL LETTER G
+ 0x48: [683,0,831,31,888], // LATIN CAPITAL LETTER H
+ 0x49: [683,0,440,26,504], // LATIN CAPITAL LETTER I
+ 0x4A: [683,22,555,57,633], // LATIN CAPITAL LETTER J
+ 0x4B: [683,0,849,31,889], // LATIN CAPITAL LETTER K
+ 0x4C: [683,0,681,32,647], // LATIN CAPITAL LETTER L
+ 0x4D: [683,0,970,35,1051], // LATIN CAPITAL LETTER M
+ 0x4E: [683,0,803,31,888], // LATIN CAPITAL LETTER N
+ 0x4F: [704,22,763,50,740], // LATIN CAPITAL LETTER O
+ 0x50: [683,0,642,33,751], // LATIN CAPITAL LETTER P
+ 0x51: [704,194,791,50,740], // LATIN CAPITAL LETTER Q
+ 0x52: [683,21,759,33,755], // LATIN CAPITAL LETTER R
+ 0x53: [705,22,613,52,645], // LATIN CAPITAL LETTER S
+ 0x54: [677,0,584,21,704], // LATIN CAPITAL LETTER T
+ 0x55: [683,22,683,60,767], // LATIN CAPITAL LETTER U
+ 0x56: [683,22,583,52,769], // LATIN CAPITAL LETTER V
+ 0x57: [683,22,944,51,1048], // LATIN CAPITAL LETTER W
+ 0x58: [683,0,828,26,852], // LATIN CAPITAL LETTER X
+ 0x59: [683,-1,581,30,763], // LATIN CAPITAL LETTER Y
+ 0x5A: [683,0,683,58,723], // LATIN CAPITAL LETTER Z
+ 0x61: [441,10,529,33,506], // LATIN SMALL LETTER A
+ 0x62: [694,11,429,40,422], // LATIN SMALL LETTER B
+ 0x63: [442,11,433,34,429], // LATIN SMALL LETTER C
+ 0x64: [694,10,520,33,523], // LATIN SMALL LETTER D
+ 0x65: [442,11,466,39,429], // LATIN SMALL LETTER E
+ 0x66: [705,205,490,55,550], // LATIN SMALL LETTER F
+ 0x67: [442,205,477,10,480], // LATIN SMALL LETTER G
+ 0x68: [694,11,576,48,555], // LATIN SMALL LETTER H
+ 0x69: [661,11,345,21,302], // LATIN SMALL LETTER I
+ 0x6A: [661,204,412,-12,403], // LATIN SMALL LETTER J
+ 0x6B: [694,11,521,48,503], // LATIN SMALL LETTER K
+ 0x6C: [694,11,298,38,266], // LATIN SMALL LETTER L
+ 0x6D: [442,11,878,21,857], // LATIN SMALL LETTER M
+ 0x6E: [442,11,600,21,580], // LATIN SMALL LETTER N
+ 0x6F: [441,11,485,34,476], // LATIN SMALL LETTER O
+ 0x70: [442,194,503,-39,497], // LATIN SMALL LETTER P
+ 0x71: [442,194,446,33,460], // LATIN SMALL LETTER Q
+ 0x72: [442,11,451,21,430], // LATIN SMALL LETTER R
+ 0x73: [442,10,469,53,419], // LATIN SMALL LETTER S
+ 0x74: [626,11,361,19,330], // LATIN SMALL LETTER T
+ 0x75: [442,11,572,21,551], // LATIN SMALL LETTER U
+ 0x76: [443,11,485,21,467], // LATIN SMALL LETTER V
+ 0x77: [443,11,716,21,690], // LATIN SMALL LETTER W
+ 0x78: [442,11,572,35,522], // LATIN SMALL LETTER X
+ 0x79: [442,205,490,21,496], // LATIN SMALL LETTER Y
+ 0x7A: [442,11,465,35,468], // LATIN SMALL LETTER Z
+ 0xA0: [0,0,250,0,0], // NO-BREAK SPACE
+ 0x393: [680,-1,615,31,721], // GREEK CAPITAL LETTER GAMMA
+ 0x394: [716,0,833,48,788], // GREEK CAPITAL LETTER DELTA
+ 0x398: [704,22,763,50,740], // GREEK CAPITAL LETTER THETA
+ 0x39B: [716,0,694,35,670], // GREEK CAPITAL LETTER LAMDA
+ 0x39E: [677,0,742,53,777], // GREEK CAPITAL LETTER XI
+ 0x3A0: [680,0,831,31,887], // GREEK CAPITAL LETTER PI
+ 0x3A3: [683,0,780,58,806], // GREEK CAPITAL LETTER SIGMA
+ 0x3A5: [705,0,583,28,700], // GREEK CAPITAL LETTER UPSILON
+ 0x3A6: [683,0,667,24,642], // GREEK CAPITAL LETTER PHI
+ 0x3A8: [683,0,612,21,692], // GREEK CAPITAL LETTER PSI
+ 0x3A9: [704,0,772,80,786], // GREEK CAPITAL LETTER OMEGA
+ 0x3B1: [442,11,640,34,603], // GREEK SMALL LETTER ALPHA
+ 0x3B2: [705,194,566,23,573], // GREEK SMALL LETTER BETA
+ 0x3B3: [441,216,518,11,543], // GREEK SMALL LETTER GAMMA
+ 0x3B4: [717,10,444,36,451], // GREEK SMALL LETTER DELTA
+ 0x3B5: [452,22,466,27,428], // GREEK SMALL LETTER EPSILON
+ 0x3B6: [704,204,438,44,471], // GREEK SMALL LETTER ZETA
+ 0x3B7: [442,216,497,21,503], // GREEK SMALL LETTER ETA
+ 0x3B8: [705,10,469,35,462], // GREEK SMALL LETTER THETA
+ 0x3B9: [442,10,354,48,332], // GREEK SMALL LETTER IOTA
+ 0x3BA: [442,11,576,49,554], // GREEK SMALL LETTER KAPPA
+ 0x3BB: [694,12,583,47,556], // GREEK SMALL LETTER LAMDA
+ 0x3BC: [442,216,603,23,580], // GREEK SMALL LETTER MU
+ 0x3BD: [442,2,494,45,530], // GREEK SMALL LETTER NU
+ 0x3BE: [704,205,438,21,443], // GREEK SMALL LETTER XI
+ 0x3BF: [441,11,485,34,476], // GREEK SMALL LETTER OMICRON
+ 0x3C0: [431,11,570,19,573], // GREEK SMALL LETTER PI
+ 0x3C1: [442,216,517,23,510], // GREEK SMALL LETTER RHO
+ 0x3C2: [442,107,363,31,405], // GREEK SMALL LETTER FINAL SIGMA
+ 0x3C3: [431,11,571,31,572], // GREEK SMALL LETTER SIGMA
+ 0x3C4: [431,13,437,18,517], // GREEK SMALL LETTER TAU
+ 0x3C5: [443,10,540,21,523], // GREEK SMALL LETTER UPSILON
+ 0x3C6: [442,218,654,50,618], // GREEK SMALL LETTER PHI
+ 0x3C7: [442,204,626,25,600], // GREEK SMALL LETTER CHI
+ 0x3C8: [694,205,651,21,634], // GREEK SMALL LETTER PSI
+ 0x3C9: [443,11,622,15,604], // GREEK SMALL LETTER OMEGA
+ 0x3D1: [705,11,591,21,563], // GREEK THETA SYMBOL
+ 0x3D5: [694,205,596,43,579], // GREEK PHI SYMBOL
+ 0x3D6: [431,10,828,19,823], // GREEK PI SYMBOL
+ 0x3F1: [442,194,517,67,510], // GREEK RHO SYMBOL
+ 0x3F5: [431,11,406,40,382] // GREEK LUNATE EPSILON SYMBOL
+ };
+
+ CHTML.FONTDATA.FONTS['MathJax_Size1'] = {
+ centerline: 250, ascent: 850, descent: 350,
+ 0x20: [0,0,250,0,0], // SPACE
+ 0x28: [850,349,458,152,422], // LEFT PARENTHESIS
+ 0x29: [850,349,458,35,305], // RIGHT PARENTHESIS
+ 0x2F: [850,349,578,55,522], // SOLIDUS
+ 0x5B: [850,349,417,202,394], // LEFT SQUARE BRACKET
+ 0x5C: [850,349,578,54,522], // REVERSE SOLIDUS
+ 0x5D: [850,349,417,22,214], // RIGHT SQUARE BRACKET
+ 0x7B: [850,349,583,105,477], // LEFT CURLY BRACKET
+ 0x7D: [850,349,583,105,477], // RIGHT CURLY BRACKET
+ 0xA0: [0,0,250,0,0], // NO-BREAK SPACE
+ 0x2C6: [744,-551,556,-8,564], // MODIFIER LETTER CIRCUMFLEX ACCENT
+ 0x2DC: [722,-597,556,1,554], // SMALL TILDE
+ 0x302: [744,-551,0,-564,8], // COMBINING CIRCUMFLEX ACCENT
+ 0x303: [722,-597,0,-555,-2], // COMBINING TILDE
+ 0x2016: [602,0,778,257,521], // DOUBLE VERTICAL LINE
+ 0x2191: [600,0,667,112,555], // UPWARDS ARROW
+ 0x2193: [600,0,667,112,555], // DOWNWARDS ARROW
+ 0x21D1: [599,0,778,57,721], // UPWARDS DOUBLE ARROW
+ 0x21D3: [600,-1,778,57,721], // DOWNWARDS DOUBLE ARROW
+ 0x220F: [750,250,944,55,888], // N-ARY PRODUCT
+ 0x2210: [750,250,944,55,888], // N-ARY COPRODUCT
+ 0x2211: [750,250,1056,56,999], // N-ARY SUMMATION
+ 0x221A: [850,350,1000,111,1020], // SQUARE ROOT
+ 0x2223: [627,15,333,145,188], // DIVIDES
+ 0x2225: [627,15,556,145,410], // PARALLEL TO
+ 0x222B: [805,306,472,55,610], // INTEGRAL
+ 0x222C: [805,306,819,55,957], // DOUBLE INTEGRAL
+ 0x222D: [805,306,1166,55,1304], // TRIPLE INTEGRAL
+ 0x222E: [805,306,472,55,610], // CONTOUR INTEGRAL
+ 0x22C0: [750,249,833,55,777], // N-ARY LOGICAL AND
+ 0x22C1: [750,249,833,55,777], // N-ARY LOGICAL OR
+ 0x22C2: [750,249,833,55,777], // N-ARY INTERSECTION
+ 0x22C3: [750,249,833,55,777], // N-ARY UNION
+ 0x2308: [850,349,472,202,449], // LEFT CEILING
+ 0x2309: [850,349,472,22,269], // RIGHT CEILING
+ 0x230A: [850,349,472,202,449], // LEFT FLOOR
+ 0x230B: [850,349,472,22,269], // RIGHT FLOOR
+ 0x23D0: [602,0,667,312,355], // VERTICAL LINE EXTENSION (used to extend arrows)
+ 0x27E8: [850,350,472,97,394], // MATHEMATICAL LEFT ANGLE BRACKET
+ 0x27E9: [850,350,472,77,374], // MATHEMATICAL RIGHT ANGLE BRACKET
+ 0x2A00: [750,250,1111,56,1054], // N-ARY CIRCLED DOT OPERATOR
+ 0x2A01: [750,250,1111,56,1054], // N-ARY CIRCLED PLUS OPERATOR
+ 0x2A02: [750,250,1111,56,1054], // N-ARY CIRCLED TIMES OPERATOR
+ 0x2A04: [750,249,833,55,777], // N-ARY UNION OPERATOR WITH PLUS
+ 0x2A06: [750,249,833,55,777] // N-ARY SQUARE UNION OPERATOR
+ };
+
+ CHTML.FONTDATA.FONTS['MathJax_Size2'] = {
+ centerline: 249, ascent: 1360, descent: 862,
+ 0x20: [0,0,250,0,0], // SPACE
+ 0x28: [1150,649,597,180,561], // LEFT PARENTHESIS
+ 0x29: [1150,649,597,35,416], // RIGHT PARENTHESIS
+ 0x2F: [1150,649,811,56,754], // SOLIDUS
+ 0x5B: [1150,649,472,224,455], // LEFT SQUARE BRACKET
+ 0x5C: [1150,649,811,54,754], // REVERSE SOLIDUS
+ 0x5D: [1150,649,472,16,247], // RIGHT SQUARE BRACKET
+ 0x7B: [1150,649,667,119,547], // LEFT CURLY BRACKET
+ 0x7D: [1150,649,667,119,547], // RIGHT CURLY BRACKET
+ 0xA0: [0,0,250,0,0], // NO-BREAK SPACE
+ 0x2C6: [772,-565,1000,-5,1004], // MODIFIER LETTER CIRCUMFLEX ACCENT
+ 0x2DC: [750,-611,1000,0,999], // SMALL TILDE
+ 0x302: [772,-565,0,-1005,4], // COMBINING CIRCUMFLEX ACCENT
+ 0x303: [750,-611,0,-1000,-1], // COMBINING TILDE
+ 0x220F: [950,450,1278,56,1221], // N-ARY PRODUCT
+ 0x2210: [950,450,1278,56,1221], // N-ARY COPRODUCT
+ 0x2211: [950,450,1444,55,1388], // N-ARY SUMMATION
+ 0x221A: [1150,650,1000,111,1020], // SQUARE ROOT
+ 0x222B: [1360,862,556,55,944], // INTEGRAL
+ 0x222C: [1360,862,1084,55,1472], // DOUBLE INTEGRAL
+ 0x222D: [1360,862,1592,55,1980], // TRIPLE INTEGRAL
+ 0x222E: [1360,862,556,55,944], // CONTOUR INTEGRAL
+ 0x22C0: [950,450,1111,55,1055], // N-ARY LOGICAL AND
+ 0x22C1: [950,450,1111,55,1055], // N-ARY LOGICAL OR
+ 0x22C2: [949,450,1111,55,1055], // N-ARY INTERSECTION
+ 0x22C3: [950,449,1111,55,1055], // N-ARY UNION
+ 0x2308: [1150,649,528,224,511], // LEFT CEILING
+ 0x2309: [1150,649,528,16,303], // RIGHT CEILING
+ 0x230A: [1150,649,528,224,511], // LEFT FLOOR
+ 0x230B: [1150,649,528,16,303], // RIGHT FLOOR
+ 0x27E8: [1150,649,611,112,524], // MATHEMATICAL LEFT ANGLE BRACKET
+ 0x27E9: [1150,649,611,85,498], // MATHEMATICAL RIGHT ANGLE BRACKET
+ 0x2A00: [949,449,1511,56,1454], // N-ARY CIRCLED DOT OPERATOR
+ 0x2A01: [949,449,1511,56,1454], // N-ARY CIRCLED PLUS OPERATOR
+ 0x2A02: [949,449,1511,56,1454], // N-ARY CIRCLED TIMES OPERATOR
+ 0x2A04: [950,449,1111,55,1055], // N-ARY UNION OPERATOR WITH PLUS
+ 0x2A06: [950,450,1111,55,1055] // N-ARY SQUARE UNION OPERATOR
+ };
+
+ CHTML.FONTDATA.FONTS['MathJax_Size3'] = {
+ centerline: 250, ascent: 1450, descent: 950,
+ 0x20: [0,0,250,0,0], // SPACE
+ 0x28: [1450,949,736,209,701], // LEFT PARENTHESIS
+ 0x29: [1450,949,736,34,526], // RIGHT PARENTHESIS
+ 0x2F: [1450,949,1044,55,989], // SOLIDUS
+ 0x5B: [1450,949,528,247,516], // LEFT SQUARE BRACKET
+ 0x5C: [1450,949,1044,56,988], // REVERSE SOLIDUS
+ 0x5D: [1450,949,528,11,280], // RIGHT SQUARE BRACKET
+ 0x7B: [1450,949,750,130,618], // LEFT CURLY BRACKET
+ 0x7D: [1450,949,750,131,618], // RIGHT CURLY BRACKET
+ 0xA0: [0,0,250,0,0], // NO-BREAK SPACE
+ 0x2C6: [772,-564,1444,-4,1447], // MODIFIER LETTER CIRCUMFLEX ACCENT
+ 0x2DC: [749,-610,1444,1,1442], // SMALL TILDE
+ 0x302: [772,-564,0,-1448,3], // COMBINING CIRCUMFLEX ACCENT
+ 0x303: [749,-610,0,-1443,-2], // COMBINING TILDE
+ 0x221A: [1450,950,1000,111,1020], // SQUARE ROOT
+ 0x2308: [1450,949,583,246,571], // LEFT CEILING
+ 0x2309: [1450,949,583,11,336], // RIGHT CEILING
+ 0x230A: [1450,949,583,246,571], // LEFT FLOOR
+ 0x230B: [1450,949,583,11,336], // RIGHT FLOOR
+ 0x27E8: [1450,950,750,126,654], // MATHEMATICAL LEFT ANGLE BRACKET
+ 0x27E9: [1450,949,750,94,623] // MATHEMATICAL RIGHT ANGLE BRACKET
+ };
+
+ CHTML.FONTDATA.FONTS['MathJax_Size4'] = {
+ centerline: 250, ascent: 1750, descent: 1250,
+ 0x20: [0,0,250,0,0], // SPACE
+ 0x28: [1750,1249,792,237,758], // LEFT PARENTHESIS
+ 0x29: [1750,1249,792,33,554], // RIGHT PARENTHESIS
+ 0x2F: [1750,1249,1278,56,1221], // SOLIDUS
+ 0x5B: [1750,1249,583,269,577], // LEFT SQUARE BRACKET
+ 0x5C: [1750,1249,1278,56,1221], // REVERSE SOLIDUS
+ 0x5D: [1750,1249,583,5,313], // RIGHT SQUARE BRACKET
+ 0x7B: [1750,1249,806,144,661], // LEFT CURLY BRACKET
+ 0x7D: [1750,1249,806,144,661], // RIGHT CURLY BRACKET
+ 0xA0: [0,0,250,0,0], // NO-BREAK SPACE
+ 0x2C6: [845,-561,1889,-14,1902], // MODIFIER LETTER CIRCUMFLEX ACCENT
+ 0x2DC: [823,-583,1889,1,1885], // SMALL TILDE
+ 0x302: [845,-561,0,-1903,13], // COMBINING CIRCUMFLEX ACCENT
+ 0x303: [823,-583,0,-1888,-4], // COMBINING TILDE
+ 0x221A: [1750,1250,1000,111,1020], // SQUARE ROOT
+ 0x2308: [1750,1249,639,269,633], // LEFT CEILING
+ 0x2309: [1750,1249,639,5,369], // RIGHT CEILING
+ 0x230A: [1750,1249,639,269,633], // LEFT FLOOR
+ 0x230B: [1750,1249,639,5,369], // RIGHT FLOOR
+ 0x239B: [1154,655,875,291,843], // LEFT PARENTHESIS UPPER HOOK
+ 0x239C: [610,10,875,291,417], // LEFT PARENTHESIS EXTENSION
+ 0x239D: [1165,644,875,291,843], // LEFT PARENTHESIS LOWER HOOK
+ 0x239E: [1154,655,875,31,583], // RIGHT PARENTHESIS UPPER HOOK
+ 0x239F: [610,10,875,457,583], // RIGHT PARENTHESIS EXTENSION
+ 0x23A0: [1165,644,875,31,583], // RIGHT PARENTHESIS LOWER HOOK
+ 0x23A1: [1154,645,667,319,666], // LEFT SQUARE BRACKET UPPER CORNER
+ 0x23A2: [602,0,667,319,403], // LEFT SQUARE BRACKET EXTENSION
+ 0x23A3: [1155,644,667,319,666], // LEFT SQUARE BRACKET LOWER CORNER
+ 0x23A4: [1154,645,667,0,347], // RIGHT SQUARE BRACKET UPPER CORNER
+ 0x23A5: [602,0,667,263,347], // RIGHT SQUARE BRACKET EXTENSION
+ 0x23A6: [1155,644,667,0,347], // RIGHT SQUARE BRACKET LOWER CORNER
+ 0x23A7: [899,10,889,384,718], // LEFT CURLY BRACKET UPPER HOOK
+ 0x23A8: [1160,660,889,170,504], // LEFT CURLY BRACKET MIDDLE PIECE
+ 0x23A9: [10,899,889,384,718], // LEFT CURLY BRACKET LOWER HOOK
+ 0x23AA: [310,10,889,384,504], // CURLY BRACKET EXTENSION
+ 0x23AB: [899,10,889,170,504], // RIGHT CURLY BRACKET UPPER HOOK
+ 0x23AC: [1160,660,889,384,718], // RIGHT CURLY BRACKET MIDDLE PIECE
+ 0x23AD: [10,899,889,170,504], // RIGHT CURLY BRACKET LOWER HOOK
+ 0x23B7: [935,885,1056,111,742], // RADICAL SYMBOL BOTTOM
+ 0x27E8: [1750,1248,806,140,703], // MATHEMATICAL LEFT ANGLE BRACKET
+ 0x27E9: [1750,1248,806,103,665], // MATHEMATICAL RIGHT ANGLE BRACKET
+ 0xE000: [625,14,1056,702,742], // stix-radical symbol vertical extender
+ 0xE001: [605,14,1056,702,1076], // stix-radical symbol top corner piece
+ 0xE150: [120,213,450,-24,460], // stix-horizontal brace, down left piece
+ 0xE151: [120,213,450,-10,474], // stix-horizontal brace, down right piece
+ 0xE152: [333,0,450,-24,460], // stix-horizontal brace, upper left piece
+ 0xE153: [333,0,450,-10,474], // stix-horizontal brace, upper right piece
+ 0xE154: [120,0,400,-10,410] // stix-oblique open face capital letter A
+ };
+
+ CHTML.FONTDATA.FONTS['MathJax_Vector'] = {
+ centerline: 257, ascent: 714, descent: 200,
+ 0x2192: [714,-516,500,29,471] // vector arrow
+ };
+
+ CHTML.FONTDATA.FONTS['MathJax_Vector-Bold'] = {
+ centerline: 256, ascent: 723, descent: 210,
+ 0x2192: [723,-513,575,33,542] // vector arrow
+ };
+
+ CHTML.FONTDATA.FONTS[MAIN][0x2212][0] = CHTML.FONTDATA.FONTS[MAIN][0x002B][0]; // minus is sized as plus
+ CHTML.FONTDATA.FONTS[MAIN][0x2212][1] = CHTML.FONTDATA.FONTS[MAIN][0x002B][1]; // minus is sized as plus
+ CHTML.FONTDATA.FONTS[MAIN][0x22EE][0] += 400; // adjust height for \vdots
+ CHTML.FONTDATA.FONTS[MAIN][0x22F1][0] += 700; // adjust height for \ddots
+ CHTML.FONTDATA.FONTS[SIZE4][0x23AA][0] -= 20;
+ CHTML.FONTDATA.FONTS[SIZE4][0x23AA][1] += 5;
+ CHTML.FONTDATA.FONTS[SIZE4][0xE154][0] += 200; // adjust height for brace extender
+ CHTML.FONTDATA.FONTS[SIZE4][0xE154][1] += 200; // adjust depth for brace extender
+ CHTML.FONTDATA.FONTS[MAIN][0x2245][2] -= 222; // fix error in character's right bearing
+ CHTML.FONTDATA.FONTS[MAIN][0x2245][5] = {rfix:-222}; // fix error in character's right bearing
+ MathJax.Hub.Register.LoadHook(CHTML.fontDir+"/TeX/Main-Bold.js",function () {
+ CHTML.FONTDATA.FONTS[BOLD][0x2245][2] -= 106; // fix error in character's right bearing
+ CHTML.FONTDATA.FONTS[BOLD][0x2245][5] = {rfix:-106}; // fix error in character's right bearing
+ });
+ MathJax.Hub.Register.LoadHook(CHTML.fontDir+"/TeX/Typewriter-Regular.js",function () {
+ CHTML.FONTDATA.FONTS['MathJax_Typewriter'][0x20][2] += 275; // fix error in character width
+ CHTML.FONTDATA.FONTS['MathJax_Typewriter'][0x20][5] = {rfix:275}; // fix error in character width
+ CHTML.FONTDATA.FONTS['MathJax_Typewriter'][0xA0][2] += 275; // fix error in character width
+ CHTML.FONTDATA.FONTS['MathJax_Typewriter'][0xA0][5] = {rfix:275}; // fix error in character width
+ });
+
+ //
+ // Add some spacing characters
+ //
+ MathJax.Hub.Insert(CHTML.FONTDATA.FONTS[MAIN],{
+ remapCombining: {
+ 0x300: 0x2CB, // grave accent
+ 0x301: 0x2CA, // acute accent
+ 0x302: 0x2C6, // curcumflex
+ 0x303: 0x2DC, // tilde accent
+ 0x304: 0x2C9, // macron
+ 0x306: 0x2D8, // breve
+ 0x307: 0x2D9, // dot
+ 0x308: 0xA8, // diaresis
+ 0x30A: 0x2DA, // ring above
+// 0x30B: ?? // double acute accent
+ 0x30C: 0x2C7, // caron
+ 0x338: [0x2F, ITALIC], // \not
+ 0x20D7: [0x2192, 'MathJax_Vector'] // \vec
+ },
+ 0x2000: [0,0,500,0,0,{space:1}], // en space
+ 0x2001: [0,0,1000,0,0,{space:1}], // em quad
+ 0x2002: [0,0,500,0,0,{space:1}], // en quad
+ 0x2003: [0,0,1000,0,0,{space:1}], // em space
+ 0x2004: [0,0,333,0,0,{space:1}], // 3-per-em space
+ 0x2005: [0,0,250,0,0,{space:1}], // 4-per-em space
+ 0x2006: [0,0,167,0,0,{space:1}], // 6-per-em space
+ 0x2009: [0,0,167,0,0,{space:1}], // thin space
+ 0x200A: [0,0,100,0,0,{space:1}], // hair space
+ 0x200B: [0,0,0,0,0,{space:1}], // zero-width space
+ 0x200C: [0,0,0,0,0,{space:1}], // zero-width non-joiner space
+ 0x2061: [0,0,0,0,0,{space:1}], // function application
+ 0x2062: [0,0,0,0,0,{space:1}], // invisible times
+ 0x2063: [0,0,0,0,0,{space:1}], // invisible separator
+ 0x2064: [0,0,0,0,0,{space:1}], // invisible plus
+ 0xEEE0: [0,0,-575,0,0,{space:1}],
+ 0xEEE1: [0,0,-300,0,0,{space:1}],
+ 0xEEE8: [0,0,25,0,0,{space:1}]
+ });
+ MathJax.Hub.Insert(CHTML.FONTDATA.FONTS['MathJax_Main-Italic'],{
+ remapCombining: {
+ 0x300: [0x2CB, MAIN], // grave accent
+ 0x301: [0x2CA, MAIN], // acute accent
+ 0x302: [0x2C6, MAIN], // curcumflex
+ 0x303: [0x2DC, MAIN], // tilde accent
+ 0x304: [0x2C9, MAIN], // macron
+ 0x306: [0x2D8, MAIN], // breve
+ 0x307: [0x2D9, MAIN], // dot
+ 0x308: [0xA8, MAIN], // diaresis
+ 0x30A: [0x2DA, MAIN], // ring above
+// 0x30B: ?? // double acute accent
+ 0x30C: [0x2C7, MAIN], // caron
+ 0x338: [0x2F, 'MathJax_Vector'] // \not
+ }
+ });
+ MathJax.Hub.Insert(CHTML.FONTDATA.FONTS['MathJax_Main-Bold'],{
+ remapCombining: {
+ 0x300: 0x2CB, // grave accent
+ 0x301: 0x2CA, // acute accent
+ 0x302: 0x2C6, // curcumflex
+ 0x303: 0x2DC, // tilde accent
+ 0x304: 0x2C9, // macron
+ 0x306: 0x2D8, // breve
+ 0x307: 0x2D9, // dot
+ 0x308: 0xA8, // diaresis
+ 0x30A: 0x2DA, // ring above
+// 0x30B: ?? // double acute accent
+ 0x30C: 0x2C7, // caron
+ 0x338: [0x2F, 'MathJax_Math-BoldItalic'], // \not
+ 0x20D7: [0x2192, 'MathJax_Vector-Bold'] // \vec
+ }
+ });
+
+ //
+ // Create @font-face stylesheet for the declared fonts
+ //
+ CHTML.FONTDATA.familyName = function (font) {
+ font = font.replace(/^MathJax_/,"");
+ var names = (font+"-Regular").split(/-/);
+ var suffix = names[0].toLowerCase().replace(/(?:igraphic|serif|writer|tur|tor)$/,"")
+ + "-" + names[1].replace(/[^A-Z]/g,"");
+ return "MJXc-TeX-"+suffix;
+ };
+ (function () {
+ var STYLES = CHTML.config.styles, FONTS = CHTML.FONTDATA.FONTS;
+ var OTFDIR = AJAX.fileURL(CHTML.webfontDir+"/TeX/otf"),
+ EOTDIR = AJAX.fileURL(CHTML.webfontDir+"/TeX/eot"),
+ WOFFDIR = AJAX.fileURL(CHTML.webfontDir+"/TeX/woff");
+ var faces = [];
+ for (var name in FONTS) {if (FONTS.hasOwnProperty(name)) {
+ var family = CHTML.FONTDATA.familyName(name), FAMILY = family;
+ var variant = ((name+"-Regular").split(/-/))[1];
+ FONTS[name].className = family;
+ //
+ // The local font, if found
+ //
+ var font = {"font-family":family};
+ name = name.replace(/-.*/,"");
+ if (variant === "Regular") {
+ font.src = "local('"+name+"'), local('"+name+"-Regular')";
+ } else {
+ font.src = "local('"+name+" "+variant+"'), local('"+name+"-"+variant+"')";
+ }
+ faces.push(font);
+ //
+ // For Chrome, need to have separate font-weight and font-style versions
+ //
+ if (variant !== "Regular") {
+ font = {"font-family":family+"x", src:"local('"+name+"')"};
+ if (variant.match(/Bold/)) font["font-weight"] = "bold";
+ if (variant.match(/Italic/)) font["font-style"] = "italic";
+ FAMILY += ","+family+"x";
+ faces.push(font);
+ }
+ //
+ // The web font, if no local font found
+ //
+ font = {
+ "font-family": family+"w",
+ "src /*1*/": "url('"+EOTDIR+"/"+name+"-"+variant+".eot')", // for IE8
+ "src /*2*/": [
+ "url('"+WOFFDIR+"/"+name+"-"+variant+".woff') format('woff')",
+ "url('"+OTFDIR+"/"+name+"-"+variant+".otf') format('opentype')"
+ ].join(", ")
+ };
+ faces.push(font);
+ //
+ // A class that looks for the local and web fonts
+ //
+ FAMILY += ","+family+"w";
+ STYLES["."+family] = {"font-family":FAMILY};
+ }}
+ if (faces.length) STYLES["@font-face"] = faces;
+ })();
+
+ CHTML.fontLoaded("TeX/fontdata");
+
+})(MathJax.OutputJax.CommonHTML,MathJax.ElementJax.mml,MathJax.Ajax);
+
+// @license-end
diff --git a/js/mathjax/jax/output/CommonHTML/jax.js b/js/mathjax/jax/output/CommonHTML/jax.js
new file mode 100644
index 0000000..6c57957
--- /dev/null
+++ b/js/mathjax/jax/output/CommonHTML/jax.js
@@ -0,0 +1,2845 @@
+// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0
+/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
+/* vim: set ts=2 et sw=2 tw=80: */
+
+/*************************************************************
+ *
+ * MathJax/jax/output/CommonHTML/jax.js
+ *
+ * Implements the CommonHTML OutputJax that displays mathematics
+ * using HTML and CSS to position the characters from math fonts
+ * in their proper locations. Unlike the HTML-CSS output jax,
+ * this HTML is browser and OS independent.
+ *
+ * ---------------------------------------------------------------------
+ *
+ * Copyright (c) 2013-2020 The MathJax Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+(function (AJAX,HUB,HTML,CHTML) {
+ var MML;
+ var isArray = MathJax.Object.isArray;
+
+ var EVENT, TOUCH, HOVER; // filled in later
+
+ var STRUTHEIGHT = 1,
+ EFUZZ = .1, // overlap needed for stretchy delimiters
+ HFUZZ = .025, DFUZZ = .025; // adjustments to bounding box of character boxes
+
+ var STYLES = {
+ ".mjx-chtml": {
+ display: "inline-block",
+ "line-height": 0,
+ "text-indent": 0,
+ "text-align": "left",
+ "text-transform": "none",
+ "font-style": "normal",
+ "font-weight": "normal",
+ "font-size": "100%",
+ "font-size-adjust":"none",
+ "letter-spacing": "normal",
+ "word-wrap": "normal",
+ "word-spacing": "normal",
+ "white-space": "nowrap",
+ "float": "none",
+ "direction": "ltr",
+ "max-width": "none",
+ "max-height": "none",
+ "min-width": 0,
+ "min-height": 0,
+ border: 0,
+ margin: 0,
+ padding: "1px 0"
+ },
+ ".MJXc-display": {
+ display: "block",
+ "text-align": "center",
+ "margin": "1em 0",
+ padding: 0
+ },
+ ".mjx-chtml[tabindex]:focus, body :focus .mjx-chtml[tabindex]": {
+ display: "inline-table" // see issues #1282 and #1338
+ },
+ ".mjx-full-width": {
+ "text-align": "center",
+ display: "table-cell!important",
+ width: "10000em"
+ },
+
+ ".mjx-math": {
+ "display": "inline-block",
+ "border-collapse": "separate",
+ "border-spacing": 0
+ },
+ ".mjx-math *": {
+ display:"inline-block",
+ "-webkit-box-sizing": "content-box!important",
+ "-moz-box-sizing": "content-box!important",
+ "box-sizing": "content-box!important", // override bootstrap settings
+ "text-align":"left"
+ },
+
+ ".mjx-numerator": {display:"block", "text-align":"center"},
+ ".mjx-denominator": {display:"block", "text-align":"center"},
+ ".MJXc-stacked": {height:0, position:"relative"},
+ ".MJXc-stacked > *": {position: "absolute"},
+ ".MJXc-bevelled > *": {display:"inline-block"},
+
+ ".mjx-stack": {display:"inline-block"},
+ ".mjx-op": {display:"block"},
+ ".mjx-under": {display:"table-cell"},
+ ".mjx-over": {display:"block"},
+ ".mjx-over > *": {"padding-left":"0px!important", "padding-right":"0px!important"},
+ ".mjx-under > *": {"padding-left":"0px!important", "padding-right":"0px!important"},
+
+ ".mjx-stack > .mjx-sup": {display:"block"},
+ ".mjx-stack > .mjx-sub": {display:"block"},
+ ".mjx-prestack > .mjx-presup": {display:"block"},
+ ".mjx-prestack > .mjx-presub": {display:"block"},
+
+ ".mjx-delim-h > .mjx-char": {display:"inline-block"},
+
+ ".mjx-surd": {"vertical-align":"top"},
+ ".mjx-surd + .mjx-box": {display:"inline-flex"},
+
+ ".mjx-mphantom *": {visibility:"hidden"},
+
+ ".mjx-merror": {
+ "background-color":"#FFFF88",
+ color: "#CC0000",
+ border: "1px solid #CC0000",
+ padding: "2px 3px",
+ "font-style": "normal",
+ "font-size": "90%"
+ },
+
+ ".mjx-annotation-xml": {"line-height":"normal"},
+
+ ".mjx-menclose > svg": {fill:"none", stroke:"currentColor", overflow:"visible"},
+
+ ".mjx-mtr": {display:"table-row"},
+ ".mjx-mlabeledtr": {display:"table-row"},
+ ".mjx-mtd": {display:"table-cell", "text-align":"center"},
+ ".mjx-label": {display:"table-row"},
+
+ ".mjx-box": {display:"inline-block"},
+ ".mjx-block": {display:"block"},
+ ".mjx-span": {display:"inline"},
+ ".mjx-char": {display:"block", "white-space":"pre"},
+ ".mjx-itable": {display:"inline-table", width:"auto"},
+ ".mjx-row": {display:"table-row"},
+ ".mjx-cell": {display:"table-cell"},
+ ".mjx-table": {display:"table", width:"100%"},
+ ".mjx-line": {display:"block", height:0},
+ ".mjx-strut": {width:0, "padding-top":STRUTHEIGHT+"em"},
+ ".mjx-vsize": {width:0},
+
+ ".MJXc-space1": {"margin-left":".167em"},
+ ".MJXc-space2": {"margin-left":".222em"},
+ ".MJXc-space3": {"margin-left":".278em"},
+
+ ".mjx-chartest": {
+ display:"block",
+ visibility: "hidden",
+ position:"absolute", top:0,
+ "line-height":"normal",
+ "font-size":"500%"
+ },
+ ".mjx-chartest .mjx-char": {display:"inline"},
+ ".mjx-chartest .mjx-box": {"padding-top": "1000px"},
+
+ ".MJXc-processing": {
+ visibility: "hidden", position:"fixed",
+ width: 0, height: 0, overflow:"hidden"
+ },
+ ".MJXc-processed": {display:"none"},
+
+ ".mjx-test": {
+ "font-style": "normal",
+ "font-weight": "normal",
+ "font-size": "100%",
+ "font-size-adjust":"none",
+ "text-indent": 0,
+ "text-transform": "none",
+ "letter-spacing": "normal",
+ "word-spacing": "normal",
+ overflow: "hidden",
+ height: "1px"
+ },
+ ".mjx-test.mjx-test-display": {
+ display: "table!important"
+ },
+ ".mjx-test.mjx-test-inline": {
+ display: "inline!important",
+ "margin-right": "-1px"
+ },
+ ".mjx-test.mjx-test-default": {
+ display: "block!important",
+ clear: "both"
+ },
+ ".mjx-ex-box": {
+ display: "inline-block!important",
+ position: "absolute",
+ overflow: "hidden",
+ "min-height": 0, "max-height":"none",
+ padding:0, border: 0, margin: 0,
+ width:"1px", height:"60ex"
+ },
+ ".mjx-test-inline .mjx-left-box": {
+ display: "inline-block",
+ width: 0,
+ "float":"left"
+ },
+ ".mjx-test-inline .mjx-right-box": {
+ display: "inline-block",
+ width: 0,
+ "float":"right"
+ },
+ ".mjx-test-display .mjx-right-box": {
+ display: "table-cell!important",
+ width: "10000em!important",
+ "min-width":0, "max-width":"none",
+ padding:0, border:0, margin:0
+ },
+
+ "#MathJax_CHTML_Tooltip": {
+ "background-color": "InfoBackground", color: "InfoText",
+ border: "1px solid black",
+ "box-shadow": "2px 2px 5px #AAAAAA", // Opera 10.5
+ "-webkit-box-shadow": "2px 2px 5px #AAAAAA", // Safari 3 and Chrome
+ "-moz-box-shadow": "2px 2px 5px #AAAAAA", // Firefox 3.5
+ "-khtml-box-shadow": "2px 2px 5px #AAAAAA", // Konqueror
+ padding: "3px 4px",
+ "z-index": 401,
+ position: "absolute", left: 0, top: 0,
+ width: "auto", height: "auto",
+ display: "none"
+ }
+
+ };
+
+
+ /************************************************************/
+
+ var BIGDIMEN = 1000000;
+ var MAXREMAP = 5;
+ var LINEBREAKS = {}, CONFIG = MathJax.Hub.config;
+
+ CHTML.Augment({
+ settings: HUB.config.menuSettings,
+ config: {styles: STYLES},
+
+ /********************************************/
+
+ Config: function () {
+ if (!this.require) {this.require = []}
+ this.SUPER(arguments).Config.call(this); var settings = this.settings;
+ if (settings.scale) {this.config.scale = settings.scale}
+ this.require.push(this.fontDir+"/TeX/fontdata.js");
+ this.require.push(MathJax.OutputJax.extensionDir+"/MathEvents.js");
+ LINEBREAKS = this.config.linebreaks;
+ },
+
+ Startup: function () {
+ //
+ // Set up event handling
+ //
+ EVENT = MathJax.Extension.MathEvents.Event;
+ TOUCH = MathJax.Extension.MathEvents.Touch;
+ HOVER = MathJax.Extension.MathEvents.Hover;
+ this.ContextMenu = EVENT.ContextMenu;
+ this.Mousedown = EVENT.AltContextMenu;
+ this.Mouseover = HOVER.Mouseover;
+ this.Mouseout = HOVER.Mouseout;
+ this.Mousemove = HOVER.Mousemove;
+
+ //
+ // Determine pixels per inch
+ //
+ var div = CHTML.addElement(document.body,"mjx-block",{style:{display:"block",width:"5in"}});
+ this.pxPerInch = div.offsetWidth/5; div.parentNode.removeChild(div);
+
+ //
+ // Used in preTranslate to get scaling factors and line width
+ //
+ this.TestSpan = CHTML.Element("mjx-test",{style:{left:"1em"}},
+ [["mjx-left-box"],["mjx-ex-box"],["mjx-right-box"]]);
+
+ //
+ // Set up styles and preload web fonts
+ //
+ return AJAX.Styles(this.config.styles,["InitializeCHTML",this]);
+ },
+
+ InitializeCHTML: function () {
+ this.getDefaultExEm();
+ //
+ // If the defaultEm size is zero, it might be that a web font hasn't
+ // arrived yet, so try to wait for it, but don't wait too long.
+ //
+ if (this.defaultEm) return;
+ var ready = MathJax.Callback();
+ AJAX.timer.start(AJAX,function (check) {
+ if (check.time(ready)) {HUB.signal.Post(["CommonHTML Jax - no default em size"]); return}
+ CHTML.getDefaultExEm();
+ if (CHTML.defaultEm) {ready()} else {setTimeout(check,check.delay)}
+ },this.defaultEmDelay,this.defaultEmTimeout);
+ return ready;
+ },
+ defaultEmDelay: 100, // initial delay when checking for defaultEm
+ defaultEmTimeout: 1000, // when to stop looking for defaultEm
+ getDefaultExEm: function () {
+ //
+ // Get the default sizes (need styles in place to do this)
+ //
+ var test = document.body.appendChild(this.TestSpan.cloneNode(true));
+ test.className += " mjx-test-inline mjx-test-default";
+ this.defaultEm = this.getFontSize(test);
+ this.defaultEx = test.childNodes[1].offsetHeight/60;
+ this.defaultWidth = Math.max(0,test.lastChild.offsetLeft-test.firstChild.offsetLeft-2);
+ document.body.removeChild(test);
+ },
+ getFontSize: (window.getComputedStyle ?
+ function (node) {
+ var style = window.getComputedStyle(node);
+ return parseFloat(style.fontSize);
+ } :
+ //
+ // IE 8 doesn't do getComputedStyle, so use
+ // an alternative approach
+ //
+ function (node) {
+ return node.style.pixelLeft;
+ }
+ ),
+ getMaxWidth: (window.getComputedStyle ?
+ function (node) {
+ var style = window.getComputedStyle(node);
+ if (style.maxWidth !== "none") return parseFloat(style.maxWidth);
+ return 0;
+ } :
+ //
+ // IE 8 doesn't do getComputedStyle, so use
+ // currentStyle, and a hack to get the pixels for
+ // a non-px max-width
+ //
+ function (node) {
+ var max = node.currentStyle.maxWidth;
+ if (max !== "none") {
+ if (max.match(/\d*px/)) return parseFloat(max);
+ var left = node.style.left;
+ node.style.left = max; max = node.style.pixelLeft;
+ node.style.left = left;
+ return max;
+ }
+ return 0;
+ }
+ ),
+
+ //
+ // Load data for a font
+ //
+ loadFont: function (font) {
+ HUB.RestartAfter(AJAX.Require(this.fontDir+"/"+font));
+ },
+ //
+ // Signal that the font data are loaded
+ //
+ fontLoaded: function (font) {
+ if (!font.match(/-|fontdata/)) font += "-Regular";
+ if (!font.match(/\.js$/)) font += ".js"
+ MathJax.Callback.Queue(
+ ["Post",HUB.Startup.signal,"CommonHTML - font data loaded for " + font],
+ ["loadComplete",AJAX,this.fontDir+"/"+font]
+ );
+ },
+
+ Element: function (type,def,content) {
+ if (type.substr(0,4) === "mjx-") {
+ if (!def) def = {};
+ if (def.isMathJax == null) def.isMathJax = true;
+ if (def.className) def.className = type+" "+def.className; else def.className = type;
+ type = "span";
+ }
+ return this.HTMLElement(type,def,content);
+ },
+ addElement: function (node,type,def,content) {
+ return node.appendChild(this.Element(type,def,content));
+ },
+ HTMLElement: HTML.Element,
+ ucMatch: HTML.ucMatch,
+ setScript: HTML.setScript,
+
+ //
+ // Look through the direct children of a node for one with the given
+ // type (but if the node has intervening containers for its children,
+ // step into them; note that elements corresponding to MathML nodes
+ // will have id's so we don't step into them).
+ //
+ // This is used by munderover and msubsup to locate their child elements
+ // when they are part of an embellished operator that is being stretched.
+ // We don't use querySelector because we want to find only the direct child
+ // nodes, not nodes that might be nested deeper in the tree (see issue #1447).
+ //
+ getNode: function (node,type) {
+ var name = RegExp("\\b"+type+"\\b");
+ var nodes = [];
+ while (node) {
+ for (var i = 0, m = node.childNodes.length; i < m; i++) {
+ var child = node.childNodes[i];
+ if (child) {
+ if (name.test(child.className)) return child;
+ if (child.id === "") nodes.push(child);
+ }
+ }
+ node = nodes.shift();
+ }
+ return null;
+ },
+
+ /********************************************/
+
+ preTranslate: function (state) {
+ var scripts = state.jax[this.id], i, m = scripts.length,
+ script, prev, node, test, jax, ex, em, scale;
+ //
+ // Get linebreaking information
+ //
+ var maxwidth = 100000, relwidth = false, cwidth = 0,
+ linebreak = LINEBREAKS.automatic, width = LINEBREAKS.width;
+ if (linebreak) {
+ relwidth = !!width.match(/^\s*(\d+(\.\d*)?%\s*)?container\s*$/);
+ if (relwidth) {width = width.replace(/\s*container\s*/,"")}
+ else {maxwidth = this.defaultWidth}
+ if (width === "") {width = "100%"}
+ }
+ //
+ // Loop through the scripts
+ //
+ for (i = 0; i < m; i++) {
+ script = scripts[i]; if (!script.parentNode) continue;
+ //
+ // Remove any existing output
+ //
+ prev = script.previousSibling;
+ if (prev && prev.className && String(prev.className).substr(0,9) === "mjx-chtml")
+ prev.parentNode.removeChild(prev);
+ if (script.MathJax.preview) script.MathJax.preview.style.display = "none";
+ //
+ // Add the node for the math and mark it as being processed
+ //
+ jax = script.MathJax.elementJax; if (!jax) continue;
+ jax.CHTML = {
+ display: (jax.root.Get("display") === "block"),
+ preview: (jax.CHTML||{}).preview // in case typeset calls are interleaved
+ };
+ node = CHTML.Element("mjx-chtml",{
+ id:jax.inputID+"-Frame", className:"MathJax_CHTML", isMathJax:true, jaxID:this.id,
+ oncontextmenu:EVENT.Menu, onmousedown: EVENT.Mousedown,
+ onmouseover:EVENT.Mouseover, onmouseout:EVENT.Mouseout, onmousemove:EVENT.Mousemove,
+ onclick:EVENT.Click, ondblclick:EVENT.DblClick,
+ // Added for keyboard accessible menu.
+ onkeydown: EVENT.Keydown, tabIndex: HUB.getTabOrder(jax)
+ });
+ if (jax.CHTML.display) {
+ //
+ // Zoom box requires an outer container to get the positioning right.
+ //
+ var NODE = CHTML.Element("mjx-chtml",{className:"MJXc-display",isMathJax:false});
+ NODE.appendChild(node); node = NODE;
+ }
+ if (HUB.Browser.noContextMenu) {
+ node.ontouchstart = TOUCH.start;
+ node.ontouchend = TOUCH.end;
+ }
+ //
+ node.className += " MJXc-processing";
+ script.parentNode.insertBefore(node,script);
+ //
+ // Add test nodes for determining scales and linebreak widths
+ //
+ test = this.TestSpan.cloneNode(true);
+ test.className += " mjx-test-" + (jax.CHTML.display ? "display" : "inline");
+ script.parentNode.insertBefore(test,script);
+ }
+ //
+ // Determine the scaling factors for each script
+ // (this only requires one reflow rather than a reflow for each equation)
+ //
+ for (i = 0; i < m; i++) {
+ script = scripts[i]; if (!script.parentNode) continue;
+ test = script.previousSibling;
+ jax = script.MathJax.elementJax; if (!jax) continue;
+ em = CHTML.getFontSize(test);
+ ex = test.childNodes[1].offsetHeight/60;
+ cwidth = Math.max(0, jax.CHTML.display ? test.lastChild.offsetWidth - 1:
+ test.lastChild.offsetLeft - test.firstChild.offsetLeft - 2);
+ if (ex === 0 || ex === "NaN") {
+ ex = this.defaultEx;
+ cwidth = this.defaultWidth;
+ }
+ if (cwidth === 0 && !jax.CHTML.display) cwidth = this.defaultWidth;
+ if (relwidth) maxwidth = cwidth;
+ scale = (this.config.matchFontHeight ? ex/this.TEX.x_height/em : 1);
+ scale = Math.floor(Math.max(this.config.minScaleAdjust/100,scale)*this.config.scale);
+ jax.CHTML.scale = scale/100; jax.CHTML.fontSize = scale+"%";
+ jax.CHTML.outerEm = em; jax.CHTML.em = this.em = em * scale/100;
+ jax.CHTML.ex = ex; jax.CHTML.cwidth = cwidth/this.em;
+ jax.CHTML.lineWidth = (linebreak ? this.length2em(width,maxwidth/this.em,1) : maxwidth);
+ }
+ //
+ // Remove the test spans used for determining scales and linebreak widths
+ //
+ for (i = 0; i < m; i++) {
+ script = scripts[i]; if (!script.parentNode) continue;
+ jax = script.MathJax.elementJax; if (!jax) continue;
+ script.parentNode.removeChild(script.previousSibling);
+ if (script.MathJax.preview) script.MathJax.preview.style.display = "";
+ }
+ state.CHTMLeqn = state.CHTMLlast = 0; state.CHTMLi = -1;
+ state.CHTMLchunk = this.config.EqnChunk;
+ state.CHTMLdelay = false;
+ },
+
+ /********************************************/
+
+ Translate: function (script,state) {
+ if (!script.parentNode) return;
+
+ //
+ // If we are supposed to do a chunk delay, do it
+ //
+ if (state.CHTMLdelay) {
+ state.CHTMLdelay = false;
+ HUB.RestartAfter(MathJax.Callback.Delay(this.config.EqnChunkDelay));
+ }
+
+ //
+ // Get the data about the math
+ //
+ var jax = script.MathJax.elementJax, math = jax.root,
+ node = document.getElementById(jax.inputID+"-Frame");
+ if (!node) return;
+ this.getMetrics(jax);
+ if (this.scale !== 1) node.style.fontSize = jax.CHTML.fontSize;
+ //
+ // Typeset the math
+ //
+ this.initCHTML(math,node);
+ this.savePreview(script);
+ this.CHTMLnode = node;
+ try {
+ math.setTeXclass();
+ math.toCommonHTML(node);
+ } catch (err) {
+ while (node.firstChild) node.removeChild(node.firstChild);
+ delete this.CHTMLnode;
+ this.restorePreview(script);
+ throw err;
+ }
+ delete this.CHTMLnode;
+ this.restorePreview(script);
+ //
+ // Put it in place, and remove the processing marker
+ //
+ if (jax.CHTML.display) node = node.parentNode;
+ node.className = node.className.replace(/ [^ ]+$/,"");
+ //
+ // Hide the math and don't let its preview be removed
+ //
+ node.className += " MJXc-processed";
+ if (script.MathJax.preview) {
+ jax.CHTML.preview = script.MathJax.preview;
+ delete script.MathJax.preview;
+ }
+ //
+ // Check if we should show this chunk of equations
+ //
+ state.CHTMLeqn += (state.i - state.CHTMLi); state.CHTMLi = state.i;
+ if (state.CHTMLeqn >= state.CHTMLlast + state.CHTMLchunk) {
+ this.postTranslate(state);
+ state.CHTMLchunk = Math.floor(state.CHTMLchunk*this.config.EqnChunkFactor);
+ state.CHTMLdelay = true; // delay if there are more scripts
+ }
+ },
+
+ initCHTML: function (math,node) {},
+
+ //
+ // MathML previews can contain the same ID's as the HTML output,
+ // which confuses CHTMLnodeElement(), so remove the preview temporarily
+ // and restore it after typesetting the math.
+ //
+ savePreview: function (script) {
+ var preview = script.MathJax.preview;
+ if (preview && preview.parentNode) {
+ script.MathJax.tmpPreview = document.createElement("span");
+ preview.parentNode.replaceChild(script.MathJax.tmpPreview,preview);
+ }
+ },
+ restorePreview: function (script) {
+ var tmpPreview = script.MathJax.tmpPreview;
+ if (tmpPreview) {
+ tmpPreview.parentNode.replaceChild(script.MathJax.preview,tmpPreview);
+ delete script.MathJax.tmpPreview;
+ }
+ },
+ //
+ // Get the jax metric information
+ //
+ getMetrics: function(jax) {
+ var data = jax.CHTML;
+ this.jax = jax;
+ this.em = data.em;
+ this.outerEm = data.outerEm;
+ this.scale = data.scale;
+ this.cwidth = data.cwidth;
+ this.linebreakWidth = data.lineWidth;
+ },
+
+ /********************************************/
+
+ postTranslate: function (state) {
+ var scripts = state.jax[this.id];
+ //
+ // Reveal this chunk of math
+ //
+ for (var i = state.CHTMLlast, m = state.CHTMLeqn; i < m; i++) {
+ var script = scripts[i];
+ if (script && script.MathJax.elementJax) {
+ //
+ // Remove the processed marker
+ //
+ script.previousSibling.className = script.previousSibling.className.replace(/ [^ ]+$/,"");
+ var data = script.MathJax.elementJax.CHTML;
+ //
+ // Remove the preview, if any
+ //
+ if (data.preview) {
+ data.preview.innerHTML = "";
+ script.MathJax.preview = data.preview;
+ delete data.preview;
+ }
+ }
+ }
+ //
+ // Save our place so we know what is revealed
+ //
+ state.CHTMLlast = state.CHTMLeqn;
+ },
+
+ /********************************************/
+
+ getJaxFromMath: function (math) {
+ if (math.parentNode.className.match(/MJXc-display/)) math = math.parentNode;
+ do {math = math.nextSibling} while (math && math.nodeName.toLowerCase() !== "script");
+ return HUB.getJaxFor(math);
+ },
+ getHoverSpan: function (jax,math) {return jax.root.CHTMLnodeElement()},
+ getHoverBBox: function (jax,span,math) {
+ var bbox = jax.root.CHTML, em = jax.CHTML.outerEm;
+ var BBOX = {w:bbox.w*em, h:bbox.h*em, d:bbox.d*em};
+ if (bbox.width) {BBOX.width = bbox.width}
+ return BBOX;
+ },
+
+ Zoom: function (jax,span,math,Mw,Mh) {
+ //
+ // Re-render at larger size
+ //
+ this.getMetrics(jax);
+ var node = CHTML.addElement(span,"mjx-chtml",{style:{"font-size":Math.floor(CHTML.scale*100)+"%"},isMathJax:false});
+ CHTML.CHTMLnode = node;
+ this.idPostfix = "-zoom"; jax.root.toCommonHTML(node); this.idPostfix = "";
+ //
+ // Adjust margins to prevent overlaps at the edges
+ //
+ var style = node.style, bbox = jax.root.CHTML;
+ if (bbox.t > bbox.h) style.marginTop = CHTML.Em(bbox.t-bbox.h);
+ if (bbox.b > bbox.d) style.marginBottom = CHTML.Em(bbox.b-bbox.d);
+ if (bbox.l < 0) style.paddingLeft = CHTML.Em(-bbox.l);
+ if (bbox.r > bbox.w) style.marginRight = CHTML.Em(bbox.r-bbox.w);
+ //
+ // Get height and width of zoomed math and original math
+ //
+ style.position = "absolute";
+ var zW = node.offsetWidth, zH = node.offsetHeight,
+ mH = math.firstChild.offsetHeight, mW = math.firstChild.offsetWidth;
+ node.style.position = "";
+ //
+ return {Y:-EVENT.getBBox(span).h, mW:mW, mH:mH, zW:zW, zH:zH};
+ },
+
+ Remove: function (jax) {
+ var node = document.getElementById(jax.inputID+"-Frame");
+ if (node && jax.CHTML.display) node = node.parentNode;
+ if (node) node.parentNode.removeChild(node);
+ delete jax.CHTML;
+ },
+
+ /********************************************/
+
+ ID: 0, idPostfix: "",
+ GetID: function () {this.ID++; return this.ID},
+
+ /********************************************/
+
+ MATHSPACE: {
+ veryverythinmathspace: 1/18,
+ verythinmathspace: 2/18,
+ thinmathspace: 3/18,
+ mediummathspace: 4/18,
+ thickmathspace: 5/18,
+ verythickmathspace: 6/18,
+ veryverythickmathspace: 7/18,
+ negativeveryverythinmathspace: -1/18,
+ negativeverythinmathspace: -2/18,
+ negativethinmathspace: -3/18,
+ negativemediummathspace: -4/18,
+ negativethickmathspace: -5/18,
+ negativeverythickmathspace: -6/18,
+ negativeveryverythickmathspace: -7/18,
+
+ thin: .04,
+ medium: .06,
+ thick: .1,
+
+ infinity: BIGDIMEN
+ },
+ SPACECLASS: {
+ thinmathspace: "MJXc-space1",
+ mediummathspace: "MJXc-space2",
+ thickmathspace: "MJXc-space3"
+ },
+ pxPerInch: 96,
+ em: 16,
+
+ maxStretchyParts: 1000, // limit the number of parts allowed for
+ // stretchy operators. See issue 366.
+
+ FONTDEF: {},
+ TEXDEF: {
+ x_height: .442,
+ 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,
+ rule_thickness: .06,
+ big_op_spacing1: .111111,
+ big_op_spacing2: .166666,
+ big_op_spacing3: .2,
+ big_op_spacing4: .45, //.6, // better spacing for under arrows and braces
+ big_op_spacing5: .1,
+
+ surd_height: .075,
+
+ scriptspace: .05,
+ nulldelimiterspace: .12,
+ delimiterfactor: 901,
+ delimitershortfall: .3,
+
+ min_rule_thickness: 1.25 // in pixels
+ },
+
+ /********************************************************/
+
+ //
+ // True if text holds a single (unicode) glyph
+ //
+ isChar: function (text) {
+ if (text.length === 1) return true;
+ if (text.length !== 2) return false;
+ var n = text.charCodeAt(0);
+ return (n >= 0xD800 && n < 0xDBFF);
+ },
+ //
+ // Get a unicode character by number (even when it takes two character)
+ //
+ unicodeChar: function (n) {
+ if (n < 0xFFFF) return String.fromCharCode(n);
+ n -= 0x10000;
+ return String.fromCharCode((n>>10)+0xD800) + String.fromCharCode((n&0x3FF)+0xDC00);
+ },
+ //
+ // Get the unicode number of a (possibly multi-character) string
+ //
+ getUnicode: function (string) {
+ var n = string.text.charCodeAt(string.i); string.i++;
+ if (n >= 0xD800 && n < 0xDBFF) {
+ n = (((n-0xD800)<<10)+(string.text.charCodeAt(string.i)-0xDC00))+0x10000;
+ string.i++;
+ }
+ return n;
+ },
+ //
+ // Get the list of actions for a given character in a given variant
+ // (processing remaps, multi-character results, and so on). Results are
+ // cached so that future lookups for the same variant/n pair will not
+ // require looking through the data again.
+ //
+ getCharList: function (variant,n) {
+ var id, M, cache = variant.cache, nn = n;
+ if (cache[n]) return cache[n];
+ if (n > 0xFFFF && this.FONTDATA.RemapPlane1) {
+ var nv = this.FONTDATA.RemapPlane1(n,variant);
+ n = nv.n; variant = nv.variant;
+ }
+ var RANGES = this.FONTDATA.RANGES, VARIANT = this.FONTDATA.VARIANT;
+ if (n >= RANGES[0].low && n <= RANGES[RANGES.length-1].high) {
+ for (id = 0, M = RANGES.length; id < M; id++) {
+ if (RANGES[id].name === "alpha" && variant.noLowerCase) continue;
+ var N = variant["offset"+RANGES[id].offset];
+ if (N && n >= RANGES[id].low && n <= RANGES[id].high) {
+ if (RANGES[id].remap && RANGES[id].remap[n]) {
+ n = N + RANGES[id].remap[n];
+ } else {
+ n = n - RANGES[id].low + N;
+ if (RANGES[id].add) {n += RANGES[id].add}
+ }
+ if (variant["variant"+RANGES[id].offset])
+ variant = VARIANT[variant["variant"+RANGES[id].offset]];
+ break;
+ }
+ }
+ }
+ cache[nn] = this.remapChar(variant,n,0);
+ return cache[nn];
+ },
+ remapChar: function (variant,n,N) {
+ var list = [], VARIANT = this.FONTDATA.VARIANT;
+ if (variant.remap && variant.remap[n]) {
+ n = variant.remap[n];
+ if (variant.remap.variant) {variant = VARIANT[variant.remap.variant]}
+ } else if (this.FONTDATA.REMAP[n] && !variant.noRemap) {
+ n = this.FONTDATA.REMAP[n];
+ }
+ if (isArray(n)) {
+ if (n[2]) N = MAXREMAP; // stop remapping
+ variant = VARIANT[n[1]]; n = n[0];
+ }
+ if (typeof(n) === "string") {
+ var string = {text:n, i:0, length:n.length};
+ while (string.i < string.length) {
+ n = this.getUnicode(string);
+ var chars = this.getCharList(variant,n);
+ if (chars) list.push.apply(list,chars);
+ }
+ } else {
+ if (variant.cache[n]) {list = variant.cache[n]}
+ else {variant.cache[n] = list = this.lookupChar(variant,n,N)}
+ }
+ return list;
+ },
+ //
+ // After all remapping has been done, look up a character
+ // in the fonts for a given variant, chaining to other
+ // variants as needed. Return an undefined character if
+ // it isn't found in the given variant.
+ //
+ lookupChar: function (variant,n,N) {
+ var VARIANT = variant;
+ while (variant) {
+ for (var i = 0, m = variant.fonts.length; i < m; i++) {
+ var font = this.FONTDATA.FONTS[variant.fonts[i]];
+ if (typeof(font) === "string") this.loadFont(font);
+ var C = font[n];
+ if (C) {
+ this.fixChar(C,n);
+ if (C[5].space) return [{type:"space", w:C[2], font:font}];
+ return [{type:"char", font:font, n:n}];
+ } else if (font.Extra) {
+ this.findBlock(font,n);
+ }
+ }
+ variant = this.FONTDATA.VARIANT[variant.chain];
+ if (variant && variant.remap && variant.remap[n] && N++ < MAXREMAP) {
+ return this.remapChar(variant,n,N);
+ }
+ }
+ return [this.unknownChar(VARIANT,n)];
+ },
+ fixChar: function (C,n) {
+ if (C.length === 5) C[5] = {};
+ if (C.c == null) {
+ C[0] /= 1000; C[1] /= 1000; C[2] /= 1000; C[3] /= 1000; C[4] /= 1000;
+ C.c = this.unicodeChar(n);
+ }
+ return C;
+ },
+ findBlock: function (font,n) {
+ var extra = font.Extra, name = font.file, file;
+ for (var i = 0, m = extra.length; i < m; i++) {
+ if (typeof(extra[i]) === "number") {
+ if (n === extra[i]) {file = name; break}
+ } else {
+ if (n < extra[i][0]) return;
+ if (n <= extra[i][1]) {file = name; break}
+ }
+ }
+ //
+ // Currently this only loads one extra file, but that
+ // might need to be expanded in the future.
+ //
+ if (file) {delete font.Extra; this.loadFont(name)}
+ },
+ //
+ // Create a fake font entry for an unknown character.
+ //
+ unknownChar: function (variant,n) {
+ HUB.signal.Post(["CommonHTML Jax - unknown char",n,variant]);
+ var id = ""; if (variant.bold) id += "B"; if (variant.italic) id += "I";
+ var unknown = this.FONTDATA.UNKNOWN[id||"R"]; // cache of previously measured characters
+ if (!unknown[n]) this.getUnknownChar(unknown,n);
+ return {type:"unknown", n:n, font:unknown};
+ },
+ getUnknownChar: function (unknown,n) {
+ var c = this.unicodeChar(n);
+ var HDW = this.getHDW(c,unknown.className);
+ // ### FIXME: provide a means of setting the height and depth for individual characters
+ unknown[n] = [.8,.2,HDW.w,0,HDW.w,{a:Math.max(0,(HDW.h-HDW.d)/2), h:HDW.h, d:HDW.d}];
+ unknown[n].c = c;
+ },
+ styledText: function (variant,text) {
+ HUB.signal.Post(["CommonHTML Jax - styled text",text,variant]);
+ var style = variant.style;
+ var id = "_"+(style["font-family"]||variant.className||"");
+ if (style["font-weight"]) id += "_"+style["font-weight"];
+ if (style["font-style"]) id += "_"+style["font-style"];
+ if (!this.STYLEDTEXT) this.STYLEDTEXT = {};
+ if (!this.STYLEDTEXT[id]) this.STYLEDTEXT[id] = {className:variant.className||""};
+ var unknown = this.STYLEDTEXT[id];
+ if (!unknown["_"+text]) {
+ var HDW = this.getHDW(text,variant.className||"",style);
+ unknown["_"+text] = [.8,.2,HDW.w,0,HDW.w,{a:Math.max(0,(HDW.h-HDW.d)/2), h:HDW.h, d:HDW.d}];
+ unknown["_"+text].c = text;
+ }
+ return {type:"unknown", n:"_"+text, font:unknown, style:style, rscale:variant.rscale};
+ },
+
+ //
+ // Get the height, depth, and width of a character
+ // (height and depth are of the font, not the character).
+ // WARNING: causes reflow of the page!
+ //
+ getHDW: function (c,name,styles) {
+ var test1 = CHTML.addElement(CHTML.CHTMLnode,"mjx-chartest",{className:name},[["mjx-char",{style:styles},[c]]]);
+ var test2 = CHTML.addElement(CHTML.CHTMLnode,"mjx-chartest",{className:name},[["mjx-char",{style:styles},[c,["mjx-box"]]]]);
+ test1.firstChild.style.fontSize = test2.firstChild.style.fontSize = "";
+ var em = 5*CHTML.em;
+ var H1 = test1.offsetHeight, H2 = test2.offsetHeight, W = test1.offsetWidth;
+ CHTML.CHTMLnode.removeChild(test1);
+ CHTML.CHTMLnode.removeChild(test2);
+ if (H2 === 0) {
+ em = 5*CHTML.defaultEm;
+ var test = document.body.appendChild(document.createElement("div"));
+ test.appendChild(test1); test.appendChild(test2);
+ H1 = test1.offsetHeight, H2 = test2.offsetHeight, W = test1.offsetWidth;
+ document.body.removeChild(test);
+ }
+ var d = (H2-1000)/em, w = W/em, h = H1/em - d;
+ return {h:h, d:d, w:w}
+ },
+
+
+ /********************************************************/
+
+ //
+ // Process a character list into a given node and return
+ // the updated bounding box.
+ //
+ addCharList: function (node,list,bbox) {
+ var state = {text:"", className:null, a:0};
+ for (var i = 0, m = list.length; i < m; i++) {
+ var item = list[i];
+ if (this.charList[item.type]) (this.charList[item.type])(item,node,bbox,state,m);
+ }
+ if (state.text !== "") {
+ if (node.childNodes.length) {
+ this.charList.flushText(node,state);
+ } else {
+ HTML.addText(node,state.text);
+ if (node.className) node.className += " "+state.className;
+ else node.className = state.className;
+ }
+ }
+ bbox.b = (state.flushed ? 0 : bbox.a);
+ },
+ //
+ // The various item types are processed by these
+ // functions.
+ //
+ charList: {
+ //
+ // Character from the known fonts
+ //
+ "char": function (item,node,bbox,state,m) {
+ var font = item.font, remap = (font.remapCombining||{})[item.n];
+ if (font.className === state.className) {
+ remap = null;
+ } else if (state.className || (remap && state.text !== "")) {
+ this.flushText(node,state);
+ }
+ if (!state.a) state.a = font.centerline/1000;
+ if (state.a > (bbox.a||0)) bbox.a = state.a;
+ state.className = font.className;
+ var C = font[item.n];
+ if (remap) {
+ var FONT = font;
+ if (isArray(remap)) {
+ FONT = CHTML.FONTDATA.FONTS[remap[1]];
+ remap = remap[0];
+ if (typeof(FONT) === 'string') CHTML.loadFont(FONT);
+ }
+ if (FONT[item.n]) CHTML.fixChar(FONT[item.n],item.n);
+ C = CHTML.fixChar(FONT[remap],remap);
+ state.className = FONT.className;
+ }
+ state.text += C.c;
+ if (bbox.h < C[0]+HFUZZ) bbox.t = bbox.h = C[0]+HFUZZ;
+ if (bbox.d < C[1]+DFUZZ) bbox.b = bbox.d = C[1]+DFUZZ;
+ if (bbox.l > bbox.w+C[3]) bbox.l = bbox.w+C[3];
+ if (bbox.r < bbox.w+C[4]) bbox.r = bbox.w+C[4];
+ bbox.w += C[2] * (item.rscale||1);
+ if (m == 1 && font.skew && font.skew[item.n]) bbox.skew = font.skew[item.n];
+ if (C[5] && C[5].rfix) this.flushText(node,state).style.marginRight = CHTML.Em(C[5].rfix/1000);
+ if (remap) {
+ //
+ // Remap combining characters to non-combining versions since Safari
+ // handles them differently from everyone else. (#1709)
+ //
+ var chr = this.flushText(node,state);
+ var r = (FONT[item.n]||font[item.n])[4] - (C[4] - C[2]);
+ chr.style.marginLeft = CHTML.Em(-C[2]-r);
+ if (r < 0) chr.style.marginRight = CHTML.Em(-r);
+ }
+ },
+ //
+ // Space characters (not actually in the fonts)
+ //
+ space: function (item,node,bbox,state) {
+ if (item.w) {
+ if (state.text === "") state.className = item.font.className;
+ this.flushText(node,state).style.marginRight = CHTML.Em(item.w);
+ bbox.w += item.w;
+ }
+ },
+ //
+ // An unknown character (one not in the font data)
+ //
+ unknown: function (item,node,bbox,state) {
+ (this["char"])(item,node,bbox,state,0);
+ var C = item.font[item.n];
+ if (C[5].a) {
+ state.a = C[5].a;
+ if (bbox.a == null || state.a > bbox.a) bbox.a = state.a;
+ }
+ node = this.flushText(node,state,item.style);
+ if (C[2] < 3) node.style.width = CHTML.Em(C[2]); // only force width if not too large (#1718)
+ },
+ //
+ // Put the pending text into a box of the class, and
+ // reset the data about the text.
+ //
+ flushText: function (node,state,style) {
+ node = CHTML.addElement(node,"mjx-charbox",
+ {className:state.className,style:style},[state.text]);
+ if (state.a) node.style.paddingBottom = CHTML.Em(state.a);
+ state.text = ""; state.className = null; state.a = 0; state.flushed = true;
+ return node;
+ }
+ },
+
+ //
+ // Add the given text (in the given variant) into the given node, and
+ // update the bounding box of the result. Make sure the node's DOM
+ // bounding box matches the contents.
+ //
+ handleText: function (node,text,variant,bbox) {
+ if (node.childNodes.length === 0) {
+ CHTML.addElement(node,"mjx-char");
+ bbox = CHTML.BBOX.empty(bbox);
+ }
+ if (typeof(variant) === "string") variant = this.FONTDATA.VARIANT[variant];
+ if (!variant) variant = this.FONTDATA.VARIANT[MML.VARIANT.NORMAL];
+ var string = {text:text, i:0, length:text.length}, list = [];
+ if (variant.style && string.length) {
+ list.push(this.styledText(variant,text));
+ } else {
+ while (string.i < string.length) {
+ var n = this.getUnicode(string);
+ list.push.apply(list,this.getCharList(variant,n));
+ }
+ }
+ if (list.length) this.addCharList(node.firstChild,list,bbox);
+ bbox.clean();
+ if (bbox.d < 0) {bbox.D = bbox.d; bbox.d = 0}
+ if (bbox.h - bbox.a) node.firstChild.style[bbox.h - bbox.a < 0 ? "marginTop" : "paddingTop"] = this.EmRounded(bbox.h-bbox.a);
+ if (bbox.d > -bbox.b) node.firstChild.style.paddingBottom = this.EmRounded(bbox.d+bbox.b);
+ return bbox;
+ },
+
+ /********************************************************/
+
+ createDelimiter: function (node,code,HW,BBOX,font) {
+ if (!code) {
+ var bbox = this.BBOX.zero();
+ bbox.w = bbox.r = this.TEX.nulldelimiterspace;
+ CHTML.addElement(node,"mjx-box",{style:{width:bbox.w}});
+ return bbox;
+ }
+ if (!(HW instanceof Array)) HW = [HW,HW];
+ var hw = HW[1]; HW = HW[0];
+ var delim = {alias: code};
+ while (delim.alias) {
+ code = delim.alias; delim = this.FONTDATA.DELIMITERS[code];
+ if (!delim) {delim = {HW: [0,this.FONTDATA.VARIANT[MML.VARIANT.NORMAL]]}}
+ }
+ if (delim.load) HUB.RestartAfter(AJAX.Require(this.fontDir+"/TeX/fontdata-"+delim.load+".js"));
+ for (var i = 0, m = delim.HW.length; i < m; i++) {
+ if (delim.HW[i][0] >= HW-.01 || (i == m-1 && !delim.stretch)) {
+ if (delim.HW[i][3]) code = delim.HW[i][3];
+ bbox = this.createChar(node,[code,delim.HW[i][1]],(delim.HW[i][2]||1),font);
+ bbox.offset = .6 * bbox.w;
+ if (BBOX) {bbox.scale = BBOX.scale; BBOX.rscale = BBOX.rscale}
+ return bbox;
+ }
+ }
+ if (!delim.stretch) return bbox;
+ return this["extendDelimiter"+delim.dir](node,hw,delim.stretch,BBOX,font);
+ },
+ extendDelimiterV: function (node,H,delim,BBOX,font) {
+ node = CHTML.addElement(node,"mjx-delim-v"); var tmp = CHTML.Element("span");
+ var top, bot, mid, ext, tbox, bbox, mbox, ebox, k = 1, c;
+ tbox = this.createChar(tmp,(delim.top||delim.ext),1,font); top = tmp.removeChild(tmp.firstChild);
+ bbox = this.createChar(tmp,(delim.bot||delim.ext),1,font); bot = tmp.removeChild(tmp.firstChild);
+ mbox = ebox = CHTML.BBOX.zero();
+ var h = tbox.h + tbox.d + bbox.h + bbox.d - EFUZZ;
+ node.appendChild(top);
+ if (delim.mid) {
+ mbox = this.createChar(tmp,delim.mid,1,font); mid = tmp.removeChild(tmp.firstChild);
+ h += mbox.h + mbox.d; k = 2;
+ }
+ if (delim.min && H < h*delim.min) H = h*delim.min;
+ if (H > h) {
+ ebox = this.createChar(tmp,delim.ext,1,font); ext = tmp.removeChild(tmp.firstChild);
+ var eH = ebox.h + ebox.d, eh = eH - EFUZZ;
+ var n = Math.min(Math.ceil((H-h)/(k*eh)),this.maxStretchyParts);
+ if (delim.fullExtenders) H = n*k*eh + h; else eh = (H-h)/(k*n);
+ c = ebox.d + ebox.a - eH/2; // for centering of extenders
+ ext.style.margin = ext.style.padding = "";
+ ext.style.lineHeight = CHTML.Em(eh);
+ ext.style.marginBottom = CHTML.Em(c-EFUZZ/2/k);
+ ext.style.marginTop = CHTML.Em(-c-EFUZZ/2/k);
+ var TEXT = ext.textContent, text = "\n"+TEXT;
+ while (--n > 0) TEXT += text;
+ ext.textContent = TEXT;
+ node.appendChild(ext);
+ if (delim.mid) {
+ node.appendChild(mid);
+ node.appendChild(ext.cloneNode(true));
+ }
+ } else {
+ c = (H-h-EFUZZ) / k;
+ top.style.marginBottom = CHTML.Em(c+parseFloat(top.style.marginBottom||"0"));
+ if (delim.mid) node.appendChild(mid);
+ bot.style.marginTop = CHTML.Em(c+parseFloat(bot.style.marginTop||"0"));
+ }
+ node.appendChild(bot);
+ var vbox = CHTML.BBOX({
+ w: Math.max(tbox.w,ebox.w,bbox.w,mbox.w),
+ l: Math.min(tbox.l,ebox.l,bbox.l,mbox.l),
+ r: Math.max(tbox.r,ebox.r,bbox.r,mbox.r),
+ h: H-bbox.d, d: bbox.d, t: H-bbox.d, b: bbox.d
+ });
+ vbox.offset = .5 * vbox.w;
+ if (BBOX) {vbox.scale = BBOX.scale; vbox.rscale = BBOX.rscale}
+ return vbox;
+ },
+ extendDelimiterH: function (node,W,delim,BBOX,font) {
+ node = CHTML.addElement(node,"mjx-delim-h"); var tmp = CHTML.Element("span");
+ var left, right, mid, ext, ext2, lbox, rbox, mbox, ebox, k = 1;
+ lbox = this.createChar(tmp,(delim.left||delim.rep),1,font); left = tmp.removeChild(tmp.firstChild);
+ rbox = this.createChar(tmp,(delim.right||delim.rep),1,font); right = tmp.removeChild(tmp.firstChild);
+ ebox = this.createChar(tmp,delim.rep,1,font); ext = tmp.removeChild(tmp.firstChild);
+ left.style.marginLeft = CHTML.Em(-lbox.l);
+ right.style.marginRight = CHTML.Em(rbox.r-rbox.w);
+ node.appendChild(left);
+ var hbox = CHTML.BBOX.zero();
+ hbox.h = Math.max(lbox.h,rbox.h,ebox.h);
+ hbox.d = Math.max(lbox.D||lbox.d,rbox.D||rbox.d,ebox.D||ebox.d);
+ var w = (lbox.r - lbox.l) + (rbox.r - rbox.l) - EFUZZ;
+ if (delim.mid) {
+ mbox = this.createChar(tmp,delim.mid,1,font);
+ mid = tmp.removeChild(tmp.firstChild);
+ mid.style.marginleft = CHTML.Em(-mbox.l); mid.style.marginRight = CHTML.Em(mbox.r-mbox.w);
+ w += mbox.r - mbox.l + EFUZZ; k = 2;
+ if (mbox.h > hbox.h) hbox.h = mbox.h;
+ if (mbox.d > hbox.d) hbox.d = mbox.d;
+ }
+ if (delim.min && W < w*delim.min) W = w*delim.min;
+ hbox.w = hbox.r = W;
+ if (W > w) {
+ var eW = ebox.r-ebox.l, ew = eW - EFUZZ;
+ var n = Math.min(Math.ceil((W-w)/(k*ew)),this.maxStretchyParts);
+ if (delim.fullExtenders) W = n*k*ew + w; else ew = (W-w)/(k*n);
+ var c = (eW - ew + EFUZZ/k) / 2; // for centering of extenders
+ ext.style.marginLeft = CHTML.Em(-ebox.l-c);
+ ext.style.marginRight = CHTML.Em(ebox.r-ebox.w+c);
+ ext.style.letterSpacing = CHTML.Em(-(ebox.w-ew));
+ left.style.marginRight = CHTML.Em(lbox.r-lbox.w);
+ right.style.marginleft = CHTML.Em(-rbox.l);
+ var TEXT = ext.textContent, text = TEXT;
+ while (--n > 0) TEXT += text;
+ ext.textContent = TEXT;
+ node.appendChild(ext);
+ if (delim.mid) {
+ node.appendChild(mid);
+ ext2 = node.appendChild(ext.cloneNode(true));
+ }
+ } else {
+ c = (W-w-EFUZZ/k) / 2;
+ left.style.marginRight = CHTML.Em(lbox.r-lbox.w+c);
+ if (delim.mid) node.appendChild(mid);
+ right.style.marginLeft = CHTML.Em(-rbox.l+c);
+ }
+ node.appendChild(right);
+ this.adjustHeights([left,ext,mid,ext2,right],[lbox,ebox,mbox,ebox,rbox],hbox);
+ if (BBOX) {hbox.scale = BBOX.scale; hbox.rscale = BBOX.rscale}
+ return hbox;
+ },
+ adjustHeights: function (nodes,box,bbox) {
+ //
+ // To get alignment right in horizontal delimiters, we force all
+ // the elements to the same height and depth
+ //
+ var T = bbox.h, B = bbox.d;
+ if (bbox.d < 0) {B = -bbox.d; bbox.D = bbox.d; bbox.d = 0}
+ for (var i = 0, m = nodes.length; i < m; i++) if (nodes[i]) {
+ nodes[i].style.paddingTop = CHTML.Em(T-box[i].a);
+ nodes[i].style.paddingBottom = CHTML.Em(B+box[i].a);
+ nodes[i].style.marginTop = nodes[i].style.marginBottom = 0;
+ }
+ },
+ createChar: function (node,data,scale,font) {
+ // ### FIXME: handle cache better (by data[1] and font)
+ var text = "", variant = {fonts: [data[1]], noRemap:true, cache:{}};
+ if (font && font === MML.VARIANT.BOLD && this.FONTDATA.FONTS[data[1]+"-Bold"])
+ variant.fonts = [data[1]+"-Bold",data[1]];
+ if (typeof(data[1]) !== "string") variant = data[1];
+ if (data[0] instanceof Array) {
+ for (var i = 0, m = data[0].length; i < m; i++) text += String.fromCharCode(data[0][i]);
+ } else text = String.fromCharCode(data[0]);
+ if (data[4]) scale *= data[4];
+ var bbox = this.handleText(node,text,variant), style = node.firstChild.style;
+ if (scale !== 1) style.fontSize = this.Percent(scale);
+ if (data[2]) { // x offset
+ style.paddingLeft = this.Em(data[2]);
+ bbox.w += data[2]; bbox.r += data[2];
+ }
+ if (data[3]) { // y offset
+ style.verticalAlign = this.Em(data[3]);
+ bbox.h += data[3]; if (bbox.h < 0) bbox.h = 0;
+ }
+ if (data[5]) { // extra height
+ style.marginTop = this.Em(data[5]);
+ bbox.h += data[5]; bbox.t += data[5];
+ }
+ if (data[6]) { // extra depth
+ style.marginBottom = this.Em(data[6]);
+ bbox.d += data[6]; bbox.b += data[6];
+ }
+ return bbox;
+ },
+
+ /********************************************************/
+
+ //
+ // ### FIXME: Handle mu's
+ //
+ length2em: function (length,size,scale) {
+ if (typeof(length) !== "string") length = length.toString();
+ if (length === "") return "";
+ if (length === MML.SIZE.NORMAL) return 1;
+ if (length === MML.SIZE.BIG) return 2;
+ if (length === MML.SIZE.SMALL) return .71;
+ if (this.MATHSPACE[length]) return this.MATHSPACE[length];
+ var match = length.match(/^\s*([-+]?(?:\.\d+|\d+(?:\.\d*)?))?(pt|em|ex|mu|px|pc|in|mm|cm|%)?/);
+ var m = parseFloat(match[1]||"1"), unit = match[2];
+ if (size == null) size = 1; if (!scale) scale = 1;
+ scale = 1 /this.em / scale;
+ if (unit === "em") return m;
+ if (unit === "ex") return m * this.TEX.x_height;
+ if (unit === "%") return m / 100 * size;
+ if (unit === "px") return m * scale;
+ if (unit === "pt") return m / 10; // 10 pt to an em
+ if (unit === "pc") return m * 1.2; // 12 pt to a pc
+ scale *= this.pxPerInch;
+ if (unit === "in") return m * scale;
+ if (unit === "cm") return m * scale / 2.54; // 2.54 cm to an inch
+ if (unit === "mm") return m * scale / 25.4; // 10 mm to a cm
+ if (unit === "mu") return m / 18; // 18mu to an em for the scriptlevel
+ return m*size; // relative to given size (or 1em as default)
+ },
+ thickness2em: function (length,scale) {
+ var thick = CHTML.TEX.rule_thickness/(scale||1);
+ if (length === MML.LINETHICKNESS.MEDIUM) return thick;
+ if (length === MML.LINETHICKNESS.THIN) return .67*thick;
+ if (length === MML.LINETHICKNESS.THICK) return 1.67*thick;
+ return this.length2em(length,thick,scale);
+ },
+
+ Em: function (m) {
+ if (Math.abs(m) < .001) return "0";
+ return (m.toFixed(3).replace(/\.?0+$/,""))+"em";
+ },
+ EmRounded: function (m) {
+ m = (Math.round(m*CHTML.em)+.05)/CHTML.em;
+ if (Math.abs(m) < .0006) {return "0em"}
+ return m.toFixed(3).replace(/\.?0+$/,"") + "em";
+ },
+ unEm: function (m) {
+ return parseFloat(m);
+ },
+ Px: function (m,M) {
+ m *= this.em;
+ if (M && m < M) m = M;
+ if (Math.abs(m) < .1) return "0";
+ return m.toFixed(1).replace(/\.0$/,"")+"px";
+ },
+
+ Percent: function (m) {
+ return (100*m).toFixed(1).replace(/\.?0+$/,"") + "%";
+ },
+
+ Transform: function (node,trans,origin) {
+ var style = node.style;
+ style.transform = style.WebkitTransform = style.MozTransform = style["-ms-transform"] = trans;
+ if (origin)
+ style.transformOrigin = style.WebkitTransformOrigin =
+ style.MozTransformOrigin = style["-ms-transform-origin"] = origin;
+ },
+
+ /********************************************************/
+
+ arrayEntry: function (a,i) {return a[Math.max(0,Math.min(i,a.length-1))]},
+
+ //
+ // Styles to be removed from style="..." attributes
+ //
+ removeStyles: ["fontSize","fontFamily","fontWeight","fontStyle","fontVariant","font"]
+
+ });
+
+ /**********************************************************/
+
+ CHTML.BBOX = MathJax.Object.Subclass({
+ Init: function (def) {
+ for (var id in def) {
+ if (def.hasOwnProperty(id)) this[id] = def[id];
+ }
+ },
+ clean: function () {
+ if (this.h === -BIGDIMEN) this.h = 0;
+ if (this.d === -BIGDIMEN) this.d = 0;
+ if (this.l === BIGDIMEN) this.l = 0;
+ if (this.r === -BIGDIMEN) this.r = 0;
+ if (this.t === -BIGDIMEN) this.t = 0;
+ if (this.b === -BIGDIMEN) this.b = 0;
+ if (this.D && this.d > 0) delete this.D;
+ },
+ rescale: function (scale) {
+ this.w *= scale; this.h *= scale; this.d *= scale;
+ this.l *= scale; this.r *= scale; this.t *= scale; this.b *= scale;
+ if (this.L) this.L *= scale;
+ if (this.R) this.R *= scale;
+ if (this.D) this.D *= scale;
+ },
+ combine: function (cbox,x,y) {
+ cbox.X = x; cbox.Y = y; // save for use with line breaking
+ var scale = cbox.rscale;
+ if (x + scale*cbox.r > this.r) this.r = x + scale*cbox.r;
+ if (x + scale*cbox.l < this.l) this.l = x + scale*cbox.l;
+ if (x + scale*(cbox.w+(cbox.L||0)+(cbox.R||0)) > this.w)
+ this.w = x + scale*(cbox.w + (cbox.L||0) + (cbox.R||0));
+ if (y + scale*cbox.h > this.h) this.h = y + scale*cbox.h;
+ if (cbox.D && (this.D == null || scale*cbox.D - y > this.D) && scale*cbox.D > this.d) this.D = scale*cbox.D - y;
+ else if (cbox.D == null && this.D) delete this.D;
+ if (scale*cbox.d - y > this.d) this.d = scale*cbox.d - y;
+ if (y + scale*cbox.t > this.t) this.t = y + scale*cbox.t;
+ if (scale*cbox.b - y > this.b) this.b = scale*cbox.b - y;
+ },
+ append: function (cbox) {
+ var scale = cbox.rscale; var x = this.w;
+ if (x + scale*cbox.r > this.r) this.r = x + scale*cbox.r;
+ if (x + scale*cbox.l < this.l) this.l = x + scale*cbox.l;
+ this.w += scale*(cbox.w+(cbox.L||0)+(cbox.R||0)) ;
+ if (scale*cbox.h > this.h) this.h = scale*cbox.h;
+ if (cbox.D && (this.D == null || scale*cbox.D > this.D) && scale*cbox.D > this.d) this.D = scale*cbox.D;
+ else if (cbox.D == null && this.D) delete this.D;
+ if (scale*cbox.d > this.d) this.d = scale*cbox.d;
+ if (scale*cbox.t > this.t) this.t = scale*cbox.t;
+ if (scale*cbox.b > this.b) this.b = scale*cbox.b;
+ },
+ updateFrom: function (cbox) {
+ this.h = cbox.h; this.d = cbox.d; this.w = cbox.w; this.r = cbox.r; this.l = cbox.l;
+ this.t = cbox.t; this.b = cbox.b;
+ if (cbox.pwidth) this.pwidth = cbox.pwidth;
+ if (cbox.D) this.D = cbox.D; else delete this.D;
+ },
+ adjust: function (m,x,X,M) {
+ this[x] += CHTML.length2em(m,1,this.scale);
+ if (M == null) {
+ if (this[x] > this[X]) this[X] = this[x];
+ } else {
+ if (this[X] < M) this[X] = M;
+ }
+ }
+ },{
+ zero: function () {
+ return CHTML.BBOX({h:0, d:0, w:0, l:0, r:0, t:0, b:0, scale:1, rscale:1});
+ },
+ empty: function (bbox) {
+ if (!bbox) bbox = CHTML.BBOX.zero();
+ bbox.h = bbox.d = bbox.r = bbox.t = bbox.b = -BIGDIMEN;
+ bbox.w = 0; bbox.l = BIGDIMEN;
+ delete bbox.pwidth;
+ return bbox;
+ },
+ //
+ // CSS styles that affect BBOXes
+ //
+ styleAdjust: [
+ ["borderTopWidth","h","t"],
+ ["borderRightWidth","w","r"],
+ ["borderBottomWidth","d","b"],
+ ["borderLeftWidth","w","l",0],
+ ["paddingTop","h","t"],
+ ["paddingRight","w","r"],
+ ["paddingBottom","d","b"],
+ ["paddingLeft","w","l",0],
+ ]
+ });
+
+ /**********************************************************/
+
+ MathJax.Hub.Register.StartupHook("mml Jax Ready",function () {
+ MML = MathJax.ElementJax.mml;
+
+ /********************************************************/
+
+ MML.mbase.Augment({
+ toCommonHTML: function (node,options) {
+ return this.CHTMLdefaultNode(node,options);
+ },
+ CHTMLmultiline: function () {MML.mbase.CHTMLautoloadFile("multiline")},
+
+ CHTMLdefaultNode: function (node,options) {
+ if (!options) options = {};
+ node = this.CHTMLcreateNode(node); this.CHTML = CHTML.BBOX.empty();
+ this.CHTMLhandleStyle(node);
+ if (this.isToken) this.CHTMLgetVariant();
+ this.CHTMLhandleScale(node);
+ var m = Math.max((options.minChildren||0),this.data.length);
+ for (var i = 0; i < m; i++) this.CHTMLaddChild(node,i,options);
+ if (!options.noBBox) this.CHTML.clean();
+ this.CHTMLhandleSpace(node);
+ this.CHTMLhandleBBox(node);
+ this.CHTMLhandleColor(node);
+ return node;
+ },
+ CHTMLaddChild: function (node,i,options) {
+ var child = this.data[i], cnode;
+ var type = options.childNodes;
+ if (type instanceof Array) type = type[i]||"span";
+ if (child) {
+ if (type) node = CHTML.addElement(node,type);
+ cnode = child.toCommonHTML(node,options.childOptions);
+ if (type && child.CHTML.rscale !== 1) {
+ // move scale factor to outer container (which seems to be more accurate)
+ node.style.fontSize = node.firstChild.style.fontSize;
+ node.firstChild.style.fontSize = "";
+ }
+ if (!options.noBBox) {
+ var bbox = this.CHTML, cbox = child.CHTML;
+ bbox.append(cbox);
+ if (this.data.length === 1) {
+ if (cbox.ic) bbox.ic = cbox.ic;
+ if (cbox.skew) bbox.skew = cbox.skew;
+ } else {
+ delete bbox.ic;
+ delete bbox.skew;
+ }
+ if (cbox.pwidth) bbox.pwidth = cbox.pwidth;
+ }
+ } else if (options.forceChild) {
+ cnode = CHTML.addElement(node,(type||"mjx-box"));
+ }
+ return cnode;
+ },
+
+ CHTMLchildNode: function (node,i) {
+ node = node.childNodes[i];
+ if (node.nodeName.toLowerCase() === "a") node = node.firstChild;
+ return node;
+ },
+ CHTMLcoreNode: function (node) {
+ if (this.inferRow && this.data[0]) return this.data[0].CHTMLcoreNode(node.firstChild);
+ return this.CHTMLchildNode(node,this.CoreIndex());
+ },
+
+ CHTMLstretchChildV: function (i,H,D) {
+ var data = this.data[i];
+ if (data) {
+ var bbox = this.CHTML, dbox = data.CHTML;
+ if (dbox.stretch || (dbox.stretch == null && data.CHTMLcanStretch("Vertical",H,D))) {
+ var w = dbox.w;
+ dbox = data.CHTMLstretchV(H,D);
+ bbox.w += dbox.w - w;
+ if (bbox.w > bbox.r) bbox.r = bbox.w;
+ if (dbox.h > bbox.h) bbox.h = dbox.h;
+ if (dbox.d > bbox.d) bbox.d = dbox.d;
+ if (dbox.t > bbox.t) bbox.t = dbox.t;
+ if (dbox.b > bbox.b) bbox.b = dbox.b;
+ }
+ }
+ },
+ CHTMLstretchChildH: function (i,W,node) {
+ var data = this.data[i];
+ if (data) {
+ var bbox = this.CHTML, dbox = data.CHTML;
+ if (dbox.stretch || (dbox.stretch == null && data.CHTMLcanStretch("Horizontal",W))) {
+ var w = dbox.w;
+ dbox = data.CHTMLstretchH(this.CHTMLchildNode(node,i),W);
+ bbox.w += dbox.w - w;
+ if (bbox.w > bbox.r) bbox.r = bbox.w;
+ if (dbox.h > bbox.h) bbox.h = dbox.h;
+ if (dbox.d > bbox.d) bbox.d = dbox.d;
+ if (dbox.t > bbox.t) bbox.t = dbox.t;
+ if (dbox.b > bbox.b) bbox.b = dbox.b;
+ }
+ }
+ },
+ CHTMLupdateFrom: function (bbox) {
+ this.CHTML.updateFrom(bbox);
+ if (this.inferRow) this.data[0].CHTML.updateFrom(bbox);
+ },
+
+ CHTMLcanStretch: function (direction,H,D) {
+ var stretch = false;
+ if (this.isEmbellished()) {
+ var core = this.Core();
+ if (core && core !== this) stretch = core.CHTMLcanStretch(direction,H,D);
+ }
+ this.CHTML.stretch = stretch;
+ return stretch;
+ },
+ CHTMLstretchV: function (h,d) {
+ this.CHTMLupdateFrom(this.Core().CHTMLstretchV(h,d));
+ return this.CHTML;
+ },
+ CHTMLstretchH: function (node,w) {
+ this.CHTMLupdateFrom(this.CHTMLstretchCoreH(node,w));
+ return this.CHTML;
+ },
+ CHTMLstretchCoreH: function (node,w) {
+ return this.Core().CHTMLstretchH(this.CHTMLcoreNode(node),w);
+ },
+
+ CHTMLcreateNode: function (node) {
+ if (!this.CHTML) this.CHTML = {};
+ this.CHTML = CHTML.BBOX.zero();
+ if (this.href) node = CHTML.addElement(node,"a",{href:this.href, isMathJax:true});
+ if (!this.CHTMLnodeID) this.CHTMLnodeID = CHTML.GetID();
+ var id = (this.id || "MJXc-Node-"+this.CHTMLnodeID)+CHTML.idPostfix;
+ return this.CHTMLhandleAttributes(CHTML.addElement(node,"mjx-"+this.type,{id:id}));
+ },
+ CHTMLnodeElement: function () {
+ if (!this.CHTMLnodeID) {return null}
+ return document.getElementById((this.id||"MJXc-Node-"+this.CHTMLnodeID)+CHTML.idPostfix);
+ },
+
+ CHTMLlength2em: function (length,size) {
+ return CHTML.length2em(length,size,this.CHTML.scale);
+ },
+
+ CHTMLhandleAttributes: function (node) {
+ if (this["class"]) {
+ if (node.className) node.className += " "+this["class"];
+ else node.className = this["class"];
+ }
+ //
+ // Copy RDFa, aria, and other tags from the MathML to the CHTML
+ // output nodes. Don't copy those in the MML.nocopyAttributes list,
+ // the ignoreMMLattributes configuration list, or anything that
+ // already exists as a property of the node (e.g., no "onlick", etc.)
+ // If a name in the ignoreMMLattributes object is set to false, then
+ // the attribute WILL be copied.
+ //
+ if (this.attrNames) {
+ var copy = this.attrNames, skip = MML.nocopyAttributes, ignore = HUB.config.ignoreMMLattributes;
+ var defaults = (this.type === "mstyle" ? MML.math.prototype.defaults : this.defaults);
+ for (var i = 0, m = copy.length; i < m; i++) {
+ var id = copy[i];
+ if (ignore[id] == false || (!skip[id] && !ignore[id] &&
+ defaults[id] == null && typeof(node[id]) === "undefined")) {
+ node.setAttribute(id,this.attr[id])
+ }
+ }
+ }
+ return node;
+ },
+
+ CHTMLhandleScale: function (node) {
+ var scale = 1, parent = this.parent, pscale = (parent ? parent.CHTML.scale : 1);
+ var values = this.getValues("scriptlevel","fontsize");
+ values.mathsize = this.Get("mathsize",null,!this.isToken);
+ if (values.scriptlevel !== 0) {
+ if (values.scriptlevel > 2) values.scriptlevel = 2;
+ scale = Math.pow(this.Get("scriptsizemultiplier"),values.scriptlevel);
+ values.scriptminsize = CHTML.length2em(this.Get("scriptminsize"),.8,1);
+ if (scale < values.scriptminsize) scale = values.scriptminsize;
+ }
+ if (this.removedStyles && this.removedStyles.fontSize && !values.fontsize)
+ values.fontsize = this.removedStyles.fontSize;
+ if (values.fontsize && !this.mathsize) values.mathsize = values.fontsize;
+ if (values.mathsize !== 1) scale *= CHTML.length2em(values.mathsize,1,1);
+ var variant = this.CHTMLvariant;
+ if (variant && variant.style && variant.style["font-family"])
+ scale *= (CHTML.config.scale/100)/CHTML.scale;
+ this.CHTML.scale = scale; pscale = this.CHTML.rscale = scale/pscale;
+ if (Math.abs(pscale-1) < .001) pscale = 1;
+ if (node && pscale !== 1) node.style.fontSize = CHTML.Percent(pscale);
+ return scale;
+ },
+
+ CHTMLhandleStyle: function (node) {
+ if (!this.style) return;
+ var style = node.style;
+ style.cssText = this.style; this.removedStyles = {};
+ for (var i = 0, m = CHTML.removeStyles.length; i < m; i++) {
+ var id = CHTML.removeStyles[i];
+ if (style[id]) {
+ this.removedStyles[id] = style[id];
+ style[id] = "";
+ }
+ }
+ },
+
+ CHTMLhandleBBox: function (node) {
+ var BBOX = this.CHTML, style = node.style;
+ if (this.data.length === 1 && (this.data[0].CHTML||{}).pwidth) {
+ BBOX.pwidth = this.data[0].CHTML.pwidth;
+ BBOX.mwidth = this.data[0].CHTML.mwidth;
+ style.width = "100%";
+ } else if (BBOX.pwidth) {
+ BBOX.mwidth = CHTML.Em(BBOX.w);
+ style.width = "100%";
+ } else if (BBOX.w < 0) {
+ style.width = "0px";
+ style.marginRight = CHTML.Em(BBOX.w);
+ }
+ if (!this.style) return;
+ // ### FIXME: adjust for width, height, vertical-align?
+ for (var i = 0, m = CHTML.BBOX.styleAdjust.length; i < m; i++) {
+ var data = CHTML.BBOX.styleAdjust[i];
+ if (data && style[data[0]]) BBOX.adjust(style[data[0]],data[1],data[2],data[3]);
+ }
+ },
+
+ CHTMLhandleColor: function (node) {
+ if (this.mathcolor) {node.style.color = this.mathcolor}
+ else if (this.color) {node.style.color = this.color}
+ if (this.mathbackground) {node.style.backgroundColor = this.mathbackground}
+ else if (this.background) {node.style.backgroundColor = this.background}
+ },
+
+ CHTMLhandleSpace: function (node) {
+ if (!this.useMMLspacing) {
+ var space = this.texSpacing();
+ if (space !== "") {
+ this.CHTML.L = this.CHTMLlength2em(space);
+ node.className += " "+CHTML.SPACECLASS[space];
+ }
+ }
+ },
+
+ CHTMLhandleText: function (node,text,variant) {
+ if (node.firstChild && !this.CHTML) this.CHTML = CHTML.BBOX.empty();
+ this.CHTML = CHTML.handleText(node,text,variant,this.CHTML);
+ },
+
+ CHTMLgetVariant: function () {
+ var values = this.getValues("mathvariant","fontfamily","fontweight","fontstyle"), style;
+ values.hasVariant = this.Get("mathvariant",true); // null if not explicitly specified
+ if (this.removedStyles) {
+ style = this.removedStyles;
+ if (style.fontFamily) values.family = style.fontFamily;
+ if (style.fontWeight) values.weight = style.fontWeight;
+ if (style.fontStyle) values.style = style.fontStyle;
+ }
+ if (!values.hasVariant) {
+ if (values.fontfamily) values.family = values.fontfamily;
+ if (values.fontweight) values.weight = values.fontweight;
+ if (values.fontstyle) values.style = values.fontstyle;
+ }
+ if (values.weight && values.weight.match(/^\d+$/))
+ values.weight = (parseInt(values.weight) > 600 ? "bold" : "normal");
+ var variant = values.mathvariant; if (this.variantForm) variant = "-TeX-variant";
+ if (values.family && !values.hasVariant) {
+ if (!values.weight && values.mathvariant.match(/bold/)) values.weight = "bold";
+ if (!values.style && values.mathvariant.match(/italic/)) values.style = "italic";
+ this.CHTMLvariant = {fonts:[], noRemap:true, cache:{}, style: {
+ "font-family":values.family, "font-weight":values.weight||"normal", "font-style":values.style||"normal"
+ }};
+ return;
+ }
+ if (values.weight === "bold") {
+ variant = {
+ normal:MML.VARIANT.BOLD, italic:MML.VARIANT.BOLDITALIC,
+ fraktur:MML.VARIANT.BOLDFRAKTUR, script:MML.VARIANT.BOLDSCRIPT,
+ "sans-serif":MML.VARIANT.BOLDSANSSERIF,
+ "sans-serif-italic":MML.VARIANT.SANSSERIFBOLDITALIC
+ }[variant]||variant;
+ } else if (values.weight === "normal") {
+ variant = {
+ bold:MML.VARIANT.normal, "bold-italic":MML.VARIANT.ITALIC,
+ "bold-fraktur":MML.VARIANT.FRAKTUR, "bold-script":MML.VARIANT.SCRIPT,
+ "bold-sans-serif":MML.VARIANT.SANSSERIF,
+ "sans-serif-bold-italic":MML.VARIANT.SANSSERIFITALIC
+ }[variant]||variant;
+ }
+ if (values.style === "italic") {
+ variant = {
+ normal:MML.VARIANT.ITALIC, bold:MML.VARIANT.BOLDITALIC,
+ "sans-serif":MML.VARIANT.SANSSERIFITALIC,
+ "bold-sans-serif":MML.VARIANT.SANSSERIFBOLDITALIC
+ }[variant]||variant;
+ } else if (values.style === "normal") {
+ variant = {
+ italic:MML.VARIANT.NORMAL, "bold-italic":MML.VARIANT.BOLD,
+ "sans-serif-italic":MML.VARIANT.SANSSERIF,
+ "sans-serif-bold-italic":MML.VARIANT.BOLDSANSSERIF
+ }[variant]||variant;
+ }
+ this.CHTMLvariant = CHTML.FONTDATA.VARIANT[variant] ||
+ CHTML.FONTDATA.VARIANT[MML.VARIANT.NORMAL];
+ },
+
+ CHTMLbboxFor: function (n) {
+ if (this.data[n] && this.data[n].CHTML) return this.data[n].CHTML;
+ return CHTML.BBOX.zero();
+ },
+ //
+ // Debugging function to see if internal BBox matches actual bbox
+ //
+ CHTMLdrawBBox: function (node,bbox) {
+ if (!bbox) bbox = this.CHTML;
+ var box = CHTML.Element("mjx-box",
+ {style:{opacity:.25,"margin-left":CHTML.Em(-(bbox.w+(bbox.R||0)))}},[
+ ["mjx-box",{style:{
+ height:CHTML.Em(bbox.h),width:CHTML.Em(bbox.w),
+ "background-color":"red"
+ }}],
+ ["mjx-box",{style:{
+ height:CHTML.Em(bbox.d),width:CHTML.Em(bbox.w),
+ "margin-left":CHTML.Em(-bbox.w),"vertical-align":CHTML.Em(-bbox.d),
+ "background-color":"green"
+ }}]
+ ]);
+ if (node.nextSibling) {node.parentNode.insertBefore(box,node.nextSibling)}
+ else {node.parentNode.appendChild(box)}
+ },
+
+ CHTMLnotEmpty: function (mml) {
+ while (mml && mml.data.length < 2 && (mml.type === "mrow" || mml.type === "texatom"))
+ mml = mml.data[0];
+ return !!mml;
+ }
+
+ },{
+ //
+ // Autoload files based on node type or file name
+ //
+ CHTMLautoload: function () {
+ this.constructor.Augment({toCommonHTML: MML.mbase.CHTMLautoloadFail});
+ var file = CHTML.autoloadDir+"/"+this.type+".js";
+ HUB.RestartAfter(AJAX.Require(file));
+ },
+ CHTMLautoloadFail: function () {
+ throw Error("CommonHTML can't autoload '"+ this.type + "'");
+ },
+ CHTMLautoloadList: {},
+ CHTMLautoloadFile: function (name) {
+ if (MML.mbase.CHTMLautoloadList.hasOwnProperty(name)) {
+ throw Error("CommonHTML can't autoload file '"+name+"'");
+ }
+ MML.mbase.CHTMLautoloadList[name] = true;
+ var file = CHTML.autoloadDir+"/"+name+".js";
+ HUB.RestartAfter(AJAX.Require(file));
+ },
+ //
+ // For use with embellished operators
+ //
+ CHTMLstretchV: function (h,d) {
+ this.Core().CHTMLstretchV(h,d);
+ this.toCommonHTML(this.CHTMLnodeElement(),{stretch:true});
+ return this.CHTML;
+ },
+ CHTMLstretchH: function (node,w) {
+ this.CHTMLupdateFrom(this.CHTMLstretchCoreH(node,w));
+ this.toCommonHTML(node,{stretch:true});
+ return this.CHTML;
+ }
+ });
+
+ /********************************************************/
+
+ MML.chars.Augment({
+ toCommonHTML: function (node,options) {
+ this.CHTML = null;
+ if (options == null) options = {};
+ var text = this.toString();
+ if (options.remap) text = options.remap(text,options.remapchars);
+ this.CHTMLhandleText(node,text,options.variant||this.parent.CHTMLvariant);
+ }
+ });
+ MML.entity.Augment({
+ toCommonHTML: function (node,options) {
+ if (options == null) options = {};
+ var text = this.toString();
+ if (options.remapchars) text = options.remap(text,options.remapchars);
+ this.CHTMLhandleText(node,text,options.variant||this.parent.CHTMLvariant);
+ }
+ });
+
+ /********************************************************/
+
+ MML.math.Augment({
+ toCommonHTML: function (node) {
+ node = this.CHTMLdefaultNode(node);
+ if (this.CHTML.w < 0) {
+ node.parentNode.style.width = "0px";
+ node.parentNode.style.marginRight = CHTML.Em(this.CHTML.w);
+ }
+ var alttext = this.Get("alttext");
+ if (alttext && !node.getAttribute("aria-label")) node.setAttribute("aria-label",alttext);
+ if (this.CHTML.pwidth) {
+ node.parentNode.style.minWidth = this.CHTML.mwidth||CHTML.Em(this.CHTML.w);
+ node.parentNode.className = "mjx-full-width "+node.parentNode.className;
+ node.style.width = this.CHTML.pwidth;
+ } else if (!this.isMultiline && this.Get("display") === "block") {
+ var values = this.getValues("indentalignfirst","indentshiftfirst","indentalign","indentshift");
+ if (values.indentalignfirst !== MML.INDENTALIGN.INDENTALIGN) values.indentalign = values.indentalignfirst;
+ if (values.indentalign === MML.INDENTALIGN.AUTO) values.indentalign = CONFIG.displayAlign;
+ if (values.indentshiftfirst !== MML.INDENTSHIFT.INDENTSHIFT) values.indentshift = values.indentshiftfirst;
+ if (values.indentshift === "auto") values.indentshift = "0";
+ var shift = this.CHTMLlength2em(values.indentshift,CHTML.cwidth);
+ if (CONFIG.displayIndent !== "0") {
+ var indent = this.CHTMLlength2em(CONFIG.displayIndent,CHTML.cwidth);
+ shift += (values.indentalign === MML.INDENTALIGN.RIGHT ? -indent : indent);
+ }
+ var styles = node.parentNode.parentNode.style;
+ node.parentNode.style.textAlign = styles.textAlign = values.indentalign;
+ // ### FIXME: make percentage widths respond to changes in container
+ if (shift) {
+ if (values.indentalign === 'right') node.style.marginRight = CHTML.Em(-shift);
+ shift *= CHTML.em/CHTML.outerEm;
+ HUB.Insert(styles,({
+ left: {textIndent: CHTML.Em(shift)},
+ right: {display: 'flex', flexDirection: 'row-reverse'},
+ center: {textIndent: CHTML.Em(2*shift)}
+ })[values.indentalign]);
+ }
+ }
+ return node;
+ }
+ });
+
+ /********************************************************/
+
+ MML.mi.Augment({
+ toCommonHTML: function (node) {
+ node = this.CHTMLdefaultNode(node);
+ var bbox = this.CHTML, text = this.data.join("");
+ if (bbox.skew != null && !CHTML.isChar(text)) delete bbox.skew;
+ if (bbox.r > bbox.w && CHTML.isChar(text) && !this.CHTMLvariant.noIC) {
+ bbox.ic = bbox.r - bbox.w; bbox.w = bbox.r;
+ node.lastChild.style.paddingRight = CHTML.Em(bbox.ic);
+ }
+ return node;
+ }
+ });
+
+ /********************************************************/
+
+ MML.mn.Augment({
+ CHTMLremapMinus: function (text) {return text.replace(/^-/,"\u2212")},
+ toCommonHTML: function (node) {
+ node = this.CHTMLdefaultNode(node,{childOptions:{remap:this.CHTMLremapMinus}});
+ var bbox = this.CHTML, text = this.data.join("");
+ if (bbox.skew != null && !CHTML.isChar(text)) delete bbox.skew;
+ if (bbox.r > bbox.w && CHTML.isChar(text) && !this.CHTMLvariant.noIC) {
+ bbox.ic = bbox.r - bbox.w; bbox.w = bbox.r;
+ node.lastChild.style.paddingRight = CHTML.Em(bbox.ic);
+ }
+ return node;
+ }
+ });
+
+ /********************************************************/
+
+ MML.mo.Augment({
+ toCommonHTML: function (node) {
+ node = this.CHTMLcreateNode(node);
+ this.CHTMLhandleStyle(node);
+ this.CHTMLgetVariant();
+ this.CHTMLhandleScale(node);
+ CHTML.BBOX.empty(this.CHTML);
+
+ var values = this.getValues("displaystyle","largeop");
+ values.variant = this.CHTMLvariant;
+ values.text = this.data.join("");
+ if (values.text == "") {
+ if (this.fence) node.style.width = CHTML.Em(CHTML.TEX.nulldelimiterspace);
+ } else {
+ this.CHTMLadjustAccent(values);
+ this.CHTMLadjustVariant(values);
+
+ for (var i = 0, m = this.data.length; i < m; i++) {
+ this.CHTMLaddChild(node,i,{childOptions:{
+ variant: values.mathvariant,
+ remap: this.remap,
+ remapchars: values.remapchars
+ }});
+ }
+ if (!CHTML.isChar(values.text)) delete this.CHTML.skew;
+ else if (this.CHTML.w === 0 && this.CHTML.l < 0) this.CHTMLfixCombiningChar(node);
+ if (values.largeop) this.CHTMLcenterOp(node);
+ }
+
+ this.CHTML.clean();
+ this.CHTMLhandleBBox(node);
+ this.CHTMLhandleSpace(node);
+ this.CHTMLhandleColor(node);
+
+ return node;
+ },
+ CHTMLhandleSpace: function (node) {
+ if (this.hasMMLspacing()) {
+ var values = this.getValues("scriptlevel","lspace","rspace");
+ values.lspace = Math.max(0,this.CHTMLlength2em(values.lspace));
+ values.rspace = Math.max(0,this.CHTMLlength2em(values.rspace));
+ if (values.scriptlevel > 0) {
+ if (!this.hasValue("lspace")) values.lspace = .15;
+ if (!this.hasValue("rspace")) values.rspace = .15;
+ }
+ var core = this, parent = this.Parent();
+ while (parent && parent.isEmbellished() && parent.Core() === core)
+ {core = parent; parent = parent.Parent(); node = core.CHTMLnodeElement()}
+ if (values.lspace) node.style.paddingLeft = CHTML.Em(values.lspace);
+ if (values.rspace) node.style.paddingRight = CHTML.Em(values.rspace);
+ this.CHTML.L = values.lspace; this.CHTML.R = values.rspace;
+ } else {
+ this.SUPER(arguments).CHTMLhandleSpace.apply(this,arguments);
+ }
+ },
+ CHTMLadjustAccent: function (data) {
+ var parent = this.CoreParent(); data.parent = parent;
+ if (CHTML.isChar(data.text) && parent && parent.isa(MML.munderover)) {
+ var over = parent.data[parent.over], under = parent.data[parent.under];
+ if (over && this === over.CoreMO() && parent.Get("accent")) {
+ data.remapchars = CHTML.FONTDATA.REMAPACCENT;
+ } else if (under && this === under.CoreMO() && parent.Get("accentunder")) {
+ data.remapchars = CHTML.FONTDATA.REMAPACCENTUNDER;
+ }
+ }
+ },
+ CHTMLadjustVariant: function (data) {
+ var parent = data.parent,
+ isScript = (parent && parent.isa(MML.msubsup) && this !== parent.data[parent.base]);
+ if (data.largeop) data.mathvariant = (data.displaystyle ? "-largeOp" : "-smallOp");
+ if (isScript) {
+ data.remapchars = this.remapChars;
+ if (data.text.match(/['`"\u00B4\u2032-\u2037\u2057]/))
+ data.mathvariant = "-TeX-variant"; // ### FIXME: handle other fonts
+ }
+ },
+ CHTMLfixCombiningChar: function (node) {
+ //
+ // IE doesn't display combining chararacters unless they combine with
+ // something, so put them over a space and remove the space's width
+ //
+ node = node.firstChild;
+ var space = CHTML.Element("mjx-box",{style:{width:".25em","margin-left":"-.25em"}});
+ node.insertBefore(space,node.firstChild);
+ },
+ CHTMLcenterOp: function (node) {
+ var bbox = this.CHTML;
+ var p = (bbox.h - bbox.d)/2 - CHTML.TEX.axis_height;
+ if (Math.abs(p) > .001) node.style.verticalAlign = CHTML.Em(-p);
+ bbox.h -= p; bbox.d += p;
+ if (bbox.r > bbox.w) {
+ bbox.ic = bbox.r - bbox.w; bbox.w = bbox.r;
+ node.style.paddingRight = CHTML.Em(bbox.ic);
+ }
+ },
+ CHTMLcanStretch: function (direction,H,D) {
+ if (!this.Get("stretchy")) return false;
+ var c = this.data.join(""); if (!CHTML.isChar(c)) return false;
+ var values = {text: c};
+ this.CHTMLadjustAccent(values);
+ if (values.remapchars) c = values.remapchars[c]||c;
+ c = CHTML.FONTDATA.DELIMITERS[c.charCodeAt(0)];
+ var stretch = (c && c.dir === direction.substr(0,1));
+ if (stretch) {
+ stretch = (this.CHTML.h !== H || this.CHTML.d !== D ||
+ !!this.Get("minsize",true) || !!this.Get("maxsize",true));
+ if (stretch) this.CHTML.stretch = true;
+ }
+ return stretch;
+ },
+ CHTMLstretchV: function (h,d) {
+ var node = this.CHTMLnodeElement(), bbox = this.CHTML;
+ var values = this.getValues("symmetric","maxsize","minsize");
+ //
+ // Determine the height needed
+ //
+ var H, a = CHTML.TEX.axis_height;
+ if (values.symmetric) {H = 2*Math.max(h-a,d+a)} else {H = h + d}
+ values.maxsize = this.CHTMLlength2em(values.maxsize,bbox.h+bbox.d);
+ values.minsize = this.CHTMLlength2em(values.minsize,bbox.h+bbox.d);
+ H = Math.max(values.minsize,Math.min(values.maxsize,H));
+ //
+ // If we are not already stretched to this height
+ //
+ if (H !== bbox.sH) {
+ //
+ // Get a delimiter of the proper height and save the height
+ //
+ if (H != values.minsize)
+ {H = [Math.max(H*CHTML.TEX.delimiterfactor/1000,H-CHTML.TEX.delimitershortfall),H]}
+ while (node.firstChild) node.removeChild(node.firstChild);
+ this.CHTML = bbox = CHTML.createDelimiter(node,this.data.join("").charCodeAt(0),H,bbox);
+ bbox.sH = (H instanceof Array ? H[1] : H);
+ //
+ // Reposition as needed
+ //
+ if (values.symmetric) {H = (bbox.h + bbox.d)/2 + a}
+ else {H = (bbox.h + bbox.d) * h/(h + d)}
+ H -= bbox.h;
+ if (Math.abs(H) > .05) {
+ node.style.verticalAlign = CHTML.Em(H);
+ bbox.h += H; bbox.d -= H; bbox.t += H; bbox.b -= H;
+ }
+ }
+ return this.CHTML;
+ },
+ CHTMLstretchH: function (node,W) {
+ var bbox = this.CHTML;
+ var values = this.getValues("maxsize","minsize","mathvariant","fontweight");
+ if ((values.fontweight === "bold" || (this.removedStyles||{}).fontWeight === "bold" ||
+ parseInt(values.fontweight) >= 600) && !this.Get("mathvariant",true))
+ values.mathvariant = MML.VARIANT.BOLD;
+ values.maxsize = this.CHTMLlength2em(values.maxsize,bbox.w);
+ values.minsize = this.CHTMLlength2em(values.minsize,bbox.w);
+ W = Math.max(values.minsize,Math.min(values.maxsize,W));
+ if (W !== bbox.sW) {
+ while (node.firstChild) node.removeChild(node.firstChild);
+ this.CHTML = bbox = CHTML.createDelimiter(node,this.data.join("").charCodeAt(0),W,bbox,values.mathvariant);
+ bbox.sW = W;
+ }
+ return this.CHTML;
+ }
+
+ });
+
+ /********************************************************/
+
+ MML.mtext.Augment({
+ CHTMLgetVariant: function () {
+ if (CHTML.config.mtextFontInherit || this.Parent().type === "merror") {
+ var scale = (CHTML.config.scale/100)/CHTML.scale;
+ var variant = {cache:{}, fonts:[], className:"MJXc-font-inherit", rscale:scale,
+ style:{"font-size":CHTML.Percent(scale)}};
+ var name = this.Get("mathvariant");
+ if (name.match(/bold/)) variant.style["font-weight"] = "bold";
+ if (name.match(/italic|-tex-mathit/)) variant.style["font-style"] = "italic";
+ if (name === "monospace") variant.className += " MJXc-monospace-font";
+ if (name === "double-struck") variant.className += " MJXc-double-struck-font";
+ if (name.match(/fraktur/)) variant.className += " MJXc-fraktur-font";
+ if (name.match(/sans-serif/)) variant.className += " MJXc-sans-serif-font";
+ if (name.match(/script/)) variant.className += " MJXc-script-font";
+ this.CHTMLvariant = variant;
+ } else {
+ this.SUPER(arguments).CHTMLgetVariant.call(this);
+ }
+ }
+ });
+
+ /********************************************************/
+
+ MML.merror.Augment({
+ toCommonHTML: function (node) {
+ node = this.CHTMLdefaultNode(node);
+ var bbox = this.CHTML;
+ //
+ // Adjust for font-size: 90%
+ //
+ bbox.rescale(.9);
+ //
+ // Adjust for padding and border
+ //
+ bbox.h += 3/CHTML.em; if (bbox.h > bbox.t) bbox.t = bbox.h;
+ bbox.d += 3/CHTML.em; if (bbox.d > bbox.b) bbox.b = bbox.d;
+ bbox.w += 8/CHTML.em; bbox.r = bbox.w; bbox.l = 0;
+ return node;
+ }
+ });
+
+ /********************************************************/
+
+ MML.mspace.Augment({
+ toCommonHTML: function (node) {
+ node = this.CHTMLcreateNode(node);
+ this.CHTMLhandleStyle(node);
+ this.CHTMLhandleScale(node);
+ var values = this.getValues("height","depth","width");
+ var w = this.CHTMLlength2em(values.width),
+ h = this.CHTMLlength2em(values.height),
+ d = this.CHTMLlength2em(values.depth);
+ var bbox = this.CHTML;
+ bbox.w = bbox.r = w; bbox.h = bbox.t = h; bbox.d = bbox.b = d; bbox.l = 0;
+ if (w < 0) {node.style.marginRight = CHTML.Em(w); w = 0}
+ node.style.width = CHTML.Em(w);
+ node.style.height = CHTML.Em(Math.max(0,h+d));
+ if (d) node.style.verticalAlign = CHTML.Em(-d);
+ this.CHTMLhandleBBox(node);
+ this.CHTMLhandleColor(node);
+ return node;
+ }
+ });
+
+ /********************************************************/
+
+ MML.mpadded.Augment({
+ toCommonHTML: function (node,options) {
+ var child;
+ if (options && options.stretch) {
+ node = node.firstChild; child = node.firstChild;
+ } else {
+ node = this.CHTMLdefaultNode(node,{childNodes:"mjx-box", forceChild:true});
+ child = node.firstChild; node = CHTML.addElement(node,"mjx-block");
+ node.appendChild(child); CHTML.addElement(node,"mjx-strut"); // force proper alignment of short heights
+ }
+ var cbox = this.CHTMLbboxFor(0);
+ var values = this.getValues("width","height","depth","lspace","voffset");
+ var x = 0, y = 0, w = cbox.w, h = cbox.h, d = cbox.d;
+ child.style.width = 0; child.style.margin = CHTML.Em(-h)+" 0 "+CHTML.Em(-d);
+ if (values.width !== "") w = this.CHTMLdimen(values.width,"w",w,0);
+ if (values.height !== "") h = this.CHTMLdimen(values.height,"h",h,0);
+ if (values.depth !== "") d = this.CHTMLdimen(values.depth,"d",d,0);
+ if (values.voffset !== "") {
+ y = this.CHTMLdimen(values.voffset);
+ if (y) {
+ child.style.position = "relative";
+ child.style.top = CHTML.Em(-y);
+ }
+ }
+ if (values.lspace !== "") {
+ x = this.CHTMLdimen(values.lspace);
+ if (x) {
+ child.style.position = "relative";
+ child.style.left = CHTML.Em(x);
+ }
+ }
+ node.style.width = 0;
+ node.style.marginTop = CHTML.Em(h-STRUTHEIGHT);
+ node.style.padding = "0 "+CHTML.Em(w)+" "+CHTML.Em(d)+" 0";
+ var bbox = CHTML.BBOX({w:w, h:h, d:d, l:0, r:w, t:h, b:d,
+ scale:this.CHTML.scale, rscale:this.CHTML.rscale});
+ bbox.combine(cbox,x,y);
+ bbox.w = w; bbox.h = h; bbox.d = d;
+ this.CHTML = bbox;
+ return node.parentNode;
+ },
+ CHTMLstretchV: MML.mbase.CHTMLstretchV,
+ CHTMLstretchH: MML.mbase.CHTMLstretchH,
+ CHTMLdimen: function (length,d,D,m) {
+ if (m == null) {m = -BIGDIMEN}
+ length = String(length);
+ var match = length.match(/width|height|depth/);
+ var size = (match ? this.CHTML[match[0].charAt(0)] : (d ? this.CHTML[d] : 0));
+ var dimen = (this.CHTMLlength2em(length,size)||0);
+ if (length.match(/^[-+]/) && D != null) dimen += D;
+ if (m != null) dimen = Math.max(m,dimen);
+ return dimen;
+ }
+ });
+
+ /********************************************************/
+
+ MML.munderover.Augment({
+ toCommonHTML: function (node,options) {
+ var values = this.getValues("displaystyle","accent","accentunder","align");
+ var base = this.data[this.base];
+ if (!values.displaystyle && base != null &&
+ (base.movablelimits || base.CoreMO().Get("movablelimits")))
+ return MML.msubsup.prototype.toCommonHTML.call(this,node,stretch);
+ //
+ // Get the nodes for base and limits
+ //
+ var under, over, nodes = [], stretch = false;
+ if (options && options.stretch) {
+ if (this.data[this.base]) base = CHTML.getNode(node,"mjx-op");
+ if (this.data[this.under]) under = CHTML.getNode(node,"mjx-under");
+ if (this.data[this.over]) over = CHTML.getNode(node,"mjx-over");
+ nodes[0] = base; nodes[1] = under||over; nodes[2] = over;
+ stretch = true;
+ } else {
+ var types = ["mjx-op","mjx-under","mjx-over"];
+ if (this.over === 1) types[1] = types[2];
+ node = this.CHTMLdefaultNode(node,{
+ childNodes:types, noBBox:true, forceChild:true, minChildren: 2
+ });
+ nodes[0] = base = node.removeChild(node.firstChild);
+ nodes[1] = under = over = node.removeChild(node.firstChild);
+ if (node.firstChild) nodes[2] = over = node.removeChild(node.firstChild);
+ }
+ //
+ // Get the bounding boxes and the maximum width
+ //
+ var boxes = [], W = this.CHTMLgetBBoxes(boxes,nodes,values);
+ var bbox = boxes[this.base], BBOX = this.CHTML;
+ BBOX.w = W; BBOX.h = bbox.h; BBOX.d = bbox.d; // modified below
+ //
+ // Adjust for bases shorter than the center line (#1657)
+ // (the center line really depends on the surrounding font, so
+ // it should be measured along with ems and exs, but currently isn't.
+ // so this value is an approximation that is reasonable for most fonts.)
+ //
+ if (bbox.h < .35) base.style.marginTop = CHTML.Em(bbox.h - .35);
+ //
+ // Use a minimum height for accents (#1706)
+ // (same issues with the center line as above)
+ //
+ if (values.accent && bbox.h < CHTML.TEX.x_height) {
+ BBOX.h += CHTML.TEX.x_height - bbox.h;
+ base.style.marginTop = CHTML.Em(CHTML.TEX.x_height - Math.max(bbox.h,.35));
+ bbox.h = CHTML.TEX.x_height;
+ }
+ //
+ // Add over- and under-scripts
+ //
+ var stack = base, delta = 0;
+ if (bbox.ic) {delta = 1.3*bbox.ic + .05} // make faked IC be closer to expeted results
+ if (this.data[this.over]) stack = this.CHTMLaddOverscript(over,boxes,values,delta,base,stretch);
+ if (this.data[this.under]) this.CHTMLaddUnderscript(under,boxes,values,delta,node,stack,stretch);
+ else if (!stretch) node.appendChild(stack);
+ //
+ // Handle horizontal positions
+ //
+ this.CHTMLplaceBoxes(base,under,over,values,boxes);
+ return node;
+ },
+ //
+ // Get the bounding boxes for the children, stretch
+ // any stretchable elements, and compute the maximum width
+ //
+ CHTMLgetBBoxes: function (bbox,nodes,values) {
+ var i, m = this.data.length, scale,
+ w = -BIGDIMEN, // maximum width of non-stretchy items
+ W = w; // maximum width of all items
+ //
+ // Get the maximum width
+ //
+ for (i = 0; i < m; i++) {
+ bbox[i] = this.CHTMLbboxFor(i); bbox[i].x = bbox[i].y = 0;
+ if (this.data[i]) bbox[i].stretch = this.data[i].CHTMLcanStretch("Horizontal");
+ scale = (i === this.base ? 1 : bbox[i].rscale);
+ if (i !== this.base) {delete bbox[i].L; delete bbox[i].R} // these are overridden by CSS
+ W = Math.max(W,scale*(bbox[i].w + (bbox[i].L||0) + (bbox[i].R||0)));
+ if (!bbox[i].stretch && W > w) w = W;
+ }
+ if (w === -BIGDIMEN) w = W;
+ //
+ // Stretch those parts that need it
+ //
+ for (i = 0; i < m; i++) {
+ if (bbox[i].stretch) {
+ scale = (i === this.base ? 1 : bbox[i].rscale);
+ bbox[i] = this.data[i].CHTMLstretchH(nodes[i].firstChild,w/scale);
+ bbox[i].x = bbox[i].y = 0;
+ W = Math.max(W,scale*(bbox[i].w + (bbox[i].L||0) + (bbox[i].R||0)));
+ }
+ }
+ if (!bbox[this.base]) bbox[this.base] = CHTML.BBOX.empty();
+ return W;
+ },
+ //
+ // Add an overscript
+ //
+ CHTMLaddOverscript: function (over,boxes,values,delta,base,stretch) {
+ var BBOX = this.CHTML;
+ var z1, z2, z3 = CHTML.TEX.big_op_spacing5, k;
+ var obox = boxes[this.over], bbox = boxes[this.base], scale = obox.rscale;
+ //
+ // Put the base and script into a stack
+ //
+ if (!stretch) {
+ var stack = CHTML.Element("mjx-stack");
+ stack.appendChild(over); stack.appendChild(base);
+ }
+ if (obox.D) obox.d = obox.D;
+ if (obox.d < 0) {
+ //
+ // For negative depths, set the height and align to top
+ // in order to avoid extra baseline space
+ //
+ over.firstChild.style.verticalAlign = "top";
+ over.style.height = CHTML.Em(obox.h+obox.d);
+ }
+ //
+ // Determine the spacing
+ //
+ obox.x = 0;
+ if (values.accent) {
+ if (obox.w < .001) obox.x += (obox.r - obox.l)/2; // center combining accents
+ k = CHTML.TEX.rule_thickness; z3 = 0;
+ if (bbox.skew) {
+ obox.x += scale*bbox.skew; BBOX.skew = scale*bbox.skew;
+ if (obox.x+scale*obox.w > BBOX.w) BBOX.skew += (BBOX.w - (obox.x+scale*obox.w))/2;
+ }
+ } else {
+ z1 = CHTML.TEX.big_op_spacing1;
+ z2 = CHTML.TEX.big_op_spacing3;
+ k = Math.max(z1,z2-Math.max(0,scale*obox.d));
+ }
+ obox.x += delta/2; obox.y = BBOX.h + k + z3 + scale*obox.d;
+ //
+ // Position the overscript
+ //
+ if (k) over.style.paddingBottom = CHTML.Em(k/scale);
+ if (z3) over.style.paddingTop = CHTML.Em(z3/scale);
+ return stack;
+ },
+ //
+ // Add an underscript
+ //
+ CHTMLaddUnderscript: function (under,boxes,values,delta,node,stack,stretch) {
+ var BBOX = this.CHTML;
+ var z1, z2, z3 = CHTML.TEX.big_op_spacing5, k;
+ var ubox = boxes[this.under], scale = ubox.rscale;
+ //
+ // Create a table for the underscript
+ //
+ if (!stretch) {
+ CHTML.addElement(node,"mjx-itable",{},[
+ ["mjx-row",{},[["mjx-cell"]]],
+ ["mjx-row"]
+ ]);
+ node.firstChild.firstChild.firstChild.appendChild(stack);
+ node.firstChild.lastChild.appendChild(under);
+ }
+ if (ubox.D) ubox.d = ubox.D;
+ if (ubox.d < 0) {
+ //
+ // For negative depths, set the height and align to top
+ // in order to avoid extra baseline space
+ //
+ under.firstChild.style.verticalAlign = "top";
+ node.firstChild.style.marginBottom = CHTML.Em(ubox.d);
+ }
+ //
+ // determine the spacing
+ //
+ if (values.accentunder) {
+ k = 2*CHTML.TEX.rule_thickness; z3 = 0;
+ } else {
+ z1 = CHTML.TEX.big_op_spacing2;
+ z2 = CHTML.TEX.big_op_spacing4;
+ k = Math.max(z1,z2-scale*ubox.h);
+ }
+ ubox.x = -delta/2; ubox.y = -(BBOX.d + k + z3 + scale*ubox.h);
+ //
+ // Position the underscript
+ //
+ if (k) under.style.paddingTop = CHTML.Em(k/scale);
+ if (z3) under.style.paddingBottom = CHTML.Em(z3/scale);
+ },
+ //
+ // Center boxes horizontally, taking offsets into account
+ //
+ CHTMLplaceBoxes: function (base,under,over,values,boxes) {
+ var W = this.CHTML.w, i, m = boxes.length, scale;
+ var BBOX = CHTML.BBOX.zero();
+ BBOX.scale = this.CHTML.scale; BBOX.rscale = this.CHTML.rscale;
+ boxes[this.base].x = boxes[this.base].y = 0; var dx = BIGDIMEN;
+ for (i = 0; i < m; i++) {
+ scale = (i === this.base ? 1 : boxes[i].rscale);
+ var w = scale*(boxes[i].w + (boxes[i].L||0) + (boxes[i].R||0));
+ boxes[i].x += {left:0, center:(W-w)/2, right:W-w}[values.align];
+ if (boxes[i].x < dx) dx = boxes[i].x;
+ }
+ for (i = 0; i < m; i++) {
+ if (this.data[i]) {
+ scale = (i === this.base ? 1 : boxes[i].rscale);
+ if (boxes[i].x - dx) {
+ var node = (i === this.base ? base : i === this.over ? over : under);
+ node.style.paddingLeft = CHTML.Em((boxes[i].x-dx)/scale);
+ }
+ BBOX.combine(boxes[i],boxes[i].x-dx,boxes[i].y);
+ }
+ }
+ this.CHTML = BBOX;
+ },
+ CHTMLstretchV: MML.mbase.CHTMLstretchV,
+ CHTMLstretchH: MML.mbase.CHTMLstretchH,
+ CHTMLchildNode: function (node,i) {
+ var types = ["mjx-op","mjx-under","mjx-over"];
+ if (this.over === 1) types[1] = types[2];
+ return CHTML.getNode(node,types[i]);
+ }
+ });
+
+ /********************************************************/
+
+ MML.msubsup.Augment({
+ toCommonHTML: function (node,options) {
+ var values = this.getValues(
+ "displaystyle","subscriptshift","superscriptshift","texprimestyle"
+ );
+ //
+ // Get the nodes for base and limits
+ //
+ var base, sub, sup;
+ if (options && options.stretch) {
+ if (this.data[this.base]) base = CHTML.getNode(node,"mjx-base");
+ if (this.data[this.sub]) sub = CHTML.getNode(node,"mjx-sub");
+ if (this.data[this.sup]) sup = CHTML.getNode(node,"mjx-sup");
+ stack = CHTML.getNode(node,"mjx-stack");
+ } else {
+ var types = ["mjx-base","mjx-sub","mjx-sup"];
+ if (this.sup === 1) types[1] = types[2];
+ node = this.CHTMLdefaultNode(node,{
+ childNodes:types, noBBox:true, forceChild:true, minChildren: 3
+ });
+ base = node.childNodes[this.base];
+ sub = node.childNodes[this.sub]; sup = node.childNodes[this.sup];
+ if (!this.CHTMLnotEmpty(this.data[this.sub])) {node.removeChild(sub); sub = null}
+ if (!this.CHTMLnotEmpty(this.data[this.sup])) {node.removeChild(sup); sup = null}
+ if (node.childNodes.length === 3) {
+ var stack = CHTML.addElement(node,"mjx-stack");
+ stack.appendChild(sup); stack.appendChild(sub);
+ }
+ }
+ //
+ // Get the bounding boxes and maximum width of scripts
+ //
+ var boxes = [], BBOX = CHTML.BBOX.empty(this.CHTML);
+ for (var i = 0, m = this.data.length; i < m; i++) boxes[i] = this.CHTMLbboxFor(i);
+ var bbox = boxes[this.base] || CHTML.BBOX.empty(),
+ sbox = boxes[this.sub], Sbox = boxes[this.sup];
+ var sscale = (sub ? sbox.rscale : 1), Sscale = (sup ? Sbox.rscale : 1);
+ BBOX.combine(bbox,0,0);
+ //
+ // Get initial values for parameters
+ //
+ var ex = CHTML.TEX.x_height, s = CHTML.TEX.scriptspace;
+ var q = CHTML.TEX.sup_drop * Sscale, r = CHTML.TEX.sub_drop * sscale;
+ var u = bbox.h - q, v = bbox.d + r, delta = 0, p;
+ if (bbox.ic) {
+ BBOX.w -= bbox.ic; // remove IC (added by mo and mi)
+ base.style.marginRight = CHTML.Em(-bbox.ic);
+ delta = 1.3*bbox.ic + .05; // make faked IC be closer to expeted results
+ }
+ var bmml = this.data[this.base];
+ if (bmml) {
+ if ((bmml.type === "mrow" || bmml.type === "mstyle") && bmml.data.length === 1) bmml = bmml.data[0];
+ if (bmml.type === "mi" || bmml.type === "mo") {
+ if (CHTML.isChar(bmml.data.join("")) && bbox.rscale === 1 && !bbox.sH &&
+ !bmml.Get("largeop")) {u = v = 0}
+ }
+ }
+ values.subscriptshift = (values.subscriptshift === "" ? 0 : this.CHTMLlength2em(values.subscriptshift));
+ values.superscriptshift = (values.superscriptshift === "" ? 0 : this.CHTMLlength2em(values.superscriptshift));
+ //
+ // Add the super- and subscripts
+ //
+ var x = BBOX.w; if (sub) sbox.w += s; if (sup) Sbox.w += s;
+ if (!sup) {
+ if (sub) {
+ v = Math.max(v,CHTML.TEX.sub1,sscale*sbox.h-(4/5)*ex,values.subscriptshift);
+ sub.style.verticalAlign = CHTML.Em(-v/sscale);
+ sub.style.paddingRight = CHTML.Em(s/sscale);
+ BBOX.combine(sbox,x,-v);
+ }
+ } else {
+ if (!sub) {
+ p = CHTML.TEX[(values.displaystyle ? "sup1" : (values.texprimestyle ? "sup3" : "sup2"))];
+ u = Math.max(u,p,Sscale*Sbox.d+(1/4)*ex,values.superscriptshift);
+ sup.style.verticalAlign = CHTML.Em(u/Sscale);
+ sup.style.paddingLeft = CHTML.Em(delta/Sscale);
+ sup.style.paddingRight = CHTML.Em(s/Sscale);
+ BBOX.combine(Sbox,x+delta,u);
+ } else {
+ v = Math.max(v,CHTML.TEX.sub2);
+ var t = CHTML.TEX.rule_thickness;
+ if ((u - Sscale*Sbox.d) - (sscale*sbox.h - v) < 3*t) {
+ v = 3*t - u + Sscale*Sbox.d + sscale*sbox.h;
+ q = (4/5)*ex - (u - Sscale*Sbox.d);
+ if (q > 0) {u += q; v -= q}
+ }
+ u = Math.max(u,values.superscriptshift);
+ v = Math.max(v,values.subscriptshift);
+ sub.style.paddingRight = CHTML.Em(s/sscale);
+ sup.style.paddingBottom = CHTML.Em(u/Sscale+v/sscale-Sbox.d-sbox.h/sscale*Sscale);
+ sup.style.paddingLeft = CHTML.Em(delta/Sscale);
+ sup.style.paddingRight = CHTML.Em(s/Sscale);
+ stack.style.verticalAlign = CHTML.Em(-v);
+ BBOX.combine(Sbox,x+delta,u);
+ BBOX.combine(sbox,x,-v);
+ }
+ }
+ BBOX.clean();
+ return node;
+ },
+ CHTMLstretchV: MML.mbase.CHTMLstretchV,
+ CHTMLstretchH: MML.mbase.CHTMLstretchH,
+ CHTMLchildNode: function (node,i) {
+ var types = ["mjx-base","mjx-sub","mjx-sup"];
+ if (this.over === 1) types[1] = types[2];
+ return CHTML.getNode(node,types[i]);
+ }
+ });
+
+ /********************************************************/
+
+ MML.mfrac.Augment({
+ toCommonHTML: function (node) {
+ node = this.CHTMLdefaultNode(node,{
+ childNodes:["mjx-numerator","mjx-denominator"],
+ childOptions: {autowidth: true},
+ forceChild:true, noBBox:true, minChildren:2
+ });
+ var values = this.getValues("linethickness","displaystyle",
+ "numalign","denomalign","bevelled");
+ var isDisplay = values.displaystyle;
+ //
+ // Create the table for the fraction and set the alignment
+ //
+ var num = node.firstChild, denom = node.lastChild;
+ var frac = CHTML.addElement(node,"mjx-box");
+ frac.appendChild(num); frac.appendChild(denom); node.appendChild(frac);
+ if (values.numalign !== "center") num.style.textAlign = values.numalign;
+ if (values.denomalign !== "center") denom.style.textAlign = values.denomalign;
+ //
+ // Get the bounding boxes for the parts, and determine the placement
+ // of the numerator and denominator
+ //
+ var nbox = this.CHTMLbboxFor(0), dbox = this.CHTMLbboxFor(1),
+ BBOX = CHTML.BBOX.empty(this.CHTML), nscale = nbox.rscale, dscale = dbox.rscale;
+ values.linethickness = Math.max(0,CHTML.thickness2em(values.linethickness||"0",BBOX.scale));
+ var mt = CHTML.TEX.min_rule_thickness/CHTML.em, a = CHTML.TEX.axis_height;
+ var t = values.linethickness, p,q, u,v;
+ if (values.bevelled) {
+ frac.className += " MJXc-bevelled";
+ var delta = (isDisplay ? .4 : .15);
+ var H = Math.max(nscale*(nbox.h+nbox.d),dscale*(dbox.h+dbox.d)) + 2*delta;
+ var bevel = CHTML.Element("mjx-bevel"); frac.insertBefore(bevel,denom);
+ var bbox = CHTML.createDelimiter(bevel,0x2F,H);
+ u = nscale*(nbox.d-nbox.h)/2+a+delta;
+ v = dscale*(dbox.d-dbox.h)/2+a-delta;
+ if (u) num.style.verticalAlign = CHTML.Em(u/nscale);
+ if (v) denom.style.verticalAlign = CHTML.Em(v/dscale);
+ bevel.style.marginLeft = bevel.style.marginRight = CHTML.Em(-delta/2);
+ BBOX.combine(nbox,0,u);
+ BBOX.combine(bbox,nscale*nbox.w-delta/2,0);
+ BBOX.combine(dbox,nscale*nbox.w+bbox.w-delta,v);
+ BBOX.clean();
+ } else {
+ frac.className += " MJXc-stacked";
+ if (isDisplay) {u = CHTML.TEX.num1; v = CHTML.TEX.denom1}
+ else {u = (t === 0 ? CHTML.TEX.num3 : CHTML.TEX.num2); v = CHTML.TEX.denom2}
+ if (t === 0) { // \atop
+ p = Math.max((isDisplay ? 7 : 3) * CHTML.TEX.rule_thickness, 2*mt); // force to at least 2 px
+ q = (u - nbox.d*nscale) - (dbox.h*dscale - v);
+ if (q < p) {u += (p - q)/2; v += (p - q)/2}
+ } else { // \over
+ p = Math.max((isDisplay ? 2 : 0) * mt + t, t/2 + 1.5*mt);
+ t = Math.max(t,mt);
+ q = (u - nbox.d*nscale) - (a + t/2); if (q < p) u += (p - q);
+ q = (a - t/2) - (dbox.h*dscale - v); if (q < p) v += (p - q);
+ nbox.L = nbox.R = dbox.L = dbox.R = .1; // account for padding in BBOX width
+ var rule = CHTML.addElement(frac,"mjx-line",{style: {
+ "border-bottom":CHTML.Px(t*BBOX.scale,1)+" solid", top: CHTML.Em(-t/2-a)
+ }});
+ }
+ //
+ // Determine the new bounding box and place the parts
+ //
+ BBOX.combine(nbox,0,u);
+ BBOX.combine(dbox,0,-v);
+ BBOX.clean();
+ //
+ // Force elements to the correct width
+ //
+ frac.style.width = CHTML.Em(BBOX.w);
+ num.style.width = CHTML.Em(BBOX.w/nscale);
+ denom.style.width = CHTML.Em(BBOX.w/dscale);
+ if (rule) rule.style.width = frac.style.width;
+ //
+ // Place the numerator and denominator in relation to the baseline
+ //
+ num.style.top = CHTML.Em(-BBOX.h/nscale);
+ denom.style.bottom = CHTML.Em(-BBOX.d/dscale);
+ //
+ // Force the size of the surrounding box, since everything is absolutely positioned
+ //
+ CHTML.addElement(node,"mjx-vsize",{style: {
+ height: CHTML.Em(BBOX.h+BBOX.d), verticalAlign: CHTML.Em(-BBOX.d)
+ }});
+ }
+ //
+ // Add nulldelimiterspace around the fraction
+ // (TeXBook pg 150 and Appendix G rule 15e)
+ //
+ if (!this.texWithDelims) {
+ var space = CHTML.TEX.nulldelimiterspace;
+ frac.style.padding = "0 "+CHTML.Em(space);
+ BBOX.l += space; BBOX.r += space; BBOX.w += 2*space;
+ }
+ //
+ // Return the completed fraction
+ //
+ return node;
+ },
+ CHTMLcanStretch: function (direction) {return false}
+ });
+
+ /********************************************************/
+
+ MML.msqrt.Augment({
+ toCommonHTML: function (node) {
+ node = this.CHTMLdefaultNode(node,{
+ childNodes:["mjx-box","mjx-root"], forceChild:true, noBBox:true
+ });
+ var base = node.firstChild || CHTML.Element("mjx-box");
+ var sqrt = CHTML.addElement(node,"mjx-box"); sqrt.appendChild(base);
+ var bbox = this.CHTMLbboxFor(0), BBOX = CHTML.BBOX.empty(this.CHTML);
+ var t = CHTML.TEX.rule_thickness, T = CHTML.TEX.surd_height, p = t, q, H;
+ if (this.Get("displaystyle")) p = CHTML.TEX.x_height;
+ q = t + p/4;
+ H = bbox.h + bbox.d + q + t;
+ var surd = CHTML.Element("mjx-surd"); sqrt.insertBefore(surd,base);
+ var sbox = CHTML.createDelimiter(surd,0x221A,[H-.04,H]);
+ if (sbox.h + sbox.d > H) q = ((sbox.h+sbox.d) - (H-t))/2;
+ H = bbox.h + q + t;
+ var x = this.CHTMLaddRoot(node,sbox,sbox.h+sbox.d-H);
+ base.style.paddingTop = CHTML.Em(q);
+ base.style.borderTop = CHTML.Px(T*bbox.scale,1)+" solid";
+ sqrt.style.paddingTop = CHTML.Em(2*t-T); // use wider line, but don't affect height
+ bbox.h += q + 2*t;
+ BBOX.combine(sbox,x,H-sbox.h);
+ BBOX.combine(bbox,x+sbox.w,0);
+ BBOX.clean();
+ return node;
+ },
+ CHTMLaddRoot: function () {return 0},
+ CHTMLhandleBBox: function (node) {
+ var bbox = this.CHTMLbboxFor(0);
+ delete bbox.pwidth;
+ this.SUPER(arguments).CHTMLhandleBBox.apply(this,arguments);
+ }
+ });
+
+ /********************************************************/
+
+ MML.mroot.Augment({
+ toCommonHTML: MML.msqrt.prototype.toCommonHTML,
+ CHTMLhandleBBox: MML.msqrt.prototype.CHTMLhandleBBox,
+ CHTMLaddRoot: function (sqrt,sbox,d) {
+ if (!this.data[1]) return;
+ var BBOX = this.CHTML, bbox = this.data[1].CHTML, root = sqrt.firstChild;
+ var scale = bbox.rscale;
+ var h = this.CHTMLrootHeight(bbox,sbox,BBOX.scale)-d;
+ var w = Math.min(bbox.w,bbox.r); // remove extra right-hand padding, if any
+ var dx = Math.max(w,sbox.offset/scale);
+ if (h) root.style.verticalAlign = CHTML.Em(h/scale);
+ if (dx > w) root.firstChild.style.paddingLeft = CHTML.Em(dx-w);
+ dx -= sbox.offset/scale;
+ root.style.width = CHTML.Em(dx);
+ BBOX.combine(bbox,0,h);
+ return dx*scale;
+ },
+ CHTMLrootHeight: function (bbox,sbox,scale) {
+ return .45*(sbox.h+sbox.d-.9*scale) + .6*scale + Math.max(0,bbox.d*bbox.scale-.075);
+ }
+ });
+
+ /********************************************************/
+
+ MML.mfenced.Augment({
+ toCommonHTML: function (node) {
+ node = this.CHTMLcreateNode(node);
+ this.CHTMLhandleStyle(node);
+ this.CHTMLhandleScale(node);
+ //
+ // Make row of open, data, sep, ... data, close
+ //
+ this.CHTMLaddChild(node,"open",{});
+ for (var i = 0, m = this.data.length; i < m; i++) {
+ this.CHTMLaddChild(node,"sep"+i,{});
+ this.CHTMLaddChild(node,i,{});
+ }
+ this.CHTMLaddChild(node,"close",{});
+ //
+ // Check for stretching the elements
+ //
+ var H = this.CHTML.h, D = this.CHTML.d;
+ this.CHTMLstretchChildV("open",H,D);
+ for (i = 0, m = this.data.length; i < m; i++) {
+ this.CHTMLstretchChildV("sep"+i,H,D);
+ this.CHTMLstretchChildV(i,H,D);
+ }
+ this.CHTMLstretchChildV("close",H,D);
+ this.CHTMLhandleSpace(node);
+ this.CHTMLhandleBBox(node);
+ this.CHTMLhandleColor(node);
+ return node;
+ }
+ });
+
+ /********************************************************/
+
+ MML.mrow.Augment({
+ toCommonHTML: function (node,options) {
+ options = options || {};
+ node = this.CHTMLdefaultNode(node);
+ var bbox = this.CHTML, H = bbox.h, D = bbox.d, hasNegative;
+ for (var i = 0, m = this.data.length; i < m; i++) {
+ this.CHTMLstretchChildV(i,H,D);
+ if (this.data[i] && this.data[i].CHTML && this.data[i].CHTML.w < 0) hasNegative = true;
+ }
+ if (this.CHTMLlineBreaks()) {
+ this.CHTMLmultiline(node);
+ if (options.autowidth) node.style.width = "";
+ } else {
+ if (hasNegative && bbox.w) node.style.width = CHTML.Em(Math.max(0,bbox.w));
+ if (bbox.w < 0) node.style.marginRight = CHTML.Em(bbox.w);
+ }
+ return node;
+ },
+ CHTMLlineBreaks: function () {
+ if (!this.parent.linebreakContainer) return false;
+ return (LINEBREAKS.automatic && this.CHTML.w > CHTML.linebreakWidth) || this.hasNewline();
+ },
+ CHTMLstretchV: function (h,d) {
+ this.CHTMLstretchChildV(this.CoreIndex(),h,d);
+ return this.CHTML;
+ },
+ CHTMLstretchH: function (node,w) {
+ this.CHTMLstretchChildH(this.CoreIndex(),w,node);
+ return this.CHTML;
+ }
+ });
+
+ /********************************************************/
+
+ MML.TeXAtom.Augment({
+ toCommonHTML: function (node,options) {
+ if (!options || !options.stretch) node = this.CHTMLdefaultNode(node);
+ if (this.texClass === MML.TEXCLASS.VCENTER) {
+ var a = CHTML.TEX.axis_height, BBOX = this.CHTML;
+ var v = a-(BBOX.h+BBOX.d)/2+BBOX.d;
+ if (Math.abs(v) > .001) {
+ node.style.verticalAlign = CHTML.Em(v);
+ BBOX.h += v; BBOX.t += v; BBOX.d -= v; BBOX.b -= v;
+ }
+ }
+ return node;
+ },
+ CHTMLstretchV: function (h,d) {
+ this.CHTMLupdateFrom(this.Core().CHTMLstretchV(h,d));
+ this.toCommonHTML(this.CHTMLnodeElement(),{stretch:true});
+ return this.CHTML;
+ },
+ CHTMLstretchH: function (node,w) {
+ this.CHTMLupdateFrom(this.CHTMLstretchCoreH(node,w));
+ this.toCommonHTML(node,{stretch:true});
+ return this.CHTML;
+ }
+ });
+
+ /********************************************************/
+
+ MML.semantics.Augment({
+ toCommonHTML: function (node) {
+ node = this.CHTMLcreateNode(node);
+ if (this.data[0]) {
+ this.data[0].toCommonHTML(node);
+ this.CHTMLupdateFrom(this.data[0].CHTML);
+ this.CHTMLhandleBBox(node);
+ }
+ return node;
+ }
+ });
+ MML.annotation.Augment({toCommonHTML: function(node) {return this.CHTMLcreateNode(node)}});
+ MML["annotation-xml"].Augment({toCommonHTML: MML.mbase.CHTMLautoload});
+
+ /********************************************************/
+
+ MML.ms.Augment({toCommonHTML: MML.mbase.CHTMLautoload});
+ MML.mglyph.Augment({toCommonHTML: MML.mbase.CHTMLautoload});
+ MML.menclose.Augment({toCommonHTML: MML.mbase.CHTMLautoload});
+ MML.maction.Augment({toCommonHTML: MML.mbase.CHTMLautoload});
+ MML.mmultiscripts.Augment({toCommonHTML: MML.mbase.CHTMLautoload});
+ MML.mtable.Augment({toCommonHTML: MML.mbase.CHTMLautoload});
+
+ /********************************************************/
+
+ //
+ // Loading isn't complete until the element jax is modified,
+ // but can't call loadComplete within the callback for "mml Jax Ready"
+ // (it would call CommonHTML's Require routine, asking for the mml jax again)
+ // so wait until after the mml jax has finished processing.
+ //
+ // We also need to wait for the onload handler to run, since the loadComplete
+ // will call Config and Startup, which need to modify the body.
+ //
+ MathJax.Hub.Register.StartupHook("onLoad",function () {
+ setTimeout(MathJax.Callback(["loadComplete",CHTML,"jax.js"]),0);
+ });
+ });
+
+ MathJax.Hub.Register.StartupHook("End Cookie", function () {
+ if (HUB.config.menuSettings.zoom !== "None")
+ {AJAX.Require("[MathJax]/extensions/MathZoom.js")}
+ });
+
+})(MathJax.Ajax,MathJax.Hub,MathJax.HTML,MathJax.OutputJax.CommonHTML);
+// @license-end
diff --git a/js/mathjax/jax/output/NativeMML/config.js b/js/mathjax/jax/output/NativeMML/config.js
new file mode 100644
index 0000000..a0f7480
--- /dev/null
+++ b/js/mathjax/jax/output/NativeMML/config.js
@@ -0,0 +1,54 @@
+// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0
+/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
+/* vim: set ts=2 et sw=2 tw=80: */
+
+/*************************************************************
+ *
+ * MathJax/jax/output/NativeMML/config.js
+ *
+ * Initializes the NativeMML OutputJax (the main definition is in
+ * MathJax/jax/input/NativeMML/jax.js, which is loaded when needed).
+ *
+ * ---------------------------------------------------------------------
+ *
+ * Copyright (c) 2009-2020 The MathJax Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+MathJax.OutputJax.NativeMML = MathJax.OutputJax({
+ id: "NativeMML",
+ version: "2.7.9",
+ directory: MathJax.OutputJax.directory + "/NativeMML",
+ extensionDir: MathJax.OutputJax.extensionDir + "/NativeMML",
+
+ config: {
+ matchFontHeight: true, // try to match math font height to surrounding font?
+ scale: 100, // scaling factor for all math
+ minScaleAdjust: 50, // minimum scaling to adjust to surrounding text
+ // (since the code for that is a bit delicate)
+
+ styles: {
+ "div.MathJax_MathML": {
+ "text-align": "center",
+ margin: ".75em 0px"
+ }
+ }
+ }
+});
+
+if (!MathJax.Hub.config.delayJaxRegistration)
+ MathJax.OutputJax.NativeMML.Register("jax/mml");
+
+MathJax.OutputJax.NativeMML.loadComplete("config.js");
+// @license-end
diff --git a/js/mathjax/jax/output/NativeMML/jax.js b/js/mathjax/jax/output/NativeMML/jax.js
new file mode 100644
index 0000000..75da9f5
--- /dev/null
+++ b/js/mathjax/jax/output/NativeMML/jax.js
@@ -0,0 +1,1433 @@
+// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0
+/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
+/* vim: set ts=2 et sw=2 tw=80: */
+
+/*************************************************************
+ *
+ * MathJax/jax/output/NativeMML/jax.js
+ *
+ * Implements the NativeMML OutputJax that displays mathematics
+ * using a browser's native MathML capabilities (if any).
+ *
+ * ---------------------------------------------------------------------
+ *
+ * Copyright (c) 2010-2020 The MathJax Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+(function (nMML,HUB,AJAX,HTML) {
+ var MML, isMSIE = HUB.Browser.isMSIE;
+
+ var EVENT, TOUCH, HOVER, ZOOM; // filled in later
+
+ HUB.Register.StartupHook("MathZoom Ready",function () {ZOOM = MathJax.Extension.MathZoom});
+
+ var NOPADDING = function (side,obj) {
+ var span = HTML.Element("span"); side = "padding"+side;
+ if (obj) {
+ span.style.cssText = (obj.getAttribute("style")||"");
+ if (span.style.padding === "" && (span.style[side]||"") === "") {
+ span.style[side] = "0px"; obj.setAttribute("style",span.style.cssText)
+ }
+ }
+ };
+
+ var CELLSPACING = function (obj,rowSpacing,columnSpacing) {
+ //
+ // Webkit default padding on mtd cells is simply
+ //
+ // mtd {padding: 0.5ex;}
+ //
+ // Gecko default padding on mtd cells is
+ //
+ // mtd {padding-right: 0.4em;
+ // padding-left: 0.4em;
+ // padding-bottom: 0.5ex;
+ // padding-top: 0.5ex;}
+ // mtr:first-child > mtd {padding-top: 0ex;}
+ // mtr:last-child > mtd {padding-bottom: 0ex;}
+ // mtd:first-child {padding-left: 0em;}
+ // mtd:last-child {padding-right: 0em;}
+ //
+ // that is the columnspacing/rowspacing is split into two adjacent cells,
+ // and the periphery of boundary cells is set to zero.
+ //
+ // Here, we will set the left/top padding of each cell to
+ // rowSpacing/columnSpacing (or 0px for the leftmost/topmost cells) and
+ // reset the right/bottom padding to zero.
+ //
+ if (obj) {
+ var span = HTML.Element("span");
+ span.style.cssText = (obj.getAttribute("style")||"");
+ if (span.style.padding === "") {
+ var padding = { paddingLeft: columnSpacing, paddingTop: rowSpacing,
+ paddingRight: "0px", paddingBottom: "0px" };
+ for (var side in padding) {if (padding.hasOwnProperty(side)) {
+ if ((span.style[side]||"") === "") {span.style[side] = padding[side];}
+ }}
+ }
+ obj.setAttribute("style",span.style.cssText);
+ }
+ };
+
+ nMML.Augment({
+ //
+ // User can configure styles
+ //
+ config: {
+ styles: {
+ ".MathJax_MathML": {
+ "font-style": "normal",
+ "font-weight": "normal",
+ "line-height": "normal",
+ "font-size": "100%",
+ "font-size-adjust":"none",
+ "text-indent": 0,
+ "text-align": "left",
+ "text-transform": "none",
+ "letter-spacing": "normal",
+ "word-spacing": "normal",
+ "word-wrap": "normal",
+ "white-space": "nowrap",
+ "float": "none",
+ "direction": "ltr",
+ "max-width": "none", "max-height": "none",
+ "min-width": 0, "min-height": 0,
+ border: 0, padding: 0, margin: 0
+ },
+
+ "span.MathJax_MathML": {
+ display: "inline!important"
+ },
+
+ "div.MathJax_MathML": {
+ display: "block!important"
+ },
+
+ ".MathJax_mmlExBox": {
+ display:"block!important", overflow:"hidden",
+ height:"1px", width:"60ex",
+ "min-height": 0, "max-height":"none",
+ padding:0, border: 0, margin: 0
+ }
+ }
+ },
+ handlesVariants: false, // true if native support for mathvariants
+ settings: HUB.config.menuSettings,
+ ex: 1, scale: 1, // filled in later
+ adjustWidths: [], // array of elements to have their widths adjusted
+
+ Config: function () {
+ this.SUPER(arguments).Config.call(this);
+ if (this.settings.scale) {this.config.scale = this.settings.scale}
+ //
+ // Insert styling to take account of displayAlign and displayIndent
+ //
+ if (HUB.config.displayAlign !== "center") {
+ var align = HUB.config.displayAlign, indent = HUB.config.displayIndent;
+ var def = {"text-align": align+"!important"}; def["margin-"+align] = indent+"!important";
+ HUB.Insert(this.config.styles,{
+ "div.MathJax_MathML": def,
+ "div.MathJax_MathML math": {"text-align": align},
+ "div.MathJax_MathContainer > span": {"text-align": align+"!important"}
+ });
+ }
+ if (!this.require) {this.require = []}
+ this.require.push(MathJax.OutputJax.extensionDir+"/MathEvents.js");
+ },
+ Startup: function () {
+ // Set up event handling
+ EVENT = MathJax.Extension.MathEvents.Event;
+ TOUCH = MathJax.Extension.MathEvents.Touch;
+ HOVER = MathJax.Extension.MathEvents.Hover;
+ this.ContextMenu = EVENT.ContextMenu;
+ this.Mousedown = EVENT.AltContextMenu;
+ this.Mouseover = HOVER.Mouseover;
+ this.Mouseout = HOVER.Mouseout;
+ this.Mousemove = HOVER.Mousemove;
+
+ if (!HUB.Browser.hasMathPlayer) {
+ // Used in preTranslate to get scaling factors
+ this.EmExSpan = HTML.Element("span",
+ {style:{position:"absolute","font-size-adjust":"none"}},
+ [
+ ["div",{className:"MathJax_mmlExBox"}],
+ ["span",{className:"MathJax_MathML"}]
+ ]
+ );
+ MML.math(MML.mspace().With({width:"60ex"})).toNativeMML(this.EmExSpan.lastChild);
+ }
+
+ // Set up styles
+ return AJAX.Styles(this.config.styles);
+ },
+ //
+ // Set up MathPlayer for IE on the first time through.
+ // Get the ex and em sizes.
+ //
+ InitializeMML: function () {
+ this.initialized = true;
+ if (HUB.Browser.hasMathPlayer) {
+ try {
+ //
+ // Insert data needed to use MathPlayer for MathML output
+ //
+ if (!HUB.Browser.mpNamespace) {
+ var mathplayer = document.createElement("object");
+ mathplayer.id = "mathplayer"; mathplayer.classid = "clsid:32F66A20-7614-11D4-BD11-00104BD3F987";
+ document.getElementsByTagName("head")[0].appendChild(mathplayer);
+ document.namespaces.add("m","http://www.w3.org/1998/Math/MathML");
+ HUB.Browser.mpNamespace = true;
+ }
+ if (!HUB.Browser.mpImported) {
+ document.namespaces.m.doImport("#mathplayer");
+ HUB.Browser.mpImported = true;
+ }
+ } catch (err) {
+ //
+ // If that fails, give an alert about security settings
+ //
+ if (!this.config.noMathPlayerWarning) {
+ alert(MathJax.Localization._(["MathML", "MathPlayer"],
+ "MathJax was not able to set up MathPlayer.\n\n"+
+ "If MathPlayer is not installed, you need to install it first.\n"+
+ "Otherwise, your security settings may be preventing ActiveX \n"+
+ "controls from running. Use the Internet Options item under\n"+
+ "the Tools menu and select the Security tab, then press the\n"+
+ "Custom Level button. Check that the settings for\n"+
+ "'Run ActiveX Controls', and 'Binary and script behaviors'\n"+
+ "are enabled.\n\n"+
+ "Currently you will see error messages rather than\n"+
+ "typeset mathematics."));
+ }
+ }
+ } else {
+ //
+ // Get the default sizes (need styles in place to do this)
+ //
+ document.body.appendChild(this.EmExSpan);
+ this.defaultEx = this.EmExSpan.firstChild.offsetWidth/60;
+ this.defaultMEx = this.EmExSpan.lastChild.offsetWidth/60;
+ document.body.removeChild(this.EmExSpan);
+ }
+ },
+
+ preTranslate: function (state) {
+ var scripts = state.jax[this.id], i, m = scripts.length,
+ script, prev, span, test, math, jax, ex, mex, scale;
+ for (i = 0; i < m; i++) {
+ script = scripts[i]; if (!script.parentNode) continue;
+ if (!this.initialized) {this.InitializeMML()}
+ //
+ // Remove any existing output
+ //
+ prev = script.previousSibling;
+ if (prev && prev.className === "MathJax_MathML") {prev.parentNode.removeChild(prev)}
+ //
+ // Add the MathJax span
+ //
+ jax = script.MathJax.elementJax; if (!jax) continue;
+ math = jax.root; jax.NativeMML = {};
+ var type = (math.Get("display") === "block" ? "div" : "span");
+ span = HTML.Element(type,{
+ className: "MathJax_MathML", id:jax.inputID+"-Frame"
+ },[["span",{
+ className:"MathJax_MathContainer", isMathJax: true, jaxID:this.id,
+ style:{position:"relative", display:"inline-block", "white-space":"nowrap"}
+ }, [["span",{isMathJax:true, style:{display:"inline-block"}}]] // for Firefox hover and zoom
+ ]]);
+ script.parentNode.insertBefore(span,script);
+ //
+ // Add the test span for determining scales
+ //
+ if (!isMSIE) {script.parentNode.insertBefore(this.EmExSpan.cloneNode(true),script)}
+ }
+ //
+ // Determine the scaling factors for each script
+ // (this only requires one reflow rather than a reflow for each equation)
+ //
+ for (i = 0; i < m; i++) {
+ script = scripts[i]; if (!script.parentNode) continue;
+ jax = script.MathJax.elementJax; if (!jax) continue;
+ if (!isMSIE) {
+ test = script.previousSibling;
+ ex = test.firstChild.offsetWidth/60;
+ mex = test.lastChild.offsetWidth/60;
+ if (ex === 0 || ex === "NaN") {ex = this.defaultEx; mex = this.defaultMEx}
+ scale = (this.config.matchFontHeight && mex > 1 ? ex/mex : 1);
+ scale = Math.floor(Math.max(this.config.minScaleAdjust/100,scale) * this.config.scale);
+ jax.NativeMML.ex = ex; jax.NativeMML.mex = mex;
+ } else {scale = 100}
+ jax.NativeMML.fontSize = scale+"%";
+ jax.NativeMML.scale = scale/100;
+ }
+ //
+ // Remove the test spans used for determining scales
+ //
+ if (!isMSIE) {
+ for (i = 0; i < m; i++) {
+ script = scripts[i];
+ if (script.parentNode && script.MathJax.elementJax) {
+ script.parentNode.removeChild(script.previousSibling);
+ }
+ }
+ }
+ },
+
+ //
+ // Add a SPAN to use as a container, and render the math into it
+ //
+ Translate: function (script) {
+ if (!script.parentNode) return;
+ //
+ // Get the jax and the container and set the size
+ //
+ var jax = script.MathJax.elementJax, math = jax.root;
+ var span = document.getElementById(jax.inputID+"-Frame"); if (!span) return;
+ var container = span.firstChild, mspan = container.firstChild;
+ this.ex = jax.NativeMML.ex || this.defaultEx;
+ this.scale = jax.NativeMML.scale || 1;
+ if (this.scale !== 1) {span.style.fontSize = jax.NativeMML.fontSize}
+ //
+ // Convert to MathML (if restarted, remove any partial math)
+ //
+ try {math.toNativeMML(mspan,jax)} catch (err) {
+ if (err.restart) {while (mspan.firstChild) {mspan.removeChild(mspan.firstChild)}}
+ throw err;
+ }
+ //
+ // Add event handlers
+ //
+ if (isMSIE) {
+ if (container.addEventListener) {
+ for (var id in this.MSIE9events) {if (this.MSIE9events.hasOwnProperty(id)) {
+ container.addEventListener(id,this.MSIE9event,true);
+ }}
+ } else {
+ var config = (this.config.showMathMenuMSIE != null ? this : HUB).config;
+ if (config.showMathMenuMSIE && !this.settings.mpContext && !this.settings.mpMouse)
+ {this.MSIEoverlay(container)} else
+ {container.style.position = ""; mspan.firstChild.onmousedown = this.MSIEaltMenu}
+ }
+ } else {
+ container.oncontextmenu = EVENT.Menu;
+ container.onmouseover = EVENT.Mouseover;
+ container.onmouseout = EVENT.Mouseout;
+ container.onmousedown = EVENT.Mousedown;
+ container.onclick = EVENT.Click;
+ container.ondblclick = EVENT.DblClick;
+ // Added for keyboard accessible menu.
+ container.onkeydown = EVENT.Keydown;
+ container.tabIndex = HUB.getTabOrder(jax);
+ if (HUB.Browser.noContextMenu) {
+ container.ontouchstart = TOUCH.start;
+ container.ontouchend = TOUCH.end;
+ }
+ }
+ },
+
+ postTranslate: function (state) {
+ if (this.forceReflow) {
+ //
+ // Firefox messes up some mtable's when they are dynamically created
+ // but gets them right on a reflow, so force reflow by toggling a stylesheet
+ //
+ var sheet = (document.styleSheets||[])[0]||{};
+ sheet.disabled = true; sheet.disabled = false;
+ }
+ },
+
+ //
+ // Remove MathML preceding the script
+ //
+ Remove: function (jax) {
+ var span = jax.SourceElement(); if (!span) return;
+ span = span.previousSibling; if (!span) return;
+ if (span.className.match(/MathJax_MathML/)) {span.parentNode.removeChild(span)}
+ },
+ //
+ // The namespace to use for MML
+ //
+ MMLnamespace: "http://www.w3.org/1998/Math/MathML",
+
+ isFullWidth: function (node) {
+ if (!node) return;
+ var width = node.getAttribute("width") ||
+ (String(node.getAttribute("style")).match(/(?:^| )width: *([^; ]*)/)||[])[1];
+ if (width) return !!width.match(/%/);
+ if (node.nodeName.match(/^(semantics|math|mstyle)$/)) {
+ width = this.isFullWidth(node.firstChild);
+ } else if (node.nodeName.toLowerCase() === "mrow") {
+ for (var i = 0, m = node.childNodes.length; i < m && !width; i++)
+ width = this.isFullWidth(node.childNodes[i]);
+ }
+ if (width) {
+ var style = "width:100%; "+(node.getAttribute("style")||"");
+ node.setAttribute("style",style.replace(/ +$/,""));
+ }
+ return width;
+ },
+
+ //
+ // For MSIE, we must overlay the MathPlayer object to trap the events
+ // (since they can't be cancelled when the events are on the <math> tag
+ // itself). The events we DON'T want are transferred to the math element,
+ // and the others are handled directly.
+ //
+ MSIEoverlay: function (span) {
+ var math = span.firstChild;
+ if (math.nodeName.toLowerCase() === "span") {math = math.firstChild}
+ var bbox = this.getHoverBBox(null,math,{});
+ HTML.addElement(span,"span",{
+ style:{display:"inline-block", width:0, height:0, position:"relative"}
+ },[["span",{isMathJax: true, className: "MathJax_MathPlayer_Overlay",
+ style:{
+ display:"inline-block", position:"absolute",
+ left:HOVER.Px(-bbox.w), top:HOVER.Px(-bbox.h-(bbox.y||0)-1),
+ width:HOVER.Px(bbox.w), height:HOVER.Px(bbox.h+bbox.d), cursor:"pointer",
+ "background-color":"white", filter:"alpha(opacity=0)"
+ }
+ }]]);
+ HUB.Insert(span,{
+ msieMath: math,
+ onmousedown: this.MSIEevent, oncontextmenu: this.MSIEevent, onclick: this.MSIEevent,
+ onmouseup: this.MSIEevent, onmousemove: this.MSIEevent, ondblclick: this.MSIEevent,
+ onmouseover: this.MSIEevent, onmouseout: this.MSIEevent
+ });
+ },
+ MSIEevents: {
+ mousedown:"Mousedown", contextmenu:"ContextMenu", click:"Click",
+ mouseup:"Mouseup", mousemove:"Mousemove", dblclick: "DblClick",
+ mouseover:"Mouseover", mouseout:"Mouseout"
+ },
+ MSIEevent: function () {
+ var event = window.event;
+ var type = nMML.MSIEevents[event.type];
+ if (nMML[type] && nMML[type](event,this) === false) {return false}
+ if (ZOOM && ZOOM.HandleEvent(event,type,this) === false) {return false}
+ if (event.srcElement.className === "MathJax_MathPlayer_Overlay" && this.msieMath.fireEvent) {
+ //
+ // For now, ignore all other events. This will disable MathPlayer's zoom
+ // feature, but also its <maction> support.
+ //
+ if (type === "ContextMenu" || type === "Mouseover" || type === "Mouseout")
+ {this.msieMath.fireEvent("on"+event.type,event)}
+ }
+ return EVENT.False(event);
+ },
+ MSIEaltMenu: function () {
+ var container = this.parentNode.parentNode;
+ while (!container.jaxID) {container = container.parentNode}
+ EVENT.AltContextMenu(window.event,container);
+ },
+
+ MSIE9events: {
+ contextmenu:"Menu", click:"Click", dblclick: "DblClick",
+ mouseup:"False", mouseover:"Mouseover", mouseout:"Mouseout"
+ },
+ MSIE9event: function (event) {
+ if (event.type === "contextmenu" && nMML.settings.mpContext) {return true}
+ if (event.type === "mouseup" && nMML.settings.mpMouse) {return true}
+ if (event.type === "click" && nMML.settings.mpContext)
+ {return EVENT.AltContextMenu(event,this)}
+ var type = nMML.MSIE9events[event.type];
+ return EVENT[type].call(this,event);
+ },
+
+ getJaxFromMath: function (math) {
+ math = math.parentNode;
+ do {math = math.nextSibling} while (math && math.nodeName.toLowerCase() !== "script");
+ return HUB.getJaxFor(math);
+ },
+ getHoverSpan: function (jax,math) {return math.firstChild},
+ getHoverBBox: function (jax,span,math) {return EVENT.getBBox(span.parentNode)},
+
+ Zoom: function (jax,span,math,Mw,Mh) {
+ jax.root.toNativeMML(span);
+ if (this.msieIE8HeightBug) {span.style.position = "absolute"}
+ if (nMML.widthBug) {span.style.width = span.parentNode.style.width = ""}
+ if (span.parentNode.style.width.match(/%$/))
+ {span.parentNode.style.minWidth = Math.ceil(3*Mh/4)+"px"} // for full-width tables
+ var mW = math.offsetWidth || math.scrollWidth,
+ mH = math.offsetHeight || math.scrollHeight;
+ var zW = span.offsetWidth, zH = span.offsetHeight;
+ if (nMML.widthBug || span.style.width.match(/%/)) {
+ //
+ // FF doesn't get width of <math> right, so get it from <mrow>
+ //
+ var W = span.firstChild.firstChild.scrollWidth;
+ if (W > zW) {zW = W; span.parentNode.style.width = span.style.minWidth = zW + "px";}
+ }
+ if (this.msieIE8HeightBug) {span.style.position = ""}
+ return {Y:-EVENT.getBBox(span.parentNode).h, mW:mW, mH:mH, zW:zW, zH:zH}
+ },
+
+ NAMEDSPACE: {
+ negativeveryverythinmathspace: "-.0556em",
+ negativeverythinmathspace: "-.1111em",
+ negativethinmathspace: "-.1667em",
+ negativemediummathspace: "-.2222em",
+ negativethickmathspace: "-.2778em",
+ negativeverythickmathspace: "-.3333em",
+ negativeveryverythickmathspace: "-.3889em",
+ veryverythinmathspace: ".0556em",
+ verythinmathspace: ".1111em",
+ thinmathspace: ".1667em",
+ mediummathspace: ".2222em",
+ thickmathspace: ".2778em",
+ verythickmathspace: ".3333em",
+ veryverythickmathspace: ".3889em"
+ }
+ });
+
+ HUB.Register.StartupHook("mml Jax Ready",function () {
+
+ MML = MathJax.ElementJax.mml;
+
+ MML.mbase.Augment({
+ //
+ // Add a MathML tag of the correct type, and set its attributes
+ // then populate it with its children and append it to the parent
+ //
+ toNativeMML: function (parent) {
+ var tag = this.NativeMMLelement(this.type);
+ this.NativeMMLattributes(tag);
+ for (var i = 0, m = this.data.length; i < m; i++) {
+ if (this.data[i]) {this.data[i].toNativeMML(tag)}
+ else {tag.appendChild(this.NativeMMLelement("mrow"))}
+ }
+ parent.appendChild(tag);
+ },
+ //
+ // Look for attributes that are different from the defaults
+ // and set those in the tag's attribute list
+ //
+ NativeMMLattributes: function (tag) {
+ var defaults = (this.type === "mstyle" ? MML.math.prototype.defaults : this.defaults);
+ var names = (this.attrNames||MML.copyAttributeNames),
+ skip = MML.skipAttributes, copy = MML.copyAttributes;
+ if (!this.attrNames) {
+ for (var id in defaults) {if (!skip[id] && !copy[id] && defaults.hasOwnProperty(id)) {
+ if (this[id] != null && this[id] !== defaults[id]) {
+ if (this.Get(id,null,1) !== this[id])
+ tag.setAttribute(id,this.NativeMMLattribute(this[id]));
+ }
+ }}
+ }
+ for (var i = 0, m = names.length; i < m; i++) {
+ if (copy[names[i]] === 1 && !defaults.hasOwnProperty(names[i])) continue;
+ var value = (this.attr||{})[names[i]]; if (value == null) {value = this[names[i]]}
+ if (value != null) {tag.setAttribute(names[i],this.NativeMMLattribute(value))}
+ }
+ this.NativeMMLclass(tag);
+ },
+ NativeMMLclass: function (tag) {
+ var CLASS = []; if (this["class"]) {CLASS.push(this["class"])}
+ if (this.isa(MML.TeXAtom)) {
+ var TEXCLASS = ["ORD","OP","BIN","REL","OPEN","CLOSE","PUNCT","INNER","VCENTER"][this.texClass];
+ if (TEXCLASS) {
+ CLASS.push("MJX-TeXAtom-"+TEXCLASS)
+ if (TEXCLASS === "OP" && !this.movablelimits) CLASS.push("MJX-fixedlimits");
+ }
+ }
+ if (this.mathvariant && this.NativeMMLvariants[this.mathvariant])
+ {CLASS.push("MJX"+this.mathvariant)}
+ if (this.variantForm) {CLASS.push("MJX-variant")}
+ if (CLASS.length) {tag.setAttribute("class",CLASS.join(" "))}
+ },
+ NativeMMLattribute: function (value) {
+ value = String(value);
+ if (nMML.NAMEDSPACE[value]) {value = nMML.NAMEDSPACE[value]} // MP doesn't do negative spaces
+ else if (value.match(/^\s*(([-+])?(\d+(\.\d*)?|\.\d+))\s*mu\s*$/))
+ {value = (RegExp.$2||"")+((1/18)*RegExp.$3).toFixed(3).replace(/\.?0+$/,"")+"em"} // FIXME: should take scriptlevel into account
+ else if (this.NativeMMLvariants[value]) {value = this.NativeMMLvariants[value]}
+ return value;
+ },
+ NativeMMLvariants: {
+ "-tex-caligraphic": MML.VARIANT.SCRIPT,
+ "-tex-caligraphic-bold": MML.VARIANT.BOLDSCRIPT,
+ "-tex-oldstyle": MML.VARIANT.NORMAL,
+ "-tex-oldstyle-bold": MML.VARIANT.BOLD,
+ "-tex-mathit": MML.VARIANT.ITALIC
+ },
+ //
+ // Create a MathML element
+ //
+ NativeMMLelement: function (type) {
+ var math = ( HUB.Browser.mpNamespace ? document.createElement("m:"+type) :
+ (document.createElementNS ? document.createElementNS(nMML.MMLnamespace,type) :
+ document.createElement(type)));
+ math.isMathJax = true;
+ return math;
+ }
+ });
+
+ MML.mrow.Augment({
+ //
+ // Make inferred rows not include an mrow tag
+ //
+ toNativeMML: function (parent) {
+ var i, m;
+ if (this.inferred && this.parent.inferRow) {
+ for (i = 0, m = this.data.length; i < m; i++) {
+ if (this.data[i]) {this.data[i].toNativeMML(parent)}
+ else {parent.appendChild(this.NativeMMLelement("mrow"))}
+ }
+ } else if (nMML.stretchyMoBug && (this.open || this.close)) {
+ //
+ // This element contains opening and/or closing fences. Opera is not
+ // able to stretch <mo> operators, so let's use an <mfenced> element
+ // instead.
+ //
+ var mfenced = this.NativeMMLelement("mfenced");
+ this.NativeMMLattributes(mfenced);
+ i = 0, m = this.data.length;
+ if (this.open) { mfenced.setAttribute("open", this.open); i++; }
+ if (this.close) { mfenced.setAttribute("close", this.close); m--; }
+ var tag = mfenced;
+ if (m - i + 1 > 1) {
+ //
+ // If there are several children, put them in an <mrow>
+ //
+ tag = this.NativeMMLelement("mrow");
+ parent.appendChild(mfenced);
+ parent = mfenced;
+ }
+ for (; i < m; i++) {
+ if (this.data[i]) {this.data[i].toNativeMML(tag)}
+ else {tag.appendChild(this.NativeMMLelement("mrow"))}
+ }
+ parent.appendChild(tag);
+ } else {
+ this.SUPER(arguments).toNativeMML.call(this,parent);
+ }
+ }
+ });
+
+ MML.msubsup.Augment({
+ //
+ // Use proper version of msub, msup, or msubsup, depending on
+ // which items are present
+ //
+ toNativeMML: function (parent) {
+ var type = this.type;
+ if (this.data[this.sup] == null) {type = "msub"}
+ if (this.data[this.sub] == null) {type = "msup"}
+ var tag = this.NativeMMLelement(type);
+ this.NativeMMLattributes(tag);
+ if (this.data[0]) {delete this.data[0].inferred}
+ for (var i = 0, m = this.data.length; i < m; i++)
+ {if (this.data[i]) {this.data[i].toNativeMML(tag)}}
+ parent.appendChild(tag);
+ }
+ });
+
+ MML.munderover.Augment({
+ //
+ // Use proper version of munder, mover, or munderover, depending on
+ // which items are present. Handle movablelimits on TeXAtom base.
+ //
+ toNativeMML: function (parent) {
+ var type = this.type;
+ var base = this.data[this.base];
+ if (base && base.isa(MML.TeXAtom) && base.movablelimits && !base.Get("displaystyle")) {
+ type = "msubsup";
+ if (this.data[this.under] == null) {type = "msup"}
+ if (this.data[this.over] == null) {type = "msub"}
+ } else {
+ if (this.data[this.under] == null) {type = "mover"}
+ if (this.data[this.over] == null) {type = "munder"}
+ }
+ var tag = this.NativeMMLelement(type);
+ this.NativeMMLattributes(tag);
+ if (this.data[0]) {delete this.data[0].inferred}
+ for (var i = 0, m = this.data.length; i < m; i++)
+ {if (this.data[i]) {this.data[i].toNativeMML(tag)}}
+ parent.appendChild(tag);
+ }
+ });
+
+ if (!isMSIE) {
+ var SPLIT = HUB.SplitList;
+ MML.mtable.Augment({
+ toNativeMML: function (parent) {
+ var i, m;
+ if (nMML.tableSpacingBug) {
+ //
+ // Parse the rowspacing/columnspacing. For convenience, we convert
+ // them to a left/top padding value that will be applied to each
+ // cell. The leftmost/topmost cells will use "0px".
+ //
+ var values = this.getValues("rowspacing", "columnspacing");
+ this.nMMLtopPadding = SPLIT("0px "+values.rowspacing);
+ this.nMMLleftPadding = SPLIT("0px "+values.columnspacing);
+ //
+ // Transmit the top padding to each row.
+ // If this.parent.nMML.topPadding does not contain enough value,
+ // repeat the last one.
+ //
+ var tp = this.nMMLtopPadding, M = tp.length;
+ for (i = 0, m = this.data.length; i < m; i++) {
+ if (this.data[i])
+ {this.data[i].nMMLtopPadding = tp[i < M ? i : M-1]}
+ }
+ }
+ if (nMML.tableLabelBug) {
+ //
+ // Look for labeled rows so we know how to handle them
+ //
+ for (i = 0, m = this.data.length; i < m; i++) {
+ if (this.data[i] && this.data[i].isa(MML.mlabeledtr)) {
+ var align = HUB.config.displayAlign.charAt(0),
+ side = this.Get("side").charAt(0);
+ this.nMMLhasLabels = true;
+ this.nMMLlaMatch = (align === side);
+ this.nMMLforceWidth =
+ (align === "c" || !!((this.width||"").match("%")));
+ break;
+ }
+ }
+ }
+ //
+ // Firefox < 13 doesn't handle width, so put it in styles instead
+ //
+ if (this.width && this.ffTableWidthBug) {
+ var styles = (this.style||"").replace(/;\s*$/,"").split(";");
+ if (styles[0] === "") {styles.shift()}
+ styles.push("width:"+this.width);
+ this.style = styles.join(";");
+ }
+ this.SUPER(arguments).toNativeMML.call(this,parent);
+ //
+ if (this.nMMLhasLabels) {
+ var mtable = parent.firstChild;
+ //
+ // Add column attributes on the left when extra columns where inserted
+ //
+ if (this.nMMLforceWidth || side !== "r") {
+ var n = (align !== "l" ? 1 : 0) + (side === "l" ? 1 : 0);
+ if (n) {
+ var attr = {columnalign:"left", columnwidth:"auto",
+ columnspacing:"0px", columnlines:"none"};
+ for (var id in attr) {if (attr.hasOwnProperty(id) && this[id]) {
+ var cols = [attr[id],attr[id]].slice(2-n).join(" ")+" ";
+ mtable.setAttribute(id,cols+mtable.getAttribute(id));
+ }}
+ }
+ }
+ //
+ // Force the table width to 100% when needed
+ //
+ if (this.nMMLforceWidth || !this.nMMLlaMatch)
+ {mtable.setAttribute("width","100%")}
+ }
+ }
+ });
+ MML.mtr.Augment({
+ toNativeMML: function (parent) {
+ this.SUPER(arguments).toNativeMML.call(this,parent);
+ var mtr = parent.lastChild;
+ if (nMML.tableSpacingBug) {
+ //
+ // Set the row/column spacing. If this.parent.nMMLleftPadding does
+ // not contain enough value, repeat the last one.
+ //
+ var lp = this.parent.nMMLleftPadding, M = lp.length;
+ for (var mtd = mtr.firstChild, i = 0; mtd; mtd = mtd.nextSibling, i++) {
+ CELLSPACING(mtd,this.nMMLtopPadding,lp[i < M ? i : M-1]);
+ }
+ }
+
+ if (nMML.tableLabelBug) {
+ var forceWidth = this.parent.nMMLforceWidth,
+ side = this.parent.Get("side").charAt(0),
+ align = HUB.config.displayAlign.charAt(0);
+
+ if (this.parent.nMMLhasLabels && mtr.firstChild) {
+ //
+ // If we add a label or padding column on the left of mlabeledtr,
+ // mirror that here and remove padding from first table mtd
+ // so the spacing is consistent with unlabeled equations
+ //
+ if (forceWidth || side !== "r") {
+ NOPADDING("Left",mtr.firstChild);
+ if (align !== "l") {
+ mtr.insertBefore(this.NativeMMLelement("mtd"),mtr.firstChild)
+ .setAttribute("style","padding:0");
+ }
+ if (side === "l") {
+ mtr.insertBefore(this.NativeMMLelement("mtd"),mtr.firstChild)
+ .setAttribute("style","padding:0");
+ }
+ }
+ //
+ // If columns were added on the right, remove mtd padding
+ // so that spacing is consistent with unlabled equations
+ //
+ if (forceWidth || side !== "l") {NOPADDING("Right",mtr.lastChild)}
+ }
+ }
+ }
+ });
+ MML.mlabeledtr.Augment({
+ toNativeMML: function (parent) {
+ var mtr = this.NativeMMLelement("mtr");
+ this.NativeMMLattributes(mtr);
+ //
+ // Add row data
+ //
+ for (var i = 1, m = this.data.length; i < m; i++) {
+ if (this.data[i]) {this.data[i].toNativeMML(mtr)}
+ else {mtr.appendChild(this.NativeMMLelement("mtd"))}
+ }
+
+ if (nMML.tableSpacingBug) {
+ //
+ // Set the row/column spacing. If this.parent.nMMLleftPadding does
+ // not contain enough value, repeat the last one.
+ //
+ var lp = this.parent.nMMLleftPadding, M = lp.length; i = 0;
+ for (var mtd = mtr.firstChild; mtd; mtd = mtd.nextSibling, i++) {
+ CELLSPACING(mtd,this.nMMLtopPadding,lp[i < M ? i : M-1]);
+ }
+ }
+
+ if (nMML.tableLabelBug && this.data[0]) {
+ var side = this.parent.Get("side").charAt(0),
+ align = HUB.config.displayAlign.charAt(0),
+ indent = HUB.config.displayIndent;
+ //
+ // Create label and either set the column width (if label is on the
+ // same side as the alignment), or use mpadded to hide the label
+ // width
+ //
+ this.data[0].toNativeMML(mtr);
+ var label = mtr.lastChild, pad = label;
+ if (side === align) {
+ label.setAttribute("style","width:"+indent);
+ label.setAttribute("columnalign",HUB.config.displayAlign);
+ } else {
+ pad = this.NativeMMLelement("mpadded");
+ pad.setAttribute("style","width:0");
+ pad.setAttribute("width","0px");
+ pad.appendChild(label.firstChild);
+ label.appendChild(pad);
+ }
+ NOPADDING("",label); mtr.removeChild(label);
+ //
+ // Get spacing to use for separation of label from main table
+ //
+ var width = 100, forceWidth = this.parent.nMMLforceWidth;
+ if ((this.parent.width||"").match(/%/)) {
+ width -= parseFloat(this.parent.width)
+ };
+ var w = width;
+ //
+ // Add spacing (and possibly label) at the left if needed
+ //
+ if (forceWidth || side !== "r") {
+ NOPADDING("Left",mtr.firstChild);
+ if (align !== "l") {
+ if (align === "c") {w /= 2}; width -= w;
+ mtr.insertBefore(this.NativeMMLelement("mtd"),mtr.firstChild)
+ .setAttribute("style","padding:0;width:"+w+"%");
+ }
+ if (side === "l") {mtr.insertBefore(label,mtr.firstChild)}
+ }
+ //
+ // Add spacing (and possibly label) at the right if needed
+ //
+ if (forceWidth || side !== "l") {
+ NOPADDING("Right",mtr.lastChild);
+ if (align !== "r") {
+ mtr.appendChild(this.NativeMMLelement("mtd"))
+ .setAttribute("style","padding:0;width:"+width+"%");
+ }
+ if (side === "r") {
+ if (side !== align) {pad.setAttribute("lspace","-1width")}
+ mtr.appendChild(label);
+ }
+ }
+ }
+ //
+ // Add row to table
+ //
+ parent.appendChild(mtr);
+ }
+ });
+
+ MML.mtd.Augment({
+ toNativeMML: function (parent) {
+ var tag = parent.appendChild(this.NativeMMLelement(this.type));
+ this.NativeMMLattributes(tag);
+ if (nMML.mtdWidthBug) {
+ nMML.adjustWidths.push(tag);
+ tag = tag.appendChild(this.NativeMMLelement("mrow"));
+ }
+ for (var i = 0, m = this.data.length; i < m; i++) {
+ if (this.data[i]) {this.data[i].toNativeMML(tag)}
+ else {tag.appendChild(this.NativeMMLelement("mrow"))}
+ }
+ }
+ });
+
+ MML.mspace.Augment({
+ toNativeMML: function (parent) {
+ this.SUPER(arguments).toNativeMML.call(this,parent);
+ if (nMML.spaceWidthBug && this.width) {
+ var mspace = parent.lastChild;
+ var width = mspace.getAttribute("width");
+ var style = (mspace.getAttribute("style") || "").replace(/;?\s*/,"; ");
+ mspace.setAttribute("style",style+"width:"+width);
+ }
+ }
+ });
+
+ MML.mn.Augment({
+ NativeMMLremapMinus: function (text) {return text.replace(/^-/,"\u2212")},
+ toNativeMML: function (parent) {
+ var tag = this.NativeMMLelement(this.type);
+ this.NativeMMLattributes(tag);
+ var remap = this.NativeMMLremapMinus;
+ for (var i = 0, m = this.data.length; i < m; i++) {
+ if (this.data[i]) {
+ this.data[i].toNativeMML(tag,remap);
+ remap = null;
+ }
+ }
+ parent.appendChild(tag);
+ }
+ });
+
+ var fontDir = AJAX.fileURL(MathJax.OutputJax.fontDir+"/HTML-CSS/TeX/otf");
+
+ /*
+ * Add fix for mathvariant issues
+ */
+ nMML.Augment({
+ config: {
+ styles: {
+ '[class="MJX-tex-oldstyle"]': {"font-family":"MathJax_Caligraphic, MathJax_Caligraphic-WEB"},
+ '[class="MJX-tex-oldstyle-bold"]': {"font-family":"MathJax_Caligraphic, MathJax_Caligraphic-WEB", "font-weight":"bold"},
+ '[class="MJX-tex-caligraphic"]': {"font-family":"MathJax_Caligraphic, MathJax_Caligraphic-WEB"},
+ '[class="MJX-tex-caligraphic-bold"]': {"font-family":"MathJax_Caligraphic, MathJax_Caligraphic-WEB", "font-weight":"bold"},
+
+ '@font-face /*1*/': {
+ "font-family": "MathJax_Caligraphic-WEB",
+ "src": "url('"+fontDir+"/MathJax_Caligraphic-Regular.otf')"
+ },
+ '@font-face /*2*/': {
+ "font-family": "MathJax_Caligraphic-WEB", "font-weight":"bold",
+ "src": "url('"+fontDir+"/MathJax_Caligraphic-Bold.otf')"
+ }
+ }
+ }
+ });
+ if (!this.handlesVariants) {
+ nMML.Augment({
+ config: {
+ styles: {
+ '[mathvariant="double-struck"]': {"font-family":"MathJax_AMS, MathJax_AMS-WEB"},
+ '[mathvariant="script"]': {"font-family":"MathJax_Script, MathJax_Script-WEB"},
+ '[mathvariant="fraktur"]': {"font-family":"MathJax_Fraktur, MathJax_Fraktur-WEB"},
+ '[mathvariant="bold-script"]': {"font-family":"MathJax_Script, MathJax_Caligraphic-WEB", "font-weight":"bold"},
+ '[mathvariant="bold-fraktur"]': {"font-family":"MathJax_Fraktur, MathJax_Fraktur-WEB", "font-weight":"bold"},
+ '[mathvariant="monospace"]': {"font-family":"monospace"},
+ '[mathvariant="sans-serif"]': {"font-family":"sans-serif"},
+ '[mathvariant="bold-sans-serif"]': {"font-family":"sans-serif", "font-weight":"bold"},
+ '[mathvariant="sans-serif-italic"]': {"font-family":"sans-serif", "font-style":"italic"},
+ '[mathvariant="sans-serif-bold-italic"]': {"font-family":"sans-serif", "font-style":"italic", "font-weight":"bold"},
+
+ '@font-face /*3*/': {
+ "font-family": "MathJax_AMS-WEB",
+ "src": "url('"+fontDir+"/MathJax_AMS-Regular.otf')"
+ },
+ '@font-face /*4*/': {
+ "font-family": "MathJax_Script-WEB",
+ "src": "url('"+fontDir+"/MathJax_Script-Regular.otf')"
+ },
+ '@font-face /*5*/': {
+ "font-family": "MathJax_Fraktur-WEB",
+ "src": "url('"+fontDir+"/MathJax_Fraktur-Regular.otf')"
+ },
+ '@font-face /*6*/': {
+ "font-family": "MathJax_Fraktur-WEB", "font-weight":"bold",
+ "src": "url('"+fontDir+"/MathJax_Fraktur-Bold.otf')"
+ }
+ }
+ }
+ });
+ }
+ }
+
+ MML.math.Augment({
+ toNativeMML: function (parent,jax) {
+ var tag = this.NativeMMLelement(this.type), math = tag;
+ var annotate = (jax ? MathJax.InputJax[jax.inputJax].annotationEncoding : null);
+ var i, m;
+ nMML.adjustWidths = [];
+ //
+ // Some browsers don't seem to add the xmlns attribute, so do it by hand.
+ //
+ tag.setAttribute("xmlns",nMML.MMLnamespace);
+ this.NativeMMLattributes(tag);
+ //
+ // Use an extra <mrow> in FF so that we can get the correct width
+ // (the math element doesn't always have an accurate one, see below)
+ //
+ if (nMML.widthBug) {tag = tag.appendChild(this.NativeMMLelement("mrow"))}
+ //
+ // Addannotation if the input jax provides an annotation encoding
+ //
+ if (annotate) {
+ tag = tag.appendChild(this.NativeMMLelement("semantics"))
+ tag.appendChild(this.NativeMMLelement("mrow"));
+ var annotation = tag.appendChild(this.NativeMMLelement("annotation"));
+ annotation.appendChild(document.createTextNode(jax.originalText));
+ annotation.setAttribute("encoding",annotate);
+ tag = tag.firstChild; // mrow
+ }
+ //
+ // Add the children
+ //
+ for (i = 0, m = this.data.length; i < m; i++) {
+ if (this.data[i]) {this.data[i].toNativeMML(tag)}
+ else {tag.appendChild(this.NativeMMLelement("mrow"))}
+ }
+ //
+ // Look for a top-level mtable and if it has labels
+ // Make sure the containers have 100% width, when needed.
+ // If the label is on the same side as alignment,
+ // override the margin set by the stylesheet.
+ //
+ var mtable = ((this.data[0]||{data:[]}).data[0]||{});
+ if (mtable.nMMLhasLabels) {
+ if (mtable.nMMLforceWidth || !mtable.nMMLlaMatch) {
+ tag.setAttribute("style","width:100%") // mrow node
+ if (annotate) tag.parentNode.setAttribute("style","width:100%"); // semantics node
+ };
+ if (mtable.nMMLlaMatch) {
+ if (parent.parentNode.parentNode.nodeName.toLowerCase() === "div") {
+ parent.parentNode.parentNode.style
+ .setProperty("margin-"+HUB.config.displayAlign,"0px","important");
+ }
+ }
+ }
+ //
+ // Check if container must have width set to 100%
+ //
+ var fullWidth = nMML.isFullWidth(math);
+ if (fullWidth) {parent.style.width = parent.parentNode.style.width = "100%"}
+ //
+ // Add the math to the page
+ //
+ parent.appendChild(math);
+ //
+ // Firefox can't seem to get the width of <math> elements right, so
+ // use an <mrow> to get the actual width and set the style on the
+ // parent element to match. Even if we set the <math> width properly,
+ // it doesn't seem to propagate up to the <span> correctly.
+ //
+ if (nMML.widthBug &&!fullWidth) {
+ //
+ // Convert size to ex's so that it scales properly if the print media
+ // has a different font size.
+ //
+ parent.style.width = (math.firstChild.scrollWidth/nMML.ex/nMML.scale).toFixed(3) + "ex";
+ //
+ // Save size for later when we check if Web fonts have arrived
+ //
+ if (jax) {jax.NativeMML.scrollWidth = math.firstChild.scrollWidth}
+ }
+ if (nMML.adjustWidths.length) {
+ //
+ // Firefox gets the widths of <mtd> elements wrong, so run
+ // through them (now that the math is part of the page) and
+ // fix them up. Use ex's so that they print properly (see above).
+ //
+ var mtd = [];
+ for (i = 0, m = nMML.adjustWidths.length; i < m; i++) {
+ tag = nMML.adjustWidths[i];
+ var style = tag.getAttribute("style") || "";
+ if (!style.match(/(^|;)\s*min-width:/)) {
+ var width = tag.firstChild.scrollWidth;
+ mtd.push(width);
+ width = (width/nMML.ex).toFixed(3)+"ex";
+ style = style.replace(/;?\s*$/,"; ");
+ tag.setAttribute("style",style+"min-width:"+width);
+ }
+ }
+ //
+ // Save the lists so that we can check them later for web font downloads
+ //
+ if (!jax) {jax = HUB.getJaxFor(parent)}
+ if (jax) {jax.NativeMML.mtds = mtd}
+ math.MathJaxMtds = nMML.adjustWidths;
+ nMML.adjustWidths = []; // clear it so we don't hold onto the DOM elements
+ }
+ }
+ });
+
+ MML.mfenced.Augment({
+ toNativeMML: function (parent) {
+ if (!nMML.mfencedBug) {
+ this.SUPER(arguments).toNativeMML.call(this,parent);
+ return;
+ }
+
+ //
+ // Some browsers do not handle <mfenced> very well. The MathML spec
+ // suggests this equivalent construction instead, so let's use it:
+ // <mrow> open, child1, sep1, child2, ... sep(N-1), childN, close</mrow>
+ // Opera is a bit special: it does not support stretchy <mo>, does not
+ // parse mfenced@open/mfenced@close very well, does not support
+ // mfenced@separators and only displays the first child of the <mfenced>
+ // element... For this browser, we will use this construction:
+ // <mfenced open="open" close="close">
+ // <mrow>child1, sep1, child2, sep2, ..., sep(N-1), childN</mrow>
+ // </mfenced>
+ //
+ var isOpera = HUB.Browser.isOpera;
+ var i, m, operator;
+
+ //
+ // parse the open, close and separators attributes.
+ //
+ var values = this.getValues("open","close","separators");
+ values.open = values.open.replace(/^\s+/,"").replace(/\s+$/,"");
+ values.close = values.close.replace(/^\s+/,"").replace(/\s+$/,"");
+ values.separators = values.separators.replace(/\s+/g,"").split("");
+ if (values.separators.length == 0) {
+ //
+ // No separators specified, do not use separators at all.
+ //
+ values.separators = null;
+ } else if (values.separators.length < this.data.length-1) {
+ //
+ // There are not enough separators, repeat the last one.
+ //
+ var s = values.separators[values.separators.length-1];
+ for (i = this.data.length-1-values.separators.length; i > 0; i--)
+ {values.separators.push(s)}
+ }
+
+ //
+ // Create an <mrow> container and attach the attributes of the
+ // <mfenced> element to it. Note: removeAttribute does not raise any
+ // exception when the attributes is absent.
+ //
+ var tag = this.NativeMMLelement(isOpera ? this.type : "mrow");
+ this.NativeMMLattributes(tag);
+ tag.removeAttribute("separators");
+ if (isOpera) {
+ tag.setAttribute("open", values.open);
+ tag.setAttribute("close", values.close);
+ if (this.data.length > 1) {
+ parent.appendChild(tag); parent = tag;
+ tag = this.NativeMMLelement("mrow");
+ }
+ } else {
+ tag.removeAttribute("open");
+ tag.removeAttribute("close");
+ }
+
+ if (!isOpera) {
+ //
+ // Append the opening fence
+ //
+ operator = this.NativeMMLelement("mo");
+ operator.setAttribute("fence", "true");
+ operator.textContent = values.open;
+ tag.appendChild(operator);
+ }
+
+ //
+ // Append the content of the <mfenced>
+ //
+ for (i = 0, m = this.data.length; i < m; i++) {
+ if (values.separators && i > 0) {
+ operator = this.NativeMMLelement("mo");
+ operator.setAttribute("separator", "true");
+ operator.textContent = values.separators[i-1];
+ tag.appendChild(operator);
+ }
+ if (this.data[i]) {this.data[i].toNativeMML(tag)}
+ else {tag.appendChild(this.NativeMMLelement("mrow"))}
+ }
+
+ if (!isOpera) {
+ //
+ // Append the closing fence
+ //
+ operator = this.NativeMMLelement("mo");
+ operator.setAttribute("fence", "true");
+ operator.textContent = values.close;
+ tag.appendChild(operator);
+ }
+
+ // finally, append the new element to the parent.
+ parent.appendChild(tag);
+ }
+ });
+
+ MML.TeXAtom.Augment({
+ //
+ // Convert TeXatom to an mrow
+ //
+ toNativeMML: function (parent) {
+ // FIXME: Handle spacing using mpadded?
+ var tag = this.NativeMMLelement("mrow");
+ this.NativeMMLattributes(tag);
+ this.data[0].toNativeMML(tag);
+ parent.appendChild(tag);
+ }
+ });
+
+ MML.chars.Augment({
+ //
+ // Add a text node
+ //
+ toNativeMML: function (parent,remap) {
+ var text = this.toString();
+ if (remap) text = remap(text);
+ parent.appendChild(document.createTextNode(text));
+ }
+ });
+
+ MML.entity.Augment({
+ //
+ // Add a text node
+ //
+ toNativeMML: function (parent) {
+ parent.appendChild(document.createTextNode(this.toString()));
+ }
+ });
+
+ MML.xml.Augment({
+ //
+ // Insert the XML verbatim
+ //
+ toNativeMML: function (parent) {
+ for (var i = 0, m = this.data.length; i < m; i++)
+ {parent.appendChild(this.data[i].cloneNode(true))}
+ }
+ });
+
+ MML.mi.Augment({
+ toNativeMML: function (parent) {
+ this.SUPER(arguments).toNativeMML.call(this,parent);
+ if (nMML.miItalicBug) {
+ if (this.Get("mathvariant") === MML.VARIANT.NORMAL) {
+ //
+ // When not explicitly specified, mathvariant is set to "italic"
+ // with single char mi and to "normal" with multiple char mi.
+ // Some browsers always set the default to "italic", so let's
+ // attach an explicit mathvariant="normal" attribute.
+ //
+ var mi = parent.lastChild;
+ mi.setAttribute("mathvariant",MML.VARIANT.NORMAL);
+ }
+ }
+ }
+ });
+
+ MML.mo.Augment({
+ toNativeMML: function (parent) {
+ this.SUPER(arguments).toNativeMML.call(this,parent);
+ if (nMML.webkitMoSpacingBug) {
+ //
+ // WebKit does not support lspace/rspace values around operators
+ // (neither explicit nor given by the operator dictionary) and uses
+ // constant values instead. So let's modify the CSS properties here.
+ //
+
+ var lspace = 0, rspace = 0, p = this.parent;
+ if (p && p.type === "mrow" && (p.inferred || !p.isEmbellished())) {
+ //
+ // Retrieve the values of lspace/rspace and convert named spaces.
+ // Other values (except unitless) will be parsed by the CSS engine.
+ //
+ var values = this.getValues("lspace", "rspace");
+ lspace = values.lspace, rspace = values.rspace;
+ if (nMML.NAMEDSPACE[lspace]) {lspace = nMML.NAMEDSPACE[lspace]}
+ if (nMML.NAMEDSPACE[rspace]) {rspace = nMML.NAMEDSPACE[rspace]}
+ }
+
+ //
+ // Now update -webkit-margin-start and -webkit-margin-end.
+ //
+ var mo = parent.lastChild;
+ var span = HTML.Element("span");
+ span.style.cssText = (mo.getAttribute("style")||"");
+ span.style.setProperty("-webkit-margin-start", lspace);
+ span.style.setProperty("-webkit-margin-end", rspace);
+ mo.setAttribute("style",span.style.cssText);
+ }
+ }
+ });
+
+ MML.mmultiscripts.Augment({
+ toNativeMML: function (parent) {
+ //
+ // Some browsers do not implement the mmultiscripts element.
+ // Try to emulate the support using basic script elements.
+ //
+ if (!nMML.mmultiscriptsBug || this.data.length === 0) {
+ this.SUPER(arguments).toNativeMML.call(this,parent);
+ return;
+ }
+
+ //
+ // The children of the mmultiscripts will be wrapped in an mrow so that
+ // attributes and properties set on the original mmultiscripts will
+ // be reflected on this mrow element.
+ //
+ var tag = this.NativeMMLelement("mrow");
+ this.NativeMMLattributes(tag);
+
+ //
+ // Create the base
+ //
+ if (this.data[0]) {this.data[0].toNativeMML(tag)}
+ else {tag.appendChild(this.NativeMMLelement("mrow"))}
+ var base = tag.removeChild(tag.lastChild);
+
+ //
+ // Process the postscript pairs
+ //
+ var m = this.data.length, i, msubsup;
+ for (i = 1; i < m; i+=2) {
+ if (this.data[i].type === "mprescripts") break;
+
+ msubsup = this.NativeMMLelement("msubsup");
+ msubsup.appendChild(base);
+
+ //
+ // append the subscript
+ //
+ if (this.data[i]) {this.data[i].toNativeMML(msubsup)}
+ else {msubsup.appendChild(this.NativeMMLelement("mrow"))}
+
+ //
+ // append the supscript
+ //
+ if (i+1 < m && this.data[i+1]) {this.data[i+1].toNativeMML(msubsup)}
+ else {msubsup.appendChild(this.NativeMMLelement("mrow"))}
+
+ base = msubsup;
+ }
+
+ tag.appendChild(base);
+
+ //
+ // Process the prescript pairs
+ //
+ for (i++; i < m; i+=2) {
+ msubsup = this.NativeMMLelement("msubsup");
+ msubsup.appendChild(this.NativeMMLelement("mrow"));
+
+ //
+ // append the presubscript
+ //
+ if (this.data[i]) {this.data[i].toNativeMML(msubsup)}
+ else {msubsup.appendChild(this.NativeMMLelement("mrow"))}
+
+ //
+ // append the presupscript
+ //
+ if (i+1 < m && this.data[i+1]) {this.data[i+1].toNativeMML(msubsup)}
+ else {msubsup.appendChild(this.NativeMMLelement("mrow"))}
+
+ tag.insertBefore(msubsup, base);
+ }
+
+ parent.appendChild(tag);
+ }
+ });
+
+ HUB.Register.StartupHook("TeX mathchoice Ready",function () {
+ MML.TeXmathchoice.Augment({
+ //
+ // Get the MathML for the selected choice
+ //
+ toNativeMML: function (parent) {this.Core().toNativeMML(parent)}
+ });
+ });
+
+ //
+ // Loading isn't complete until the element jax is modified,
+ // but can't call loadComplete within the callback for "mml Jax Ready"
+ // (it would call NativeMML's Require routine, asking for the mml jax again)
+ // so wait until after the mml jax has finished processing.
+ //
+ setTimeout(MathJax.Callback(["loadComplete",nMML,"jax.js"]),0);
+ });
+
+
+ //
+ // Determine browser characteristics
+ //
+ HUB.Browser.Select({
+ MSIE: function (browser) {
+ var mode = (document.documentMode || 0);
+ nMML.msieIE8HeightBug = (mode === 8);
+ },
+ Opera: function (browser) {
+ nMML.stretchyMoBug = true;
+ nMML.tableLabelBug = true;
+ nMML.mfencedBug = true;
+ nMML.miBug = true;
+ nMML.mmultiscriptsBug = true;
+ },
+ Firefox: function (browser) {
+ var is29 = browser.versionAtLeast("29.0");
+ nMML.ffTableWidthBug = !browser.versionAtLeast("13.0"); // <mtable width="xx"> not implemented
+ nMML.forceReflow = !is29; // <mtable> with alignments set don't display properly without a reflow
+ nMML.widthBug = !is29; // <math> elements don't always get the correct width
+ nMML.mtdWidthBug = true; // <mtd> widths not properly determined
+ nMML.handlesVariants = is29; // FF >=29 handles all math variants
+
+ // In Firefox < 20, the intrinsic width of <mspace> is not computed
+ // correctly and thus the element is displayed incorrectly in <mtable>.
+ nMML.spaceWidthBug = !browser.versionAtLeast("20.0");
+
+ // mtable@rowspacing/mtable@columnspacing not supported.
+ nMML.tableSpacingBug = !browser.versionAtLeast("33.0");
+ nMML.tableLabelBug = true; // mlabeledtr is not implemented.
+ nMML.mfencedBug = true; // mfenced not displayed correctly
+ },
+ Chrome: function (browser) {
+ nMML.tableSpacingBug = true;
+ nMML.tableLabelBug = true;
+ nMML.mfencedBug = true;
+ },
+ Safari: function (browser) {
+ nMML.tableSpacingBug = true;
+ nMML.tableLabelBug = true;
+ nMML.mfencedBug = true;
+ nMML.miItalicBug = true;
+ nMML.webkitMoSpacingBug = true;
+ nMML.spaceWidthBug = true;
+ nMML.mmultiscriptsBug = true;
+ }
+ });
+
+
+ HUB.Register.StartupHook("End Cookie",function () {
+ if (HUB.config.menuSettings.zoom !== "None")
+ {AJAX.Require("[MathJax]/extensions/MathZoom.js")}
+ });
+
+})(MathJax.OutputJax.NativeMML, MathJax.Hub, MathJax.Ajax, MathJax.HTML);
+// @license-end
diff --git a/js/mathjax/jax/output/PlainSource/config.js b/js/mathjax/jax/output/PlainSource/config.js
new file mode 100644
index 0000000..3d6d6be
--- /dev/null
+++ b/js/mathjax/jax/output/PlainSource/config.js
@@ -0,0 +1,51 @@
+// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0
+/*************************************************************
+ *
+ * MathJax/jax/output/PlainSource/config.js
+ *
+ * Initializes the PlainSource OutputJax (the main definition is in
+ * MathJax/jax/input/PlainSource/jax.js, which is loaded when needed).
+ *
+ * ---------------------------------------------------------------------
+ *
+ * Copyright (c) 2015-2020 The MathJax Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+MathJax.OutputJax.PlainSource = MathJax.OutputJax({
+ id: "PlainSource",
+ version: "2.7.9",
+ directory: MathJax.OutputJax.directory + "/PlainSource",
+ extensionDir: MathJax.OutputJax.extensionDir + "/PlainSource",
+
+ config: {
+ styles: {
+ ".MathJax_PlainSource_Display": {
+ "text-align": "center",
+ margin: ".75em 0px",
+ "white-space":"pre"
+ },
+ ".MathJax_PlainSource_Display > span": {
+ display: "inline-block",
+ "text-align": "left"
+ }
+ }
+ }
+});
+
+if (!MathJax.Hub.config.delayJaxRegistration)
+ MathJax.OutputJax.PlainSource.Register("jax/mml");
+
+MathJax.OutputJax.PlainSource.loadComplete("config.js");
+// @license-end
diff --git a/js/mathjax/jax/output/PlainSource/jax.js b/js/mathjax/jax/output/PlainSource/jax.js
new file mode 100644
index 0000000..fb62d44
--- /dev/null
+++ b/js/mathjax/jax/output/PlainSource/jax.js
@@ -0,0 +1,186 @@
+// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0
+/*************************************************************
+ *
+ * MathJax/jax/output/PlainSource/jax.js
+ *
+ * Implements the PlainSource OutputJax that displays whatever
+ * source there was, for assistive technology users who prefer this.
+ *
+ * ---------------------------------------------------------------------
+ *
+ * Copyright (c) 2015-2020 The MathJax Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+(function(AJAX, HUB, HTML, PlainSource) {
+
+ var EVENT, TOUCH, HOVER; // filled in later
+
+ PlainSource.Augment({
+ settings: HUB.config.menuSettings,
+
+ Config: function() {
+ if (!this.require) this.require = [];
+ this.SUPER(arguments).Config.call(this);
+ this.require.push(MathJax.OutputJax.extensionDir + "/MathEvents.js");
+ },
+
+ Startup: function() {
+ //
+ // Set up event handling
+ //
+ EVENT = MathJax.Extension.MathEvents.Event;
+ TOUCH = MathJax.Extension.MathEvents.Touch;
+ HOVER = MathJax.Extension.MathEvents.Hover;
+ this.ContextMenu = EVENT.ContextMenu;
+ this.Mousedown = EVENT.AltContextMenu;
+ this.Mouseover = HOVER.Mouseover;
+ this.Mouseout = HOVER.Mouseout;
+ this.Mousemove = HOVER.Mousemove;
+ return AJAX.Styles(this.config.styles);
+ },
+
+ preTranslate: function(state) {
+ var scripts = state.jax[this.id],
+ i, m = scripts.length,
+ script, prev, span, div, jax;
+ //
+ // Loop through the scripts
+ //
+ for (i = 0; i < m; i++) {
+ script = scripts[i];
+ if (!script.parentNode) continue;
+ //
+ // Remove any existing output
+ //
+ prev = script.previousSibling;
+ if (prev && String(prev.className).match(/^MathJax(_PlainSource)?(_Display)?( MathJax_Process(ing|ed))?$/)) {
+ prev.parentNode.removeChild(prev);
+ }
+ //
+ // Add the span, and a div if in display mode
+ //
+ jax = script.MathJax.elementJax;
+ if (!jax) continue;
+ jax.PlainSource = {
+ display: (jax.root.Get("display") === "block")
+ }
+ span = div = HTML.Element("span", {
+ className: "MathJax_PlainSource",
+ id: jax.inputID + "-Frame",
+ isMathJax: true,
+ jaxID: this.id,
+ oncontextmenu: EVENT.Menu,
+ onmousedown: EVENT.Mousedown,
+ onmouseover: EVENT.Mouseover,
+ onmouseout: EVENT.Mouseout,
+ onmousemove: EVENT.Mousemove,
+ onclick: EVENT.Click,
+ ondblclick: EVENT.DblClick,
+ // Added for keyboard accessible menu.
+ onkeydown: EVENT.Keydown,
+ tabIndex: HUB.getTabOrder(jax)
+ },[["span"]]);
+ if (HUB.Browser.noContextMenu) {
+ span.ontouchstart = TOUCH.start;
+ span.ontouchend = TOUCH.end;
+ }
+ if (jax.PlainSource.display) {
+ div = HTML.Element("div", {
+ className: "MathJax_PlainSource_Display"
+ });
+ div.appendChild(span);
+ }
+ script.parentNode.insertBefore(div, script);
+ }
+ },
+
+ Translate: function(script, state) {
+ if (!script.parentNode) return;
+
+ //
+ // Get the data about the math
+ //
+ var jax = script.MathJax.elementJax,
+ math = jax.root,
+ span = document.getElementById(jax.inputID + "-Frame");
+ //
+ // Typeset the math
+ //
+ this.initPlainSource(math, span);
+ var source = jax.originalText;
+ if (jax.inputJax === "MathML") {
+ if ((jax.root.data[0].data.length > 0) && (jax.root.data[0].data[0].type === "semantics")) {
+ var annotations = jax.root.data[0].data[0].data;
+ for (var a = 0; a < annotations.length; a++){
+ if (annotations[a].attr.encoding === "application/x-tex"){
+ source = jax.root.data[0].data[0].data[a].data[0].data[0];
+ break;
+ }
+ if (annotations[a].attr.encoding === "text/x-asciimath") {
+ source = jax.root.data[0].data[0].data[a].data[0].data[0];
+ }
+ }
+ }
+ }
+ jax.PlainSource.source = source;
+ HTML.addText(span.firstChild,source);
+ },
+
+ postTranslate: function(state) {},
+
+ getJaxFromMath: function(math) {
+ if (math.parentNode.className.match(/MathJax_PlainSource_Display/)) math = math.parentNode;
+ do {math = math.nextSibling} while (math && math.nodeName.toLowerCase() !== "script");
+ return HUB.getJaxFor(math);
+ },
+
+ Zoom: function (jax,span,math,Mw,Mh) {
+ var pad = Math.round(span.parentNode.offsetWidth / 2);
+ span.style.whiteSpace = "pre";
+ HTML.addText(span,jax.PlainSource.source);
+ var mW = math.offsetWidth, mH = math.offsetHeight,
+ zW = span.offsetWidth, zH = span.offsetHeight;
+ var Y = -Math.round((zH+mH)/2) - (jax.PlainSource.display ? 0 : pad);
+ return {mW:mW, mH:mH, zW:zW, zH:zH, Y:Y};
+ },
+
+ initPlainSource: function(math, span) {},
+
+ Remove: function(jax) {
+ var span = document.getElementById(jax.inputID + "-Frame");
+ if (span) {
+ if (jax.PlainSource.display) span = span.parentNode;
+ span.parentNode.removeChild(span);
+ }
+ delete jax.PlainSource;
+ }
+
+ });
+
+ MathJax.Hub.Register.StartupHook("mml Jax Ready", function() {
+ MathJax.Hub.Register.StartupHook("onLoad", function() {
+ setTimeout(MathJax.Callback(["loadComplete", PlainSource, "jax.js"]), 0);
+ });
+ });
+
+ MathJax.Hub.Register.StartupHook("End Cookie", function() {
+ if (HUB.config.menuSettings.zoom !== "None") {
+ AJAX.Require("[MathJax]/extensions/MathZoom.js")
+ }
+ });
+
+})(MathJax.Ajax, MathJax.Hub, MathJax.HTML, MathJax.OutputJax.PlainSource);
+// @license-end
diff --git a/js/mathjax/jax/output/PreviewHTML/config.js b/js/mathjax/jax/output/PreviewHTML/config.js
new file mode 100644
index 0000000..866f2f0
--- /dev/null
+++ b/js/mathjax/jax/output/PreviewHTML/config.js
@@ -0,0 +1,56 @@
+// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0
+/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
+/* vim: set ts=2 et sw=2 tw=80: */
+
+/*************************************************************
+ *
+ * MathJax/jax/output/PreviewHTML/config.js
+ *
+ * Initializes the PreviewHTML OutputJax (the main definition is in
+ * MathJax/jax/input/PreviewHTML/jax.js, which is loaded when needed).
+ *
+ * ---------------------------------------------------------------------
+ *
+ * Copyright (c) 2013-2020 The MathJax Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+MathJax.OutputJax.PreviewHTML = MathJax.OutputJax({
+ id: "PreviewHTML",
+ version: "2.7.9",
+ directory: MathJax.OutputJax.directory + "/PreviewHTML",
+ extensionDir: MathJax.OutputJax.extensionDir + "/PreviewHTML",
+ noFastPreview: true, // don't do fast preview for this output jax
+
+ config: {
+ scale: 100, minScaleAdjust: 50, // global math scaling factor, and minimum adjusted scale factor
+ mtextFontInherit: false, // to make <mtext> be in page font rather than MathJax font
+
+ linebreaks: {
+ automatic: false, // when false, only process linebreak="newline",
+ // when true, insert line breaks automatically in long expressions.
+
+ width: "container" // maximum width of a line for automatic line breaks (e.g. "30em").
+ // use "container" to compute size from containing element,
+ // use "nn% container" for a portion of the container,
+ // use "nn%" for a portion of the window size
+ }
+
+ }
+});
+
+if (!MathJax.Hub.config.delayJaxRegistration) {MathJax.OutputJax.PreviewHTML.Register("jax/mml")}
+
+MathJax.OutputJax.PreviewHTML.loadComplete("config.js");
+// @license-end
diff --git a/js/mathjax/jax/output/PreviewHTML/jax.js b/js/mathjax/jax/output/PreviewHTML/jax.js
new file mode 100644
index 0000000..9fc3b4c
--- /dev/null
+++ b/js/mathjax/jax/output/PreviewHTML/jax.js
@@ -0,0 +1,1098 @@
+// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0
+/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
+/* vim: set ts=2 et sw=2 tw=80: */
+
+/*************************************************************
+ *
+ * MathJax/jax/output/PreviewHTML/jax.js
+ *
+ * Implements the PreviewHTML OutputJax that displays mathematics
+ * using HTML to position the characters from math fonts
+ * in their proper locations.
+ *
+ * ---------------------------------------------------------------------
+ *
+ * Copyright (c) 2013-2020 The MathJax Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+(function (AJAX,HUB,HTML,PHTML) {
+ var MML;
+
+ var EVENT, TOUCH, HOVER; // filled in later
+
+ var FONTS = "'Times New Roman',Times,STIXGeneral,serif";
+ var STYLES = {
+ ".MJXp-script": {"font-size":".8em"},
+
+ ".MJXp-right": {
+ "-webkit-transform-origin":"right",
+ "-moz-transform-origin":"right",
+ "-ms-transform-origin":"right",
+ "-o-transform-origin":"right",
+ "transform-origin":"right"
+ },
+
+ ".MJXp-bold": {"font-weight":"bold"},
+ ".MJXp-italic": {"font-style":"italic"},
+ ".MJXp-scr": {"font-family":"MathJax_Script,"+FONTS},
+ ".MJXp-frak": {"font-family":"MathJax_Fraktur,"+FONTS},
+ ".MJXp-sf": {"font-family":"MathJax_SansSerif,"+FONTS},
+ ".MJXp-cal": {"font-family":"MathJax_Caligraphic,"+FONTS},
+ ".MJXp-mono": {"font-family":"MathJax_Typewriter,"+FONTS},
+ ".MJXp-largeop": {"font-size":"150%"},
+ ".MJXp-largeop.MJXp-int": {"vertical-align":"-.2em"},
+
+ ".MJXp-math": {
+ "display": "inline-block",
+ "line-height": "1.2",
+ "text-indent": "0",
+ "font-family": FONTS,
+ "white-space":"nowrap",
+ "border-collapse":"collapse"
+ },
+ ".MJXp-display": {
+ "display": "block",
+ "text-align": "center",
+ "margin": "1em 0"
+ },
+ ".MJXp-math span": {"display": "inline-block"},
+ ".MJXp-box": {"display":"block!important", "text-align": "center"},
+ ".MJXp-box:after": {"content": '" "'}, // needed for when there is no DOCTYPE
+ ".MJXp-rule": {"display":"block!important", "margin-top":".1em"},
+ ".MJXp-char": {"display":"block!important"},
+
+ ".MJXp-mo": {"margin": "0 .15em"},
+
+ ".MJXp-mfrac": {"margin": "0 .125em", "vertical-align":".25em"},
+ ".MJXp-denom": {"display": "inline-table!important", "width":"100%"},
+ ".MJXp-denom > *": {"display": "table-row!important"},
+
+ ".MJXp-surd": {"vertical-align":"top"},
+ ".MJXp-surd > *": {"display":"block!important"},
+
+ ".MJXp-script-box > * ": {"display":"table!important", "height":"50%"},
+ ".MJXp-script-box > * > *": {"display":"table-cell!important","vertical-align":"top"},
+ ".MJXp-script-box > *:last-child > *": {"vertical-align":"bottom"},
+ ".MJXp-script-box > * > * > *": {"display":"block!important"},
+
+ ".MJXp-mphantom": {"visibility": "hidden"},
+
+ ".MJXp-munderover, .MJXp-munder": {"display":"inline-table!important"},
+ ".MJXp-over": {"display":"inline-block!important","text-align":"center"},
+ ".MJXp-over > *": {"display":"block!important"},
+ ".MJXp-munderover > *, .MJXp-munder > *": {"display":"table-row!important"},
+
+ ".MJXp-mtable": {"vertical-align":".25em", "margin":"0 .125em"},
+ ".MJXp-mtable > *": {"display":"inline-table!important", "vertical-align":"middle"},
+ ".MJXp-mtr": {"display":"table-row!important"},
+ ".MJXp-mtd": {"display":"table-cell!important","text-align":"center","padding":".5em 0 0 .5em"},
+ ".MJXp-mtr > .MJXp-mtd:first-child": {"padding-left":0},
+ ".MJXp-mtr:first-child > .MJXp-mtd": {"padding-top":0},
+ ".MJXp-mlabeledtr": {"display":"table-row!important"},
+ ".MJXp-mlabeledtr > .MJXp-mtd:first-child": {"padding-left":0},
+ ".MJXp-mlabeledtr:first-child > .MJXp-mtd": {"padding-top":0},
+
+ ".MJXp-merror": {
+ "background-color": "#FFFF88",
+ color: "#CC0000",
+ border: "1px solid #CC0000",
+ padding: "1px 3px",
+ "font-style": "normal",
+ "font-size": "90%"
+ }
+ };
+
+ (function () {
+ for (var i = 0; i < 10; i++) {
+ var scale = "scaleX(."+i+")";
+ STYLES[".MJXp-scale"+i] = {
+ "-webkit-transform":scale,
+ "-moz-transform":scale,
+ "-ms-transform":scale,
+ "-o-transform":scale,
+ "transform":scale
+ }
+ }
+ })();
+
+ var BIGDIMEN = 1000000;
+ var V = "V", H = "H";
+
+ PHTML.Augment({
+ settings: HUB.config.menuSettings,
+ config: {styles: STYLES},
+
+ hideProcessedMath: false, // use display:none until all math is processed
+
+ maxStretchyParts: 1000, // limit the number of parts allowed for
+ // stretchy operators. See issue 366.
+
+ Config: function () {
+ if (!this.require) {this.require = []}
+ this.SUPER(arguments).Config.call(this); var settings = this.settings;
+ if (settings.scale) {this.config.scale = settings.scale}
+ this.require.push(MathJax.OutputJax.extensionDir+"/MathEvents.js");
+ },
+
+ Startup: function () {
+ //
+ // Set up event handling
+ //
+ EVENT = MathJax.Extension.MathEvents.Event;
+ TOUCH = MathJax.Extension.MathEvents.Touch;
+ HOVER = MathJax.Extension.MathEvents.Hover;
+ this.ContextMenu = EVENT.ContextMenu;
+ this.Mousedown = EVENT.AltContextMenu;
+ this.Mouseover = HOVER.Mouseover;
+ this.Mouseout = HOVER.Mouseout;
+ this.Mousemove = HOVER.Mousemove;
+
+ //
+ // Determine pixels per inch
+ //
+ var div = HTML.addElement(document.body,"div",{style:{width:"5in"}});
+ this.pxPerInch = div.offsetWidth/5; div.parentNode.removeChild(div);
+
+ //
+ // Set up styles and preload web fonts
+ //
+ return AJAX.Styles(this.config.styles,["InitializePHTML",this]);
+ },
+ InitializePHTML: function () {
+ },
+
+ preTranslate: function (state) {
+ var scripts = state.jax[this.id], i, m = scripts.length,
+ script, prev, span, div, jax;
+ //
+ // Loop through the scripts
+ //
+ for (i = 0; i < m; i++) {
+ script = scripts[i]; if (!script.parentNode) continue;
+ //
+ // Remove any existing output
+ //
+ prev = script.previousSibling;
+ if (prev && String(prev.className).match(/^MathJax(_PHTML)?(_Display)?( MathJax_Process(ing|ed))?$/))
+ {prev.parentNode.removeChild(prev)}
+ //
+ // Add the span, and a div if in display mode,
+ // then mark it as being processed
+ //
+ jax = script.MathJax.elementJax; if (!jax) continue;
+ jax.PHTML = {display: (jax.root.Get("display") === "block")}
+ span = div = HTML.Element("span",{
+ className:"MathJax_PHTML", id:jax.inputID+"-Frame", isMathJax:true, jaxID:this.id,
+ oncontextmenu:EVENT.Menu, onmousedown: EVENT.Mousedown,
+ onmouseover:EVENT.Mouseover, onmouseout:EVENT.Mouseout, onmousemove:EVENT.Mousemove,
+ onclick:EVENT.Click, ondblclick:EVENT.DblClick,
+ // Added for keyboard accessible menu.
+ onkeydown: EVENT.Keydown, tabIndex: HUB.getTabOrder(jax)
+ });
+ if (HUB.Browser.noContextMenu) {
+ span.ontouchstart = TOUCH.start;
+ span.ontouchend = TOUCH.end;
+ }
+ if (jax.PHTML.display) {
+ div = HTML.Element("div",{className:"MathJax_PHTML_Display"});
+ div.appendChild(span);
+ }
+ //
+ div.className += " MathJax_Processing";
+ script.parentNode.insertBefore(div,script);
+ }
+ },
+
+ Translate: function (script,state) {
+ if (!script.parentNode) return;
+
+ //
+ // Get the data about the math
+ //
+ var jax = script.MathJax.elementJax, math = jax.root,
+ span = document.getElementById(jax.inputID+"-Frame"),
+ div = (jax.PHTML.display ? span.parentNode : span);
+ //
+ // Typeset the math
+ //
+ this.initPHTML(math,span);
+// math.setTeXclass();
+ try {math.toPreviewHTML(span)} catch (err) {
+ if (err.restart) {while (span.firstChild) {span.removeChild(span.firstChild)}}
+ throw err;
+ }
+ //
+ // Put it in place, and remove the processing marker
+ //
+ div.className = div.className.split(/ /)[0];
+ //
+ // Check if we are hiding the math until more is processed
+ //
+ if (this.hideProcessedMath) {
+ //
+ // Hide the math and don't let its preview be removed
+ //
+ div.className += " MathJax_Processed";
+ if (script.MathJax.preview) {
+ jax.PHTML.preview = script.MathJax.preview;
+ delete script.MathJax.preview;
+ }
+ }
+ },
+
+ postTranslate: function (state) {
+ var scripts = state.jax[this.id];
+ if (!this.hideProcessedMath) return;
+ for (var i = 0, m = scripts.length; i < m; i++) {
+ var script = scripts[i];
+ if (script && script.MathJax.elementJax) {
+ //
+ // Remove the processed marker
+ //
+ script.previousSibling.className = script.previousSibling.className.split(/ /)[0];
+ var data = script.MathJax.elementJax.PHTML;
+ //
+ // Remove the preview, if any
+ //
+ if (data.preview) {
+ data.preview.innerHTML = "";
+ script.MathJax.preview = data.preview;
+ delete data.preview;
+ }
+ }
+ }
+ },
+
+ getJaxFromMath: function (math) {
+ if (math.parentNode.className.match(/MathJax_PHTML_Display/)) {math = math.parentNode}
+ do {math = math.nextSibling} while (math && math.nodeName.toLowerCase() !== "script");
+ return HUB.getJaxFor(math);
+ },
+ getHoverSpan: function (jax,math) {return jax.root.PHTMLspanElement()},
+ getHoverBBox: function (jax,span,math) {
+ var bbox = jax.root.PHTML, em = jax.PHTML.outerEm;
+ var BBOX = {w:bbox.w*em, h:bbox.h*em, d:bbox.d*em};
+ if (bbox.width) {BBOX.width = bbox.width}
+ return BBOX;
+ },
+
+ Zoom: function (jax,span,math,Mw,Mh) {
+ //
+ // Re-render at larger size
+ //
+ span.className = "MathJax";
+ this.idPostfix = "-zoom"; jax.root.toPHTML(span,span); this.idPostfix = "";
+ //
+ // Get height and width of zoomed math and original math
+ //
+ span.style.position = "absolute";
+ if (!width) {math.style.position = "absolute"}
+ var zW = span.offsetWidth, zH = span.offsetHeight,
+ mH = math.offsetHeight, mW = math.offsetWidth;
+ if (mW === 0) {mW = math.parentNode.offsetWidth}; // IE7 gets mW == 0?
+ span.style.position = math.style.position = "";
+ //
+ return {Y:-EVENT.getBBox(span).h, mW:mW, mH:mH, zW:zW, zH:zH};
+ },
+
+ initPHTML: function (math,span) {},
+
+ Remove: function (jax) {
+ var span = document.getElementById(jax.inputID+"-Frame");
+ if (span) {
+ if (jax.PHTML.display) {span = span.parentNode}
+ span.parentNode.removeChild(span);
+ }
+ delete jax.PHTML;
+ },
+
+ ID: 0, idPostfix: "",
+ GetID: function () {this.ID++; return this.ID},
+
+ VARIANT: {
+ "bold": "MJXp-bold",
+ "italic": "MJXp-italic",
+ "bold-italic": "MJXp-bold MJXp-italic",
+ "script": "MJXp-scr",
+ "bold-script": "MJXp-scr MJXp-bold",
+ "fraktur": "MJXp-frak",
+ "bold-fraktur": "MJXp-frak MJXp-bold",
+ "monospace": "MJXp-mono",
+ "sans-serif": "MJXp-sf",
+ "-tex-caligraphic": "MJXp-cal"
+ },
+ MATHSPACE: {
+ veryverythinmathspace: 1/18,
+ verythinmathspace: 2/18,
+ thinmathspace: 3/18,
+ mediummathspace: 4/18,
+ thickmathspace: 5/18,
+ verythickmathspace: 6/18,
+ veryverythickmathspace: 7/18,
+ negativeveryverythinmathspace: -1/18,
+ negativeverythinmathspace: -2/18,
+ negativethinmathspace: -3/18,
+ negativemediummathspace: -4/18,
+ negativethickmathspace: -5/18,
+ negativeverythickmathspace: -6/18,
+ negativeveryverythickmathspace: -7/18,
+
+ thin: .08,
+ medium: .1,
+ thick: .15,
+
+ infinity: BIGDIMEN
+ },
+ TeX: {
+ x_height: .430554
+ },
+ pxPerInch: 72,
+ em: 16,
+
+ // ### FIXME: add more here
+
+ DELIMITERS: {
+ "(": {dir:V},
+ "{": {dir:V, w:.58},
+ "[": {dir:V},
+ "|": {dir:V, w:.275},
+ ")": {dir:V},
+ "}": {dir:V, w:.58},
+ "]": {dir:V},
+ "/": {dir:V},
+ "\\": {dir:V},
+ "\u2223": {dir:V, w:.275},
+ "\u2225": {dir:V, w:.55},
+ "\u230A": {dir:V, w:.5},
+ "\u230B": {dir:V, w:.5},
+ "\u2308": {dir:V, w:.5},
+ "\u2309": {dir:V, w:.5},
+ "\u27E8": {dir:V, w:.5},
+ "\u27E9": {dir:V, w:.5},
+ "\u2191": {dir:V, w:.65},
+ "\u2193": {dir:V, w:.65},
+ "\u21D1": {dir:V, w:.75},
+ "\u21D3": {dir:V, w:.75},
+ "\u2195": {dir:V, w:.65},
+ "\u21D5": {dir:V, w:.75},
+ "\u27EE": {dir:V, w:.275},
+ "\u27EF": {dir:V, w:.275},
+ "\u23B0": {dir:V, w:.6},
+ "\u23B1": {dir:V, w:.6}
+ },
+
+ REMAPACCENT: {
+ "\u20D7":"\u2192", // vector arrow
+ "'": "\u02CB",
+ "`": "\u02CA",
+ ".": "\u02D9",
+ "^": "\u02C6",
+ "-": "\u02C9",
+ "~": "\u02DC",
+ "\u00AF": "\u02C9", // macron
+ "\u00B0": "\u02DA", // degree sign
+ "\u00B4": "\u02CA", // acute accent
+ "\u0300": "\u02CB", // combining grave
+ "\u0301": "\u02CA", // combining acute
+ "\u0302": "\u02C6", // combining circumflex
+ "\u0303": "\u02DC", // combinig tilde
+ "\u0304": "\u02C9", // combining macron
+ "\u0305": "\u02C9", // combining overline
+ "\u0306": "\u02D8", // combining breve
+ "\u0307": "\u02D9", // combining dot
+ "\u0308": "\u00A8", // combining double dot
+ "\u030C": "\u02C7" // combining caron
+ },
+ REMAPACCENTUNDER: {
+ },
+
+ length2em: function (length,size) {
+ if (typeof(length) !== "string") {length = length.toString()}
+ if (length === "") {return ""}
+ if (length === MML.SIZE.NORMAL) {return 1}
+ if (length === MML.SIZE.BIG) {return 2}
+ if (length === MML.SIZE.SMALL) {return .71}
+ if (this.MATHSPACE[length]) {return this.MATHSPACE[length]}
+ var match = length.match(/^\s*([-+]?(?:\.\d+|\d+(?:\.\d*)?))?(pt|em|ex|mu|px|pc|in|mm|cm|%)?/);
+ var m = parseFloat(match[1]||"1"), unit = match[2];
+ if (size == null) {size = 1}
+ if (unit === "em") {return m}
+ if (unit === "ex") {return m * this.TeX.x_height}
+ if (unit === "%") {return m / 100 * size}
+ if (unit === "px") {return m / this.em}
+ if (unit === "pt") {return m / 10} // 10 pt to an em
+ if (unit === "pc") {return m * 1.2} // 12 pt to a pc
+ if (unit === "in") {return m * this.pxPerInch / this.em}
+ if (unit === "cm") {return m * this.pxPerInch / this.em / 2.54} // 2.54 cm to an inch
+ if (unit === "mm") {return m * this.pxPerInch / this.em / 25.4} // 10 mm to a cm
+ if (unit === "mu") {return m / 18} // 18mu to an em for the scriptlevel
+ return m*size; // relative to given size (or 1em as default)
+ },
+
+ Em: function (m) {
+ if (Math.abs(m) < .001) return "0em";
+ return (m.toFixed(3).replace(/\.?0+$/,""))+"em";
+ },
+
+ arrayEntry: function (a,i) {return a[Math.max(0,Math.min(i,a.length-1))]}
+
+ });
+
+ MathJax.Hub.Register.StartupHook("mml Jax Ready",function () {
+ MML = MathJax.ElementJax.mml;
+
+ MML.mbase.Augment({
+ toPreviewHTML: function (span,options) {
+ return this.PHTMLdefaultSpan(span,options);
+ },
+
+ PHTMLdefaultSpan: function (span,options) {
+ if (!options) options = {};
+ span = this.PHTMLcreateSpan(span);
+ this.PHTMLhandleStyle(span);
+ this.PHTMLhandleColor(span);
+ if (this.isToken) this.PHTMLhandleToken(span);
+ for (var i = 0, m = this.data.length; i < m; i++) this.PHTMLaddChild(span,i,options);
+ return span;
+ },
+ PHTMLaddChild: function (span,i,options) {
+ var child = this.data[i];
+ if (child) {
+ if (options.childSpans)
+ span = HTML.addElement(span,"span",{className:options.className});
+ child.toPreviewHTML(span);
+ if (!options.noBBox) {
+ this.PHTML.w += child.PHTML.w + child.PHTML.l + child.PHTML.r;
+ if (child.PHTML.h > this.PHTML.h) this.PHTML.h = child.PHTML.h;
+ if (child.PHTML.d > this.PHTML.d) this.PHTML.d = child.PHTML.d;
+ if (child.PHTML.t > this.PHTML.t) this.PHTML.t = child.PHTML.t;
+ if (child.PHTML.b > this.PHTML.b) this.PHTML.b = child.PHTML.b;
+ }
+ } else if (options.forceChild) {HTML.addElement(span,"span")}
+ },
+ PHTMLstretchChild: function (i,H,D) {
+ var data = this.data[i];
+ if (data && data.PHTMLcanStretch("Vertical",H,D)) {
+ var bbox = this.PHTML, dbox = data.PHTML, w = dbox.w;
+ data.PHTMLstretchV(H,D);
+ bbox.w += dbox.w - w;
+ if (dbox.h > bbox.h) bbox.h = dbox.h;
+ if (dbox.d > bbox.d) bbox.d = dbox.d;
+ }
+ },
+
+ PHTMLcreateSpan: function (span) {
+ if (!this.PHTML) this.PHTML = {};
+ this.PHTML = {w:0, h:0, d:0, l:0, r:0, t:0, b:0};
+ if (this.inferred) return span;
+ // ### FIXME: This is a hack to handle the different spacing of the
+ // ### integral sign in Times compared to CM fonts
+ if (this.type === "mo" && this.data.join("") === "\u222B") {PHTML.lastIsInt = true}
+ else if (this.type !== "mspace" || this.width !== "negativethinmathspace") {PHTML.lastIsInt = false}
+ // ###
+ if (!this.PHTMLspanID) {this.PHTMLspanID = PHTML.GetID()};
+ var id = (this.id || "MJXp-Span-"+this.PHTMLspanID);
+ return HTML.addElement(span,"span",{className:"MJXp-"+this.type, id:id});
+ },
+ PHTMLspanElement: function () {
+ if (!this.PHTMLspanID) {return null}
+ return document.getElementById(this.id||"MJXp-Span-"+this.PHTMLspanID);
+ },
+
+ PHTMLhandleToken: function (span) {
+ var values = this.getValues("mathvariant");
+ if (values.mathvariant !== MML.VARIANT.NORMAL) {
+ span.className += " "+PHTML.VARIANT[values.mathvariant];
+ }
+ },
+
+ PHTMLhandleStyle: function (span) {
+ if (this.style) span.style.cssText = this.style;
+ },
+
+ PHTMLhandleColor: function (span) {
+ if (this.mathcolor) {span.style.color = this.mathcolor}
+ if (this.mathbackground) {span.style.backgroundColor = this.mathbackground}
+ },
+
+ PHTMLhandleScriptlevel: function (span) {
+ // ### FIXME: Need to prevent getting too small
+ // ### and should keep track of scaling so it can be compensated for
+ var level = this.Get("scriptlevel");
+ if (level) span.className += " MJXp-script";
+ },
+
+ PHTMLhandleText: function (span,text) {
+ var c, n;
+ var H = 0, D = 0, W = 0;
+ for (var i = 0, m = text.length; i < m; i++) {
+ n = text.charCodeAt(i); c = text.charAt(i);
+ if (n >= 0xD800 && n < 0xDBFF) {
+ i++; n = (((n-0xD800)<<10)+(text.charCodeAt(i)-0xDC00))+0x10000;
+ }
+ var h = .7, d = .22, w = .5;
+ if (n < 127) {
+ if (c.match(/[A-Za-ehik-or-xz0-9]/)) d = 0;
+ if (c.match(/[A-HK-Z]/)) {w = .67} else if (c.match(/[IJ]/)) {w = .36}
+ if (c.match(/[acegm-su-z]/)) {h = .45} else if (c.match(/[ij]/)) {h = .75}
+ if (c.match(/[ijlt]/)) w = .28;
+ }
+ if (PHTML.DELIMITERS[c]) {w = PHTML.DELIMITERS[c].w || .4}
+ // ### FIXME: handle Greek
+ // ### Combining diacriticals (all sets), spacing modifiers
+ // ### arrows (all sets), widths of braces
+ if (h > H) H = h; if (d > D) D = d; W += w;
+ }
+ if (!this.CHML) this.PHTML = {};
+ this.PHTML = {h:.9, d:.3, w:W, l:0, r:0, t:H, b:D};
+ HTML.addText(span,text);
+ },
+
+ PHTMLbboxFor: function (n) {
+ if (this.data[n] && this.data[n].PHTML) return this.data[n].PHTML;
+ return {w:0, h:0, d:0, l:0, r:0, t:0, b:0};
+ },
+
+ PHTMLcanStretch: function (direction,H,D) {
+ if (this.isEmbellished()) {
+ var core = this.Core();
+ if (core && core !== this) {return core.PHTMLcanStretch(direction,H,D)}
+ }
+ return false;
+ },
+ PHTMLstretchV: function (h,d) {},
+ PHTMLstretchH: function (w) {},
+
+ CoreParent: function () {
+ var parent = this;
+ while (parent && parent.isEmbellished() &&
+ parent.CoreMO() === this && !parent.isa(MML.math)) {parent = parent.Parent()}
+ return parent;
+ },
+ CoreText: function (parent) {
+ if (!parent) {return ""}
+ if (parent.isEmbellished()) {return parent.CoreMO().data.join("")}
+ while ((parent.isa(MML.mrow) || parent.isa(MML.TeXAtom) ||
+ parent.isa(MML.mstyle) || parent.isa(MML.mphantom)) &&
+ parent.data.length === 1 && parent.data[0]) {parent = parent.data[0]}
+ if (!parent.isToken) {return ""} else {return parent.data.join("")}
+ }
+
+ });
+
+ MML.chars.Augment({
+ toPreviewHTML: function (span) {
+ var text = this.toString().replace(/[\u2061-\u2064]/g,"");
+ this.PHTMLhandleText(span,text);
+ }
+ });
+ MML.entity.Augment({
+ toPreviewHTML: function (span) {
+ var text = this.toString().replace(/[\u2061-\u2064]/g,"");
+ this.PHTMLhandleText(span,text);
+ }
+ });
+
+ MML.math.Augment({
+ toPreviewHTML: function (span) {
+ span = this.PHTMLdefaultSpan(span);
+ if (this.Get("display") === "block") {span.className += " MJXp-display"}
+ return span;
+ }
+ });
+
+ MML.mo.Augment({
+ toPreviewHTML: function (span) {
+ span = this.PHTMLdefaultSpan(span);
+ this.PHTMLadjustAccent(span);
+ var values = this.getValues("lspace","rspace","scriptlevel","displaystyle","largeop");
+ if (values.scriptlevel === 0) {
+ this.PHTML.l = PHTML.length2em(values.lspace);
+ this.PHTML.r = PHTML.length2em(values.rspace);
+ span.style.marginLeft = PHTML.Em(this.PHTML.l);
+ span.style.marginRight = PHTML.Em(this.PHTML.r);
+ } else {
+ this.PHTML.l = .15;
+ this.PHTML.r = .1;
+ }
+ if (values.displaystyle && values.largeop) {
+ var box = HTML.Element("span",{className:"MJXp-largeop"});
+ box.appendChild(span.firstChild); span.appendChild(box);
+ this.PHTML.h *= 1.2; this.PHTML.d *= 1.2;
+ if (this.data.join("") === "\u222B") box.className += " MJXp-int";
+ }
+ // ### FIXME: Handle embellished op spacing
+ // ### FIXME: Remap minus signs
+ return span;
+ },
+ PHTMLadjustAccent: function (span) {
+ var parent = this.CoreParent();
+ if (parent && parent.isa(MML.munderover) &&
+ this.CoreText(parent.data[parent.base]).length === 1) {
+ var over = parent.data[parent.over], under = parent.data[parent.under];
+ var c = this.data.join(""), C;
+ if (over && this === over.CoreMO() && parent.Get("accent")) {C = PHTML.REMAPACCENT[c]}
+ else if (under && this === under.CoreMO() && parent.Get("accentunder")) {C = PHTML.REMAPACCENTUNDER[c]}
+ if (C) c = span.innerHTML = C;
+ if (c.match(/[\u02C6-\u02DC\u00A8]/)) {this.PHTML.acc = -.52}
+ else if (c === "\u2192") {this.PHTML.acc = -.15; this.PHTML.vec = true}
+ }
+ },
+ PHTMLcanStretch: function (direction,H,D) {
+ if (!this.Get("stretchy")) {return false}
+ var c = this.data.join("");
+ if (c.length > 1) {return false}
+ c = PHTML.DELIMITERS[c];
+ var stretch = (c && c.dir === direction.substr(0,1));
+ if (stretch) {
+ stretch = (this.PHTML.h !== H || this.PHTML.d !== D ||
+ (this.Get("minsize",true) || this.Get("maxsize",true)));
+ }
+ return stretch;
+ },
+ PHTMLstretchV: function (h,d) {
+ var span = this.PHTMLspanElement(), bbox = this.PHTML; //bbox.w = .4; // ## adjust width
+ var values = this.getValues("symmetric","maxsize","minsize");
+ if (values.symmetric) {H = 2*Math.max(h-.25,d+.25)} else {H = h + d}
+ values.maxsize = PHTML.length2em(values.maxsize,bbox.h+bbox.d);
+ values.minsize = PHTML.length2em(values.minsize,bbox.h+bbox.d);
+ H = Math.max(values.minsize,Math.min(values.maxsize,H));
+ var scale = H/(bbox.h+bbox.d-.3); // ### adjusted for extra tall bbox
+ var box = HTML.Element("span",{style:{"font-size":PHTML.Em(scale)}});
+ if (scale > 1.25) {
+ var sX = Math.ceil(1.25/scale * 10);
+ box.className = "MJXp-right MJXp-scale"+sX;
+ box.style.marginLeft = PHTML.Em(bbox.w*(sX/10-1)+.07);
+ bbox.w *= scale*sX/10;
+ }
+ box.appendChild(span.firstChild); span.appendChild(box);
+ if (values.symmetric) span.style.verticalAlign = PHTML.Em(.25*(1-scale));
+ }
+ });
+
+ MML.mspace.Augment({
+ toPreviewHTML: function (span) {
+ span = this.PHTMLdefaultSpan(span);
+ var values = this.getValues("height","depth","width");
+ var w = PHTML.length2em(values.width),
+ h = PHTML.length2em(values.height),
+ d = PHTML.length2em(values.depth);
+ var bbox = this.PHTML;
+ bbox.w = w; bbox.h = h; bbox.d = d;
+ if (w < 0) {
+ // ### FIXME: lastIsInt hack
+ if (!PHTML.lastIsInt) span.style.marginLeft = PHTML.Em(w);
+ w = 0;
+ }
+ span.style.width = PHTML.Em(w);
+ span.style.height = PHTML.Em(h+d);
+ if (d) span.style.verticalAlign = PHTML.Em(-d);
+ return span;
+ }
+ });
+
+ MML.mpadded.Augment({
+ toPreviewHTML: function (span) {
+ span = this.PHTMLdefaultSpan(span,{
+ childSpans:true, className:"MJXp-box", forceChild:true
+ });
+ var child = span.firstChild;
+ var values = this.getValues("width","height","depth","lspace","voffset");
+ var dimen = this.PHTMLdimen(values.lspace);
+ var T = 0, B = 0, L = dimen.len, R = -dimen.len, V = 0;
+ if (values.width !== "") {
+ dimen = this.PHTMLdimen(values.width,"w",0);
+ if (dimen.pm) {R += dimen.len} else {span.style.width = PHTML.Em(dimen.len)}
+ }
+ if (values.height !== "") {
+ dimen = this.PHTMLdimen(values.height,"h",0);
+ if (!dimen.pm) T += -this.PHTMLbboxFor(0).h;
+ T += dimen.len;
+ }
+ if (values.depth !== "") {
+ dimen = this.PHTMLdimen(values.depth,"d",0);
+ if (!dimen.pm) {B += -this.PHTMLbboxFor(0).d; V += -dimen.len}
+ B += dimen.len;
+ }
+ if (values.voffset !== "") {
+ dimen = this.PHTMLdimen(values.voffset);
+ T -= dimen.len; B += dimen.len;
+ V += dimen.len;
+ }
+ if (T) child.style.marginTop = PHTML.Em(T);
+ if (B) child.style.marginBottom = PHTML.Em(B);
+ if (L) child.style.marginLeft = PHTML.Em(L);
+ if (R) child.style.marginRight = PHTML.Em(R);
+ if (V) span.style.verticalAlign = PHTML.Em(V);
+ return span;
+ },
+ PHTMLdimen: function (length,d,m) {
+ if (m == null) {m = -BIGDIMEN}
+ length = String(length);
+ var match = length.match(/width|height|depth/);
+ var size = (match ? this.PHTML[match[0].charAt(0)] : (d ? this.PHTML[d] : 0));
+ return {len: PHTML.length2em(length,size)||0, pm: !!length.match(/^[-+]/)};
+ }
+ });
+
+ MML.munderover.Augment({
+ toPreviewHTML: function (span) {
+ var values = this.getValues("displaystyle","accent","accentunder","align");
+ var base = this.data[this.base];
+ if (!values.displaystyle && base != null &&
+ (base.movablelimits || base.CoreMO().Get("movablelimits"))) {
+ span = MML.msubsup.prototype.toPreviewHTML.call(this,span);
+ //
+ // Change class to msubsup for CSS rules.
+ // ### FIXME: should this be handled via adding another class instead?
+ //
+ span.className = span.className.replace(/munderover/,"msubsup");
+ return span;
+ }
+ span = this.PHTMLdefaultSpan(span,{childSpans:true, className:"", noBBox:true});
+ var obox = this.PHTMLbboxFor(this.over),
+ ubox = this.PHTMLbboxFor(this.under),
+ bbox = this.PHTMLbboxFor(this.base),
+ BBOX = this.PHTML, acc = obox.acc;
+ if (this.data[this.over]) {
+ if (span.lastChild.firstChild){
+ span.lastChild.firstChild.style.marginLeft = obox.l =
+ span.lastChild.firstChild.style.marginRight = obox.r = 0;
+ }
+ var over = HTML.Element("span",{},[["span",{className:"MJXp-over"}]]);
+ over.firstChild.appendChild(span.lastChild);
+ if (span.childNodes.length > (this.data[this.under] ? 1 : 0))
+ over.firstChild.appendChild(span.firstChild);
+ this.data[this.over].PHTMLhandleScriptlevel(over.firstChild.firstChild);
+ if (acc != null) {
+ if (obox.vec) {
+ over.firstChild.firstChild.firstChild.style.fontSize = "60%";
+ obox.h *= .6; obox.d *= .6; obox.w *= .6;
+ }
+ acc = acc - obox.d + .1; if (bbox.t != null) {acc += bbox.t - bbox.h}
+ over.firstChild.firstChild.style.marginBottom = PHTML.Em(acc);
+ }
+ if (span.firstChild) {span.insertBefore(over,span.firstChild)}
+ else {span.appendChild(over)}
+ }
+ if (this.data[this.under]) {
+ if (span.lastChild.firstChild) {
+ span.lastChild.firstChild.style.marginLeft = ubox.l =
+ span.lastChild.firstChild.marginRight = ubox.r = 0;
+ }
+ this.data[this.under].PHTMLhandleScriptlevel(span.lastChild);
+ }
+ BBOX.w = Math.max(.8*obox.w,.8*ubox.w,bbox.w);
+ BBOX.h = .8*(obox.h+obox.d+(acc||0)) + bbox.h;
+ BBOX.d = bbox.d + .8*(ubox.h+ubox.d);
+ return span;
+ }
+ });
+
+ MML.msubsup.Augment({
+ toPreviewHTML: function (span) {
+ span = this.PHTMLdefaultSpan(span,{noBBox:true});
+ if (!this.data[this.base]) {
+ if (span.firstChild) {span.insertBefore(HTML.Element("span"),span.firstChild)}
+ else {span.appendChild(HTML.Element("span"))}
+ }
+ var base = this.data[this.base], sub = this.data[this.sub], sup = this.data[this.sup];
+ if (!base) base = {bbox: {h:.8, d:.2}};
+ span.firstChild.style.marginRight = ".05em";
+ var h = Math.max(.4,base.PHTML.h-.4),
+ d = Math.max(.2,base.PHTML.d+.1);
+ var bbox = this.PHTML;
+ if (sup && sub) {
+ var box = HTML.Element("span",{className:"MJXp-script-box", style:{
+ height: PHTML.Em(h+sup.PHTML.h*.8 + d+sub.PHTML.d*.8),
+ "vertical-align": PHTML.Em(-d-sub.PHTML.d*.8)
+ }},[
+ ["span",{},[["span",{},[["span",{
+ style:{"margin-bottom":PHTML.Em(-(sup.PHTML.d-.05))}
+ }]]]]],
+ ["span",{},[["span",{},[["span",{
+ style:{"margin-top":PHTML.Em(-(sup.PHTML.h-.05))}
+ }]]]]]
+ ]);
+ sub.PHTMLhandleScriptlevel(box.firstChild);
+ sup.PHTMLhandleScriptlevel(box.lastChild);
+ box.firstChild.firstChild.firstChild.appendChild(span.lastChild);
+ box.lastChild.firstChild.firstChild.appendChild(span.lastChild);
+ span.appendChild(box);
+ bbox.h = Math.max(base.PHTML.h,sup.PHTML.h*.8+h);
+ bbox.d = Math.max(base.PHTML.d,sub.PHTML.d*.8+d);
+ bbox.w = base.PHTML.w + Math.max(sup.PHTML.w,sub.PHTML.w) + .07;
+ } else if (sup) {
+ span.lastChild.style.verticalAlign = PHTML.Em(h);
+ sup.PHTMLhandleScriptlevel(span.lastChild);
+ bbox.h = Math.max(base.PHTML.h,sup.PHTML.h*.8+h);
+ bbox.d = Math.max(base.PHTML.d,sup.PHTML.d*.8-h);
+ bbox.w = base.PHTML.w + sup.PHTML.w + .07;
+ } else if (sub) {
+ span.lastChild.style.verticalAlign = PHTML.Em(-d);
+ sub.PHTMLhandleScriptlevel(span.lastChild);
+ bbox.h = Math.max(base.PHTML.h,sub.PHTML.h*.8-d);
+ bbox.d = Math.max(base.PHTML.d,sub.PHTML.d*.8+d);
+ bbox.w = base.PHTML.w + sub.PHTML.w + .07;
+ }
+ return span;
+ }
+ });
+
+ MML.mfrac.Augment({
+ toPreviewHTML: function (span) {
+ span = this.PHTMLdefaultSpan(span,{
+ childSpans:true, className:"MJXp-box", forceChild:true, noBBox:true
+ });
+ var values = this.getValues("linethickness","displaystyle");
+ if (!values.displaystyle) {
+ if (this.data[0]) this.data[0].PHTMLhandleScriptlevel(span.firstChild);
+ if (this.data[1]) this.data[1].PHTMLhandleScriptlevel(span.lastChild);
+ }
+ var denom = HTML.Element("span",{className:"MJXp-box"},[
+ ["span",{className:"MJXp-denom"},[ // inline-table
+ ["span",{},[["span",{className:"MJXp-rule",style:{height:"1em"}}]]],
+ ["span"] // spans are table-row
+ ]]
+ ]);
+ denom.firstChild.lastChild.appendChild(span.lastChild);
+ span.appendChild(denom);
+ var nbox = this.PHTMLbboxFor(0), dbox = this.PHTMLbboxFor(1), bbox = this.PHTML;
+ bbox.w = Math.max(nbox.w,dbox.w) * .8;
+ bbox.h = nbox.h+nbox.d + .1 + .25;
+ bbox.d = dbox.h+dbox.d - .25;
+ bbox.l = bbox.r = .125;
+ values.linethickness = Math.max(0,PHTML.length2em(values.linethickness||"0",0));
+ if (values.linethickness) {
+ var rule = denom.firstChild.firstChild.firstChild;
+ var t = PHTML.Em(values.linethickness);
+ rule.style.borderTop = "none";
+ rule.style.borderBottom = (values.linethickness < .15 ? "1px" : t)+" solid";
+ rule.style.margin = t+" 0";
+ t = values.linethickness;
+ denom.style.marginTop = PHTML.Em(3*t-1.2);
+ span.style.verticalAlign = PHTML.Em(1.5*t + .1);
+ bbox.h += 1.5*t - .1; bbox.d += 1.5*t;
+ } else {
+ denom.style.marginTop = "-.7em";
+ }
+ return span;
+ }
+ });
+
+ MML.msqrt.Augment({
+ toPreviewHTML: function (span) {
+ span = this.PHTMLdefaultSpan(span,{
+ childSpans:true, className:"MJXp-box", forceChild:true, noBBox:true
+ });
+ this.PHTMLlayoutRoot(span,span.firstChild);
+ return span;
+ },
+ PHTMLlayoutRoot: function (span,base) {
+ var bbox = this.PHTMLbboxFor(0);
+ var scale = Math.ceil((bbox.h+bbox.d+.14)*100), t = PHTML.Em(14/scale);
+ var surd = HTML.Element("span",{className:"MJXp-surd"},[
+ ["span",{style:{"font-size":scale+"%","margin-top":t}},["\u221A"]]
+ ]);
+ var root = HTML.Element("span",{className:"MJXp-root"},[
+ ["span",{className:"MJXp-rule",style:{"border-top":".08em solid"}}]
+ ]);
+ var W = (1.2/2.2)*scale/100; // width-of-surd = (height/H-to-W-ratio)
+ if (scale > 150) {
+ var sX = Math.ceil(150/scale * 10);
+ surd.firstChild.className = "MJXp-right MJXp-scale"+sX;
+ surd.firstChild.style.marginLeft = PHTML.Em(W*(sX/10-1)/scale*100);
+ W = W*sX/10;
+ root.firstChild.style.borderTopWidth = PHTML.Em(.08/Math.sqrt(sX/10));
+ }
+ root.appendChild(base);
+ span.appendChild(surd);
+ span.appendChild(root);
+ this.PHTML.h = bbox.h + .18; this.PHTML.d = bbox.d;
+ this.PHTML.w = bbox.w + W;
+ return span;
+ }
+ });
+
+ MML.mroot.Augment({
+ toPreviewHTML: function (span) {
+ span = this.PHTMLdefaultSpan(span,{
+ childSpans:true, className:"MJXp-box", forceChild:true, noBBox:true
+ });
+ var rbox = this.PHTMLbboxFor(1), root = span.removeChild(span.lastChild);
+ var sqrt = this.PHTMLlayoutRoot(HTML.Element("span"),span.firstChild);
+ root.className = "MJXp-script"; // ### FIXME: should be scriptscript
+ var scale = parseInt(sqrt.firstChild.firstChild.style.fontSize);
+ var v = .55*(scale/120) + rbox.d*.8, r = -.6*(scale/120);
+ if (scale > 150) {r *= .95*Math.ceil(150/scale*10)/10}
+ root.style.marginRight = PHTML.Em(r); root.style.verticalAlign = PHTML.Em(v);
+ if (-r > rbox.w*.8) root.style.marginLeft = PHTML.Em(-r-rbox.w*.8); // ### depends on rbox.w
+ span.appendChild(root); span.appendChild(sqrt);
+ this.PHTML.w += Math.max(0,rbox.w*.8+r);
+ this.PHTML.h = Math.max(this.PHTML.h,rbox.h*.8+v);
+ return span;
+ },
+ PHTMLlayoutRoot: MML.msqrt.prototype.PHTMLlayoutRoot
+ });
+
+ MML.mfenced.Augment({
+ toPreviewHTML: function (span) {
+ span = this.PHTMLcreateSpan(span);
+ this.PHTMLhandleStyle(span);
+ this.PHTMLhandleColor(span);
+ //
+ // Make row of open, data, sep, ... data, close
+ //
+ this.addFakeNodes();
+ this.PHTMLaddChild(span,"open",{});
+ for (var i = 0, m = this.data.length; i < m; i++) {
+ this.PHTMLaddChild(span,"sep"+i,{});
+ this.PHTMLaddChild(span,i,{});
+ }
+ this.PHTMLaddChild(span,"close",{});
+ //
+ // Check for streching the elements
+ //
+ var H = this.PHTML.h, D = this.PHTML.d;
+ this.PHTMLstretchChild("open",H,D);
+ for (i = 0, m = this.data.length; i < m; i++) {
+ this.PHTMLstretchChild("sep"+i,H,D);
+ this.PHTMLstretchChild(i,H,D);
+ }
+ this.PHTMLstretchChild("close",H,D);
+ return span;
+ }
+ });
+
+ MML.mrow.Augment({
+ toPreviewHTML: function (span) {
+ span = this.PHTMLdefaultSpan(span);
+ var H = this.PHTML.h, D = this.PHTML.d;
+ for (var i = 0, m = this.data.length; i < m; i++) this.PHTMLstretchChild(i,H,D);
+ return span;
+ }
+ });
+
+ MML.mstyle.Augment({
+ toPreviewHTML: function (span) {
+ span = this.PHTMLdefaultSpan(span);
+ this.PHTMLhandleScriptlevel(span);
+ return span;
+ }
+ });
+
+ MML.TeXAtom.Augment({
+ toPreviewHTML: function (span) {
+ span = this.PHTMLdefaultSpan(span);
+ // ### FIXME: handle TeX class?
+ span.className = "MJXp-mrow";
+ return span;
+ }
+ });
+
+ MML.mtable.Augment({
+ toPreviewHTML: function (span) {
+ span = this.PHTMLdefaultSpan(span,{noBBox:true});
+ var values = this.getValues("columnalign","rowalign","columnspacing","rowspacing",
+ "columnwidth","equalcolumns","equalrows",
+ "columnlines","rowlines","frame","framespacing",
+ "align","width");
+ var SPLIT = MathJax.Hub.SplitList, i, m, j, n;
+ var CSPACE = SPLIT(values.columnspacing),
+ RSPACE = SPLIT(values.rowspacing),
+ CALIGN = SPLIT(values.columnalign),
+ RALIGN = SPLIT(values.rowalign);
+ for (i = 0, m = CSPACE.length; i < m; i++) {CSPACE[i] = PHTML.length2em(CSPACE[i])}
+ for (i = 0, m = RSPACE.length; i < m; i++) {RSPACE[i] = PHTML.length2em(RSPACE[i])}
+
+ var table = HTML.Element("span");
+ while (span.firstChild) table.appendChild(span.firstChild);
+ span.appendChild(table);
+ var H = 0, W = 0;
+ for (i = 0, m = this.data.length; i < m; i++) {
+ var row = this.data[i];
+ if (row) {
+ var rspace = PHTML.arrayEntry(RSPACE,i-1), ralign = PHTML.arrayEntry(RALIGN,i);
+ var rbox = row.PHTML, rspan = row.PHTMLspanElement();
+ rspan.style.verticalAlign = ralign;
+ var k = (row.type === "mlabeledtr" ? 1 : 0);
+ for (j = 0, n = row.data.length; j < n-k; j++) {
+ var cell = row.data[j+k];
+ if (cell) {
+ var cspace = PHTML.arrayEntry(CSPACE,j-1), calign = PHTML.arrayEntry(CALIGN,j);
+ var cspan = cell.PHTMLspanElement();
+ if (j) {rbox.w += cspace; cspan.style.paddingLeft = PHTML.Em(cspace)}
+ if (i) cspan.style.paddingTop = PHTML.Em(rspace);
+ cspan.style.textAlign = calign;
+ }
+ }
+ H += rbox.h + rbox.d; if (i) {H += rspace}
+ if (rbox.w > W) W = rbox.w;
+ }
+ }
+ var bbox = this.PHTML;
+ bbox.w = W; bbox.h = H/2 + .25; bbox.d = H/2 - .25;
+ bbox.l = bbox.r = .125;
+ return span;
+ }
+ });
+ MML.mlabeledtr.Augment({
+ PHTMLdefaultSpan: function (span,options) {
+ if (!options) options = {};
+ span = this.PHTMLcreateSpan(span);
+ this.PHTMLhandleStyle(span);
+ this.PHTMLhandleColor(span);
+ if (this.isToken) this.PHTMLhandleToken(span);
+ // skip label for now
+ for (var i = 1, m = this.data.length; i < m; i++) this.PHTMLaddChild(span,i,options);
+ return span;
+ }
+ });
+
+ MML.semantics.Augment({
+ toPreviewHTML: function (span) {
+ span = this.PHTMLcreateSpan(span);
+ if (this.data[0]) {
+ this.data[0].toPreviewHTML(span);
+ MathJax.Hub.Insert(this.data[0].PHTML||{},this.PHTML);
+ }
+ return span;
+ }
+ });
+ MML.annotation.Augment({toPreviewHTML: function(span) {}});
+ MML["annotation-xml"].Augment({toPreviewHTML: function(span) {}});
+
+ //
+ // Loading isn't complete until the element jax is modified,
+ // but can't call loadComplete within the callback for "mml Jax Ready"
+ // (it would call PreviewHTML's Require routine, asking for the mml jax again)
+ // so wait until after the mml jax has finished processing.
+ //
+ // We also need to wait for the onload handler to run, since the loadComplete
+ // will call Config and Startup, which need to modify the body.
+ //
+ MathJax.Hub.Register.StartupHook("onLoad",function () {
+ setTimeout(MathJax.Callback(["loadComplete",PHTML,"jax.js"]),0);
+ });
+ });
+
+ MathJax.Hub.Register.StartupHook("End Cookie", function () {
+ if (HUB.config.menuSettings.zoom !== "None")
+ {AJAX.Require("[MathJax]/extensions/MathZoom.js")}
+ });
+
+})(MathJax.Ajax,MathJax.Hub,MathJax.HTML,MathJax.OutputJax.PreviewHTML);
+// @license-end