From cfeaa8668f06d243795c2a2de99da99ecf38ec84 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Tue, 7 Jun 2016 10:23:01 -0400 Subject: [PATCH 01/29] Mark delimters are symmetric when used with \left and \right. Resolves issue #1084. --- unpacked/jax/input/TeX/jax.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unpacked/jax/input/TeX/jax.js b/unpacked/jax/input/TeX/jax.js index 8463c8be3..90bcec558 100644 --- a/unpacked/jax/input/TeX/jax.js +++ b/unpacked/jax/input/TeX/jax.js @@ -2210,9 +2210,9 @@ */ fenced: function (open,mml,close) { var mrow = MML.mrow().With({open:open, close:close, texClass:MML.TEXCLASS.INNER}); - mrow.Append(MML.mo(open).With({fence:true, stretchy:true, texClass:MML.TEXCLASS.OPEN})); + mrow.Append(MML.mo(open).With({fence:true, stretchy:true, symmetric:true, texClass:MML.TEXCLASS.OPEN})); if (mml.type === "mrow") {mrow.Append.apply(mrow,mml.data)} else {mrow.Append(mml)} - mrow.Append(MML.mo(close).With({fence:true, stretchy:true, texClass:MML.TEXCLASS.CLOSE})); + mrow.Append(MML.mo(close).With({fence:true, stretchy:true, symmetric:true, texClass:MML.TEXCLASS.CLOSE})); return mrow; }, /* From 5b6aa4f82add3313248d80710a7405d085489196 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Tue, 7 Jun 2016 10:45:59 -0400 Subject: [PATCH 02/29] Prevent CSS bleedthrough for box-sizing (set by Bootstrap CSS). Resolves issue #1393. --- unpacked/jax/output/CommonHTML/jax.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/unpacked/jax/output/CommonHTML/jax.js b/unpacked/jax/output/CommonHTML/jax.js index beb7380a8..4fead6f15 100644 --- a/unpacked/jax/output/CommonHTML/jax.js +++ b/unpacked/jax/output/CommonHTML/jax.js @@ -77,7 +77,13 @@ "border-collapse": "separate", "border-spacing": 0, }, - ".mjx-math *": {display:"inline-block", "text-align":"left"}, + ".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"}, From a6b7700c18ab064297c0c52f5d0eab03c4be4a9a Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Tue, 7 Jun 2016 11:25:26 -0400 Subject: [PATCH 03/29] Don't convert attribute to boolean unless the default is a boolean. Resolves issue #1356. --- unpacked/jax/input/MathML/jax.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/unpacked/jax/input/MathML/jax.js b/unpacked/jax/input/MathML/jax.js index 58772053b..89f6c071b 100644 --- a/unpacked/jax/input/MathML/jax.js +++ b/unpacked/jax/input/MathML/jax.js @@ -142,8 +142,14 @@ value = this.filterAttribute(name,value); var defaults = (mml.type === "mstyle" ? MML.math.prototype.defaults : mml.defaults); if (value != null) { - if (value.toLowerCase() === "true") {value = true} - else if (value.toLowerCase() === "false") {value = false} + var val = value.toLowerCase(); + if (val === "true" || val === "false") { + if (typeof (defaults[name]) === "boolean" || defaults[name] === MML.INHERIT || + (defaults[name] === MML.AUTO && + (mml.defaultDef == null || typeof(mml.defaultDef[name]) === "boolean"))) { + value = (val === "true"); + } + } if (defaults[name] != null || MML.copyAttributes[name]) {mml[name] = value} else {mml.attr[name] = value} mml.attrNames.push(name); From ae4f60f2dff606611ca6a2491cd4ceead043139a Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Tue, 7 Jun 2016 12:43:09 -0400 Subject: [PATCH 04/29] Make CHTML mglyph scale image size by hand rather than using offsetWidth and offsetHeight, since those cause reflow. This also makes it work in mathjax-node. Resolves mathjax/Mathjax-node#241. --- .../jax/output/CommonHTML/autoload/mglyph.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/unpacked/jax/output/CommonHTML/autoload/mglyph.js b/unpacked/jax/output/CommonHTML/autoload/mglyph.js index 538616b30..f273ccb59 100644 --- a/unpacked/jax/output/CommonHTML/autoload/mglyph.js +++ b/unpacked/jax/output/CommonHTML/autoload/mglyph.js @@ -60,15 +60,15 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () { var img = CHTML.addElement(node,"img",{ isMathJax:true, src:values.src, alt:values.alt, title:values.alt }); - var w = bbox.img.img.width/CHTML.em, h = bbox.img.img.height/CHTML.em; - if (values.width !== "") img.style.width = CHTML.Em(this.CHTMLlength2em(values.width,w)); - if (values.height !== "") img.style.height = CHTML.Em(this.CHTMLlength2em(values.height,h)); - // - // Warning: causes page reflows - // - bbox.w = bbox.r = img.offsetWidth/CHTML.em; bbox.h = bbox.t = img.offsetHeight/CHTML.em; + 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,h); + bbox.d = bbox.b = -this.CHTMLlength2em(values.valign,HH); img.style.verticalAlign = CHTML.Em(-bbox.d); bbox.h -= bbox.d; bbox.t = bbox.h; } From f067eccd301c49e47094f245903155287670862b Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Tue, 7 Jun 2016 16:01:23 -0400 Subject: [PATCH 05/29] Don't unwrap mrow when created fenced elements (in case attributes have been attached to the mrow). Resolves issue #1415. --- unpacked/jax/input/TeX/jax.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/unpacked/jax/input/TeX/jax.js b/unpacked/jax/input/TeX/jax.js index 8463c8be3..26c46275e 100644 --- a/unpacked/jax/input/TeX/jax.js +++ b/unpacked/jax/input/TeX/jax.js @@ -2210,9 +2210,11 @@ */ fenced: function (open,mml,close) { var mrow = MML.mrow().With({open:open, close:close, texClass:MML.TEXCLASS.INNER}); - mrow.Append(MML.mo(open).With({fence:true, stretchy:true, texClass:MML.TEXCLASS.OPEN})); - if (mml.type === "mrow") {mrow.Append.apply(mrow,mml.data)} else {mrow.Append(mml)} - mrow.Append(MML.mo(close).With({fence:true, stretchy:true, texClass:MML.TEXCLASS.CLOSE})); + mrow.Append( + MML.mo(open).With({fence:true, stretchy:true, texClass:MML.TEXCLASS.OPEN}), + mml, + MML.mo(close).With({fence:true, stretchy:true, texClass:MML.TEXCLASS.CLOSE}) + ); return mrow; }, /* From fcda005c56e966c94fbc415c29bada05419103b3 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Tue, 14 Jun 2016 14:22:51 -0400 Subject: [PATCH 06/29] Don't copy environment into array environments. Resolves issue #1468. --- unpacked/jax/input/TeX/jax.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/unpacked/jax/input/TeX/jax.js b/unpacked/jax/input/TeX/jax.js index eeec47541..b16dafc8e 100644 --- a/unpacked/jax/input/TeX/jax.js +++ b/unpacked/jax/input/TeX/jax.js @@ -53,8 +53,10 @@ else if (top) { this.data.push(item); if (item.env) { - for (var id in this.env) - {if (this.env.hasOwnProperty(id)) {item.env[id] = this.env[id]}} + if (item.copyEnv !== false) { + for (var id in this.env) + {if (this.env.hasOwnProperty(id)) {item.env[id] = this.env[id]}} + } this.env = item.env; } else {item.env = this.env} } @@ -258,7 +260,8 @@ STACKITEM.array = STACKITEM.Subclass({ type: "array", isOpen: true, arraydef: {}, Init: function () { - this.table = []; this.row = []; this.env = {}; this.frame = []; this.hfill = []; + this.table = []; this.row = []; this.frame = []; this.hfill = []; + this.copyEnv = false; this.SUPER(arguments).Init.apply(this,arguments); }, checkItem: function (item) { From dbc70acd58761ca1dc32944135789fc9199b17db Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Tue, 14 Jun 2016 14:59:49 -0400 Subject: [PATCH 07/29] Make copyEnv a shared constant. --- unpacked/jax/input/TeX/jax.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/unpacked/jax/input/TeX/jax.js b/unpacked/jax/input/TeX/jax.js index b16dafc8e..36e53592c 100644 --- a/unpacked/jax/input/TeX/jax.js +++ b/unpacked/jax/input/TeX/jax.js @@ -258,10 +258,9 @@ }); STACKITEM.array = STACKITEM.Subclass({ - type: "array", isOpen: true, arraydef: {}, + type: "array", isOpen: true, copyEnv: false, arraydef: {}, Init: function () { this.table = []; this.row = []; this.frame = []; this.hfill = []; - this.copyEnv = false; this.SUPER(arguments).Init.apply(this,arguments); }, checkItem: function (item) { From 1e999e389ed3c5e61ad404c8379ac87b56b5ae30 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Tue, 14 Jun 2016 15:32:53 -0400 Subject: [PATCH 08/29] Don't have preprocessors make a preview if there already is one. Resolves issue #1445. --- unpacked/extensions/asciimath2jax.js | 4 +++- unpacked/extensions/jsMath2jax.js | 5 ++++- unpacked/extensions/mml2jax.js | 6 ++++-- unpacked/extensions/tex2jax.js | 4 +++- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/unpacked/extensions/asciimath2jax.js b/unpacked/extensions/asciimath2jax.js index f6fae5206..2ca0ffbcc 100644 --- a/unpacked/extensions/asciimath2jax.js +++ b/unpacked/extensions/asciimath2jax.js @@ -207,11 +207,13 @@ MathJax.Extension.asciimath2jax = { }, createPreview: function (mode,asciimath) { + var previewClass = MathJax.Hub.config.preRemoveClass; var preview = this.config.preview; if (preview === "none") return; + if ((this.search.close.previousSibling||{}).className === previewClass) return; if (preview === "AsciiMath") {preview = [this.filterPreview(asciimath)]} if (preview) { - preview = MathJax.HTML.Element("span",{className:MathJax.Hub.config.preRemoveClass},preview); + preview = MathJax.HTML.Element("span",{className:previewClass},preview); this.insertNode(preview); } }, diff --git a/unpacked/extensions/jsMath2jax.js b/unpacked/extensions/jsMath2jax.js index 03b8ff3ee..188119711 100644 --- a/unpacked/extensions/jsMath2jax.js +++ b/unpacked/extensions/jsMath2jax.js @@ -73,10 +73,13 @@ MathJax.Extension.jsMath2jax = { }, createPreview: function (node) { + var previewClass = MathJax.Hub.config.preRemoveClass; var preview = this.config.preview; + if (preview === "none") return; + if ((node.previousSibling||{}).className === previewClass) return; if (preview === "TeX") {preview = [this.filterPreview(node.innerHTML)]} if (preview) { - preview = MathJax.HTML.Element("span",{className: MathJax.Hub.config.preRemoveClass},preview); + preview = MathJax.HTML.Element("span",{className:previewClass},preview); node.parentNode.insertBefore(preview,node); } }, diff --git a/unpacked/extensions/mml2jax.js b/unpacked/extensions/mml2jax.js index 6b3ce1531..995ba94c1 100644 --- a/unpacked/extensions/mml2jax.js +++ b/unpacked/extensions/mml2jax.js @@ -203,6 +203,8 @@ MathJax.Extension.mml2jax = { var preview = this.config.preview; if (preview === "none") return; var isNodePreview = false; + var previewClass = MathJax.Hub.config.preRemoveClass; + if ((script.previousSibling||{}).className === previewClass) return; if (preview === "mathml") { isNodePreview = true; // mathml preview does not work with IE < 9, so fallback to alttext. @@ -225,10 +227,10 @@ MathJax.Extension.mml2jax = { if (preview) { var span; if (isNodePreview) { - span = MathJax.HTML.Element("span",{className:MathJax.Hub.config.preRemoveClass}); + span = MathJax.HTML.Element("span",{className:previewClass}); span.appendChild(preview); } else { - span = MathJax.HTML.Element("span",{className:MathJax.Hub.config.preRemoveClass},preview); + span = MathJax.HTML.Element("span",{className:previewClass},preview); } script.parentNode.insertBefore(span,script); } diff --git a/unpacked/extensions/tex2jax.js b/unpacked/extensions/tex2jax.js index 26238818b..393dd96ca 100644 --- a/unpacked/extensions/tex2jax.js +++ b/unpacked/extensions/tex2jax.js @@ -277,11 +277,13 @@ MathJax.Extension.tex2jax = { }, createPreview: function (mode,tex) { + var previewClass = MathJax.Hub.config.preRemoveClass; var preview = this.config.preview; if (preview === "none") return; + if ((this.search.close.previousSibling||{}).className === previewClass) return; if (preview === "TeX") {preview = [this.filterPreview(tex)]} if (preview) { - preview = MathJax.HTML.Element("span",{className:MathJax.Hub.config.preRemoveClass},preview); + preview = MathJax.HTML.Element("span",{className:previewClass},preview); this.insertNode(preview); } }, From 05c5e7ad0114ec4bd18192e3bbc24bc9bd0bf090 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Tue, 14 Jun 2016 18:20:58 -0400 Subject: [PATCH 09/29] Allow MathJax root to be configured. Resolves issue #1403. --- unpacked/MathJax.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/unpacked/MathJax.js b/unpacked/MathJax.js index c5f456373..b09c58d68 100644 --- a/unpacked/MathJax.js +++ b/unpacked/MathJax.js @@ -2503,6 +2503,11 @@ MathJax.Hub.Startup = { Config: function () { this.queue.Push(["Post",this.signal,"Begin Config"]); // + // Make sure root is set before loading any files + // + if (MathJax.AuthorConfig && MathJax.AuthorConfig.root) + MathJax.Ajax.config.root = MathJax.AuthorConfig.root; + // // If a locale is given as a parameter, // set the locale and the default menu value for the locale // @@ -2552,15 +2557,15 @@ MathJax.Hub.Startup = { // ConfigBlocks: function () { var scripts = document.getElementsByTagName("script"); - var last = null, queue = MathJax.Callback.Queue(); + var queue = MathJax.Callback.Queue(); for (var i = 0, m = scripts.length; i < m; i++) { var type = String(scripts[i].type).replace(/ /g,""); if (type.match(/^text\/x-mathjax-config(;.*)?$/) && !type.match(/;executed=true/)) { scripts[i].type += ";executed=true"; - last = queue.Push(scripts[i].innerHTML+";\n1;"); + queue.Push(scripts[i].innerHTML+";\n1;"); } } - return last; + return queue.Push(function () {MathJax.Ajax.config.root = MathJax.Hub.config.root}); }, // From 3d36b7a4bab0af2a53c96cad1fd09a9d0765c7f4 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Tue, 14 Jun 2016 20:00:10 -0400 Subject: [PATCH 10/29] Make minus in produce U+2212 rather than U+002D. Resolves issue #989. --- unpacked/jax/output/CommonHTML/jax.js | 3 ++- unpacked/jax/output/HTML-CSS/jax.js | 10 ++++++++-- unpacked/jax/output/NativeMML/jax.js | 22 ++++++++++++++++++++-- unpacked/jax/output/SVG/jax.js | 25 +++++++++++++++++++++++++ 4 files changed, 55 insertions(+), 5 deletions(-) diff --git a/unpacked/jax/output/CommonHTML/jax.js b/unpacked/jax/output/CommonHTML/jax.js index 0b48f9ae2..9e6a3f9b4 100644 --- a/unpacked/jax/output/CommonHTML/jax.js +++ b/unpacked/jax/output/CommonHTML/jax.js @@ -1785,8 +1785,9 @@ /********************************************************/ MML.mn.Augment({ + CHTMLremapMinus: function (text) {return text.replace(/^-/,"\u2212")}, toCommonHTML: function (node) { - node = this.CHTMLdefaultNode(node); + node = this.CHTMLdefaultNode(node,{childOptions:{remap:this.CHTMLremapMinus}}); var bbox = this.CHTML, text = this.data.join(""); if (bbox.skew != null && text.length !== 1) delete bbox.skew; if (bbox.r > bbox.w && text.length === 1 && !this.CHTMLvariant.noIC) { diff --git a/unpacked/jax/output/HTML-CSS/jax.js b/unpacked/jax/output/HTML-CSS/jax.js index 8dad7d6aa..87fdc796a 100644 --- a/unpacked/jax/output/HTML-CSS/jax.js +++ b/unpacked/jax/output/HTML-CSS/jax.js @@ -2239,11 +2239,17 @@ }); MML.mn.Augment({ + HTMLremapMinus: function (text) {return text.replace(/^-/,"\u2212")}, toHTML: function (span) { span = this.HTMLhandleSize(this.HTMLcreateSpan(span)); span.bbox = null; var variant = this.HTMLgetVariant(); - for (var i = 0, m = this.data.length; i < m; i++) - {if (this.data[i]) {this.data[i].toHTML(span,variant)}} + var remap = this.HTMLremapMinus; + for (var i = 0, m = this.data.length; i < m; i++) { + if (this.data[i]) { + this.data[i].toHTML(span,variant,remap); + remap = null; + } + } if (!span.bbox) {span.bbox = this.HTMLzeroBBox()} if (this.data.join("").length !== 1) {delete span.bbox.skew} this.HTMLhandleSpace(span); diff --git a/unpacked/jax/output/NativeMML/jax.js b/unpacked/jax/output/NativeMML/jax.js index c7c436587..6936f2e98 100644 --- a/unpacked/jax/output/NativeMML/jax.js +++ b/unpacked/jax/output/NativeMML/jax.js @@ -890,6 +890,22 @@ } } }); + + 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"); @@ -1179,8 +1195,10 @@ // // Add a text node // - toNativeMML: function (parent) { - parent.appendChild(document.createTextNode(this.toString())); + toNativeMML: function (parent,remap) { + var text = this.toString(); + if (remap) text = remap(text); + parent.appendChild(document.createTextNode(text)); } }); diff --git a/unpacked/jax/output/SVG/jax.js b/unpacked/jax/output/SVG/jax.js index d6b7f4274..e956d687b 100644 --- a/unpacked/jax/output/SVG/jax.js +++ b/unpacked/jax/output/SVG/jax.js @@ -1566,6 +1566,31 @@ return svg; } }); + + MML.mn.Augment({ + SVGremapMinus: function (text) {return text.replace(/^-/,"\u2212")}, + toSVG: function () { + this.SVGgetStyles(); + var variant = this.SVGgetVariant(); + var svg = this.SVG(); this.SVGgetScale(svg); + this.SVGhandleSpace(svg); + var remap = this.SVGremapMinus; + for (var i = 0, m = this.data.length; i < m; i++) { + if (this.data[i]) { + var child = svg.Add(this.data[i].toSVG(variant,svg.scale,remap),svg.w,0,true); + if (child.skew) {svg.skew = child.skew} + remap = null; + } + } + svg.Clean(); var text = this.data.join(""); + if (svg.skew && text.length !== 1) {delete svg.skew} + if (svg.r > svg.w && text.length === 1 && !variant.noIC) + {svg.ic = svg.r - svg.w; svg.w = svg.r} + this.SVGhandleColor(svg); + this.SVGsaveData(svg); + return svg; + }, + }), MML.mtext.Augment({ toSVG: function () { From 61f57ed631bed015b1453e9ffa3cd22e4f7bb254 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Thu, 16 Jun 2016 08:58:49 -0400 Subject: [PATCH 11/29] Fix stretch data for U+222B (integral) in STIX-Web data for HTML-CSS and SVG, and add it so local STIX data. Resolves issue #1092. --- .../jax/output/HTML-CSS/fonts/STIX-Web/fontdata-extra.js | 4 ++-- unpacked/jax/output/HTML-CSS/fonts/STIX-Web/fontdata.js | 2 +- unpacked/jax/output/HTML-CSS/fonts/STIX/fontdata-extra.js | 8 +++++++- unpacked/jax/output/HTML-CSS/fonts/STIX/fontdata.js | 1 + unpacked/jax/output/SVG/fonts/STIX-Web/fontdata-extra.js | 4 ++-- unpacked/jax/output/SVG/fonts/STIX-Web/fontdata.js | 2 +- 6 files changed, 14 insertions(+), 7 deletions(-) diff --git a/unpacked/jax/output/HTML-CSS/fonts/STIX-Web/fontdata-extra.js b/unpacked/jax/output/HTML-CSS/fonts/STIX-Web/fontdata-extra.js index 210b014d4..e7f77b4f4 100644 --- a/unpacked/jax/output/HTML-CSS/fonts/STIX-Web/fontdata-extra.js +++ b/unpacked/jax/output/HTML-CSS/fonts/STIX-Web/fontdata-extra.js @@ -415,9 +415,9 @@ }, 0x222B: { - dir: H, + dir: V, HW: [[0.607,MAIN], [0.979,SIZE1]], - stretch: {top:[0xE03C,SIZE5], rep:[0xE03D,SIZE5], bot:[0xE03E,SIZE5]} + stretch: {top:[0xE03C,SIZE5], ext:[0xE03D,SIZE5], bot:[0xE03E,SIZE5]} }, 0x222C: { diff --git a/unpacked/jax/output/HTML-CSS/fonts/STIX-Web/fontdata.js b/unpacked/jax/output/HTML-CSS/fonts/STIX-Web/fontdata.js index 461cd2f44..2909f8cb4 100644 --- a/unpacked/jax/output/HTML-CSS/fonts/STIX-Web/fontdata.js +++ b/unpacked/jax/output/HTML-CSS/fonts/STIX-Web/fontdata.js @@ -531,7 +531,7 @@ HW: [[0.879,MAIN]], stretch: {ext:[0x2225,MAIN]} }, - 0x222B: EXTRAH, + 0x222B: EXTRAV, 0x222C: EXTRAV, 0x222D: EXTRAV, 0x222E: EXTRAV, diff --git a/unpacked/jax/output/HTML-CSS/fonts/STIX/fontdata-extra.js b/unpacked/jax/output/HTML-CSS/fonts/STIX/fontdata-extra.js index ed0a16bd4..3c101e9b7 100644 --- a/unpacked/jax/output/HTML-CSS/fonts/STIX/fontdata-extra.js +++ b/unpacked/jax/output/HTML-CSS/fonts/STIX/fontdata-extra.js @@ -37,7 +37,8 @@ SIZE2 = "STIXSizeTwoSym", SIZE3 = "STIXSizeThreeSym", SIZE4 = "STIXSizeFourSym", - SIZE5 = "STIXSizeFiveSym"; + SIZE5 = "STIXSizeFiveSym", + INTD = "STIXIntegralsD"; var H = "H", V = "V"; var delim = { @@ -121,6 +122,11 @@ { dir: H, HW: [[.926,GENERAL]], stretch: {right:[0x21DB,GENERAL], rep:[0x2261,GENERAL]} }, + 0x222B: // integral + { + dir: V, HW: [[0.607,GENERAL], [0.979,INTD]], + stretch: {top:[0x2320,SIZE1], ext:[0x23AE,SIZE1], bot:[0x2321,SIZE1]} + }, 0x23B4: // top square bracket { dir: H, HW: [[.926,GENERAL],[1.063,SIZE1],[1.606,SIZE2],[2.147,SIZE3],[2.692,SIZE4],[3.237,SIZE5]], diff --git a/unpacked/jax/output/HTML-CSS/fonts/STIX/fontdata.js b/unpacked/jax/output/HTML-CSS/fonts/STIX/fontdata.js index 920de949a..5643f987e 100644 --- a/unpacked/jax/output/HTML-CSS/fonts/STIX/fontdata.js +++ b/unpacked/jax/output/HTML-CSS/fonts/STIX/fontdata.js @@ -406,6 +406,7 @@ 0x21C3: EXTRAV, // down harpoon with barb left 0x21DA: EXTRAH, // left triple arrow 0x21DB: EXTRAH, // right triple arrow + 0x222B: EXTRAV, // integral 0x23B4: EXTRAH, // top square bracket 0x23B5: EXTRAH, // bottom square bracket 0x23DC: EXTRAH, // top paren diff --git a/unpacked/jax/output/SVG/fonts/STIX-Web/fontdata-extra.js b/unpacked/jax/output/SVG/fonts/STIX-Web/fontdata-extra.js index 75280f595..44bb64fd7 100644 --- a/unpacked/jax/output/SVG/fonts/STIX-Web/fontdata-extra.js +++ b/unpacked/jax/output/SVG/fonts/STIX-Web/fontdata-extra.js @@ -415,9 +415,9 @@ }, 0x222B: { - dir: H, + dir: V, HW: [[607,MAIN], [979,SIZE1]], - stretch: {top:[0xE03C,SIZE5], rep:[0xE03D,SIZE5], bot:[0xE03E,SIZE5]} + stretch: {top:[0xE03C,SIZE5], ext:[0xE03D,SIZE5], bot:[0xE03E,SIZE5]} }, 0x222C: { diff --git a/unpacked/jax/output/SVG/fonts/STIX-Web/fontdata.js b/unpacked/jax/output/SVG/fonts/STIX-Web/fontdata.js index a2a26eb45..05c62ba6e 100644 --- a/unpacked/jax/output/SVG/fonts/STIX-Web/fontdata.js +++ b/unpacked/jax/output/SVG/fonts/STIX-Web/fontdata.js @@ -528,7 +528,7 @@ HW: [[879,MAIN]], stretch: {ext:[0x2225,MAIN]} }, - 0x222B: EXTRAH, + 0x222B: EXTRAV, 0x222C: EXTRAV, 0x222D: EXTRAV, 0x222E: EXTRAV, From 913dcb560157f87617c5635a9828eb91cd73f8f3 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Thu, 16 Jun 2016 09:51:17 -0400 Subject: [PATCH 12/29] Remap U+007C to variant form, and vice-versa. Resolves issue #1154 --- unpacked/jax/output/HTML-CSS/fonts/STIX-Web/fontdata.js | 7 +++---- unpacked/jax/output/HTML-CSS/fonts/STIX/fontdata.js | 6 ++++-- unpacked/jax/output/SVG/fonts/STIX-Web/fontdata.js | 7 +++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/unpacked/jax/output/HTML-CSS/fonts/STIX-Web/fontdata.js b/unpacked/jax/output/HTML-CSS/fonts/STIX-Web/fontdata.js index 2909f8cb4..9eecc41a2 100644 --- a/unpacked/jax/output/HTML-CSS/fonts/STIX-Web/fontdata.js +++ b/unpacked/jax/output/HTML-CSS/fonts/STIX-Web/fontdata.js @@ -151,9 +151,8 @@ }, VARIANT: { - "normal": {fonts: [MAIN,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,VARIANTS,SIZE1]}, - "bold": {fonts: [MAINBOLD,NORMALBOLD,FRAKTURBOLD,DOUBLESTRUCKBOLD,SANSSERIFBOLD,LATINBOLD,ALPHABETSBOLD,MARKSBOLD,ARROWSBOLD,OPERATORSBOLD,SYMBOLSBOLD,SHAPESBOLD,MISCBOLD,VARIANTSBOLD,SIZE1], bold:true -}, + "normal": {remap: {0x007C: [0x007C, "-STIX-Web-variant"]}, fonts: [MAIN,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,VARIANTS,SIZE1]}, + "bold": {fonts: [MAINBOLD,NORMALBOLD,FRAKTURBOLD,DOUBLESTRUCKBOLD,SANSSERIFBOLD,LATINBOLD,ALPHABETSBOLD,MARKSBOLD,ARROWSBOLD,OPERATORSBOLD,SYMBOLSBOLD,SHAPESBOLD,MISCBOLD,VARIANTSBOLD,SIZE1], bold:true}, "italic": {fonts: [MAINITALIC,NORMALITALIC,SCRIPTITALIC,DOUBLESTRUCKITALIC,SANSSERIFITALIC,LATINITALIC,ALPHABETSITALIC,MARKSITALIC,MISCITALIC,VARIANTSITALIC,SIZE1], italic:true}, "bold-italic": {fonts: [MAINBOLDITALIC,NORMALBOLDITALIC,SCRIPTBOLDITALIC,DOUBLESTRUCKBOLDITALIC,SANSSERIFBOLDITALIC,LATINBOLDITALIC,ALPHABETSBOLDITALIC,MARKSBOLDITALIC,SHAPESBOLDITALIC,MISCBOLDITALIC,VARIANTSBOLDITALIC,SIZE1], bold: true, italic:true}, "double-struck": { @@ -211,7 +210,7 @@ offsetA: 0x1D670, offsetN: 0x1D7F6 }, - "-STIX-Web-variant": {remap: { 0x2A87: 0xE010, 0x2A88: 0xE00F, 0x25B3: 0x25B5, 0x25BD: 0x25BF }, fonts: [VARIANTS,SHAPES,OPERATORS,MAIN,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,SYMBOLS,MISC,SIZE1]}, + "-STIX-Web-variant": {remap: {0x2A87: 0xE010, 0x2A88: 0xE00F, 0x25B3: 0x25B5, 0x25BD: 0x25BF, 0x007C: [0x007C, MML.VARIANT.NORMAL]}, fonts: [VARIANTS,SHAPES,OPERATORS,MAIN,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,SYMBOLS,MISC,SIZE1]}, "-tex-caligraphic": {offsetA: 0xE22D, noLowerCase: 1, fonts: [VARIANTSITALIC,MAINITALIC,NORMALITALIC,SCRIPTITALIC,DOUBLESTRUCKITALIC,SANSSERIFITALIC,LATINITALIC,ALPHABETSITALIC,MARKSITALIC,MISCITALIC,SIZE1], italic: true}, "-tex-oldstyle": {offsetN: 0xE261, remap: {0xE262: 0xE265, 0xE263: 0xE269, 0xE264: 0xE26D, 0xE265: 0xE271, 0xE266: 0xE275, 0xE267: 0xE279, 0xE268: 0xE27D, 0xE269: 0xE281, 0xE26A: 0xE285}, fonts: [VARIANTS,MAIN,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,SIZE1]}, "-tex-caligraphic-bold": {offsetA: 0xE247, noLowerCase: 1, fonts: [VARIANTSBOLDITALIC,MAINBOLDITALIC,NORMALBOLDITALIC,SCRIPTBOLDITALIC,DOUBLESTRUCKBOLDITALIC,SANSSERIFBOLDITALIC,LATINBOLDITALIC,ALPHABETSBOLDITALIC,MARKSBOLDITALIC,SHAPESBOLDITALIC,MISCBOLDITALIC,SIZE1], italic: true, bold: true}, diff --git a/unpacked/jax/output/HTML-CSS/fonts/STIX/fontdata.js b/unpacked/jax/output/HTML-CSS/fonts/STIX/fontdata.js index 5643f987e..773e2f93d 100644 --- a/unpacked/jax/output/HTML-CSS/fonts/STIX/fontdata.js +++ b/unpacked/jax/output/HTML-CSS/fonts/STIX/fontdata.js @@ -72,7 +72,8 @@ VARIANT: { "normal": {fonts: [GENERAL,NONUNI,SIZE1], - remap: {0x2205: [0x2205,"-STIX-variant"]}}, // \emptyset + remap: {0x2205: [0x2205,"-STIX-variant"], // \emptyset + 0x7C: [0x7C,"-STIX-variant"]}}, // absolute value "bold": {fonts: [BOLD,"STIXNonUnicode-bold","STIXSizeOneSym-bold"], bold:true}, "italic": {fonts: [ITALIC,NONUNII,GENERAL,NONUNI,SIZE1], italic:true}, "bold-italic": {fonts: [BITALIC,"STIXNonUnicode-bold-italic"], bold:true, italic:true}, @@ -97,7 +98,8 @@ remap: {0x2A87: 0xE010, 0x2A88: 0xE00F, 0x2270: 0xE011, 0x2271: 0xE00E, 0x22E0: 0xE04B, 0x22E1: 0xE04F, 0x2288: 0xE016, 0x2289: 0xE018, 0x25B3: 0x25B5, 0x25BD: 0x25BF, - 0x2205: [0x2205,MML.VARIANT.NORMAL]}}, // \varnothing + 0x2205: [0x2205,MML.VARIANT.NORMAL], // \varnothing + 0x007C: [0x007C,MML.VARIANT.NORMAL]}}, // absolute value "-tex-caligraphic": {fonts: [ITALIC,NONUNII,NONUNI,SIZE1], offsetA: 0xE22D, noLowerCase: 1}, "-tex-oldstyle": {offsetN: 0xE261, remap: {0xE262: 0xE265, 0xE263: 0xE269, 0xE264: 0xE26D, 0xE265: 0xE271, diff --git a/unpacked/jax/output/SVG/fonts/STIX-Web/fontdata.js b/unpacked/jax/output/SVG/fonts/STIX-Web/fontdata.js index 05c62ba6e..86878424a 100644 --- a/unpacked/jax/output/SVG/fonts/STIX-Web/fontdata.js +++ b/unpacked/jax/output/SVG/fonts/STIX-Web/fontdata.js @@ -148,9 +148,8 @@ }, VARIANT: { - "normal": {fonts: [MAIN,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,VARIANTS,SIZE1]}, - "bold": {fonts: [MAINBOLD,NORMALBOLD,FRAKTURBOLD,DOUBLESTRUCKBOLD,SANSSERIFBOLD,LATINBOLD,ALPHABETSBOLD,MARKSBOLD,ARROWSBOLD,OPERATORSBOLD,SYMBOLSBOLD,SHAPESBOLD,MISCBOLD,VARIANTSBOLD,SIZE1], bold:true -}, + "normal": {remap: {0x007C: [0x007C, "-STIX-Web-variant"]}, fonts: [MAIN,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,VARIANTS,SIZE1]}, + "bold": {fonts: [MAINBOLD,NORMALBOLD,FRAKTURBOLD,DOUBLESTRUCKBOLD,SANSSERIFBOLD,LATINBOLD,ALPHABETSBOLD,MARKSBOLD,ARROWSBOLD,OPERATORSBOLD,SYMBOLSBOLD,SHAPESBOLD,MISCBOLD,VARIANTSBOLD,SIZE1], bold:true}, "italic": {fonts: [MAINITALIC,NORMALITALIC,SCRIPTITALIC,DOUBLESTRUCKITALIC,SANSSERIFITALIC,LATINITALIC,ALPHABETSITALIC,MARKSITALIC,MISCITALIC,VARIANTSITALIC,SIZE1], italic:true}, "bold-italic": {fonts: [MAINBOLDITALIC,NORMALBOLDITALIC,SCRIPTBOLDITALIC,DOUBLESTRUCKBOLDITALIC,SANSSERIFBOLDITALIC,LATINBOLDITALIC,ALPHABETSBOLDITALIC,MARKSBOLDITALIC,SHAPESBOLDITALIC,MISCBOLDITALIC,VARIANTSBOLDITALIC,SIZE1], bold: true, italic:true}, "double-struck": { @@ -208,7 +207,7 @@ offsetA: 0x1D670, offsetN: 0x1D7F6 }, - "-STIX-Web-variant": {remap: { 0x2A87: 0xE010, 0x2A88: 0xE00F, 0x25B3: 0x25B5, 0x25BD: 0x25BF }, fonts: [VARIANTS,SHAPES,OPERATORS,MAIN,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,SYMBOLS,MISC,SIZE1]}, + "-STIX-Web-variant": {remap: {0x2A87: 0xE010, 0x2A88: 0xE00F, 0x25B3: 0x25B5, 0x25BD: 0x25BF, 0x007C: [0x07C, MML.VARIANT.NORMAL]}, fonts: [VARIANTS,SHAPES,OPERATORS,MAIN,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,SYMBOLS,MISC,SIZE1]}, "-tex-caligraphic": {offsetA: 0xE22D, noLowerCase: 1, fonts: [VARIANTSITALIC,MAINITALIC,NORMALITALIC,SCRIPTITALIC,DOUBLESTRUCKITALIC,SANSSERIFITALIC,LATINITALIC,ALPHABETSITALIC,MARKSITALIC,MISCITALIC,SIZE1], italic: true}, "-tex-oldstyle": {offsetN: 0xE261, remap: {0xE262: 0xE265, 0xE263: 0xE269, 0xE264: 0xE26D, 0xE265: 0xE271, 0xE266: 0xE275, 0xE267: 0xE279, 0xE268: 0xE27D, 0xE269: 0xE281, 0xE26A: 0xE285}, fonts: [VARIANTS,MAIN,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,SIZE1]}, "-tex-caligraphic-bold": {offsetA: 0xE247, noLowerCase: 1, fonts: [VARIANTSBOLDITALIC,MAINBOLDITALIC,NORMALBOLDITALIC,SCRIPTBOLDITALIC,DOUBLESTRUCKBOLDITALIC,SANSSERIFBOLDITALIC,LATINBOLDITALIC,ALPHABETSBOLDITALIC,MARKSBOLDITALIC,SHAPESBOLDITALIC,MISCBOLDITALIC,SIZE1], italic: true, bold: true}, From a2a62be374d283d9d955c0f6085baa91e5ef9563 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Thu, 16 Jun 2016 10:01:13 -0400 Subject: [PATCH 13/29] Use U+007C and U+2016 for delimiters rather than U+2223 and U+2225. Resolves issue #1175. --- unpacked/extensions/TeX/AMSmath.js | 8 ++++---- unpacked/jax/input/TeX/jax.js | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/unpacked/extensions/TeX/AMSmath.js b/unpacked/extensions/TeX/AMSmath.js index c0fd6b157..d1924bc11 100644 --- a/unpacked/extensions/TeX/AMSmath.js +++ b/unpacked/extensions/TeX/AMSmath.js @@ -145,10 +145,10 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () { }, delimiter: { - '\\lvert': ['2223',{texClass:MML.TEXCLASS.OPEN}], - '\\rvert': ['2223',{texClass:MML.TEXCLASS.CLOSE}], - '\\lVert': ['2225',{texClass:MML.TEXCLASS.OPEN}], - '\\rVert': ['2225',{texClass:MML.TEXCLASS.CLOSE}] + '\\lvert': ['007C',{texClass:MML.TEXCLASS.OPEN}], + '\\rvert': ['007C',{texClass:MML.TEXCLASS.CLOSE}], + '\\lVert': ['2016',{texClass:MML.TEXCLASS.OPEN}], + '\\rVert': ['2016',{texClass:MML.TEXCLASS.CLOSE}] } },null,true); diff --git a/unpacked/jax/input/TeX/jax.js b/unpacked/jax/input/TeX/jax.js index eeec47541..09a39d850 100644 --- a/unpacked/jax/input/TeX/jax.js +++ b/unpacked/jax/input/TeX/jax.js @@ -712,8 +712,8 @@ '\\arrowvert': '23D0', '\\Arrowvert': '2016', '\\bracevert': '23AA', // non-standard - '\\Vert': ['2225',{texClass:MML.TEXCLASS.ORD}], - '\\|': ['2225',{texClass:MML.TEXCLASS.ORD}], + '\\Vert': ['2016',{texClass:MML.TEXCLASS.ORD}], + '\\|': ['2016',{texClass:MML.TEXCLASS.ORD}], '\\vert': ['|',{texClass:MML.TEXCLASS.ORD}], '\\uparrow': '2191', '\\downarrow': '2193', From 4a4a15a4d2c8954e5147377e429d64ab1a422eda Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Thu, 16 Jun 2016 10:27:48 -0400 Subject: [PATCH 14/29] Fix SVG fontdata for stretchy characters in the fontdata-extras file. Resolves issue #1421. --- .../output/SVG/fonts/TeX/fontdata-extra.js | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/unpacked/jax/output/SVG/fonts/TeX/fontdata-extra.js b/unpacked/jax/output/SVG/fonts/TeX/fontdata-extra.js index 5b1c995ef..c80cc2d8f 100644 --- a/unpacked/jax/output/SVG/fonts/TeX/fontdata-extra.js +++ b/unpacked/jax/output/SVG/fonts/TeX/fontdata-extra.js @@ -39,15 +39,15 @@ var delim = { 0x003D: // equal sign { - dir: H, HW: [[.767,MAIN]], stretch: {rep:[0x003D,MAIN]} + dir: H, HW: [[767,MAIN]], stretch: {rep:[0x003D,MAIN]} }, 0x219E: // left two-headed arrow { - dir: H, HW: [[1,AMS]], stretch: {left:[0x219E,AMS], rep:[0x2212,MAIN]} + dir: H, HW: [[1000,AMS]], stretch: {left:[0x219E,AMS], rep:[0x2212,MAIN]} }, 0x21A0: // right two-headed arrow { - dir: H, HW: [[1,AMS]], stretch: {right:[0x21A0,AMS], rep:[0x2212,MAIN]} + dir: H, HW: [[1000,AMS]], stretch: {right:[0x21A0,AMS], rep:[0x2212,MAIN]} }, 0x21A4: // left arrow from bar { @@ -61,7 +61,7 @@ }, 0x21A6: // right arrow from bar { - dir: H, HW: [[1,MAIN]], + dir: H, HW: [[1000,MAIN]], stretch: {left:[0x2223,SIZE1,-.09,-.05,.9], rep:[0x2212,MAIN], right:[0x2192,MAIN]} }, 0x21A7: // down arrow from bar @@ -71,62 +71,62 @@ }, 0x21B0: // up arrow with top leftwards { - dir: V, HW: [[.722,AMS]], + dir: V, HW: [[722,AMS]], stretch: {top:[0x21B0,AMS], ext:[0x23D0,SIZE1,.097]} }, 0x21B1: // up arrow with top right { - dir: V, HW: [[.722,AMS]], + dir: V, HW: [[722,AMS]], stretch: {top:[0x21B1,AMS,.27], ext:[0x23D0,SIZE1]} }, 0x21BC: // left harpoon with barb up { - dir: H, HW: [[1,MAIN]], + dir: H, HW: [[1000,MAIN]], stretch: {left:[0x21BC,MAIN], rep:[0x2212,MAIN]} }, 0x21BD: // left harpoon with barb down { - dir: H, HW: [[1,MAIN]], + dir: H, HW: [[1000,MAIN]], stretch: {left:[0x21BD,MAIN], rep:[0x2212,MAIN]} }, 0x21BE: // up harpoon with barb right { - dir: V, HW: [[.888,AMS]], + 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]], + 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]], + dir: H, HW: [[1000,MAIN]], stretch: {right:[0x21C0,MAIN], rep:[0x2212,MAIN]} }, 0x21C1: // right harpoon with barb down { - dir: H, HW: [[1,MAIN]], + dir: H, HW: [[1000,MAIN]], stretch: {right:[0x21C1,MAIN], rep:[0x2212,MAIN]} }, 0x21C2: // down harpoon with barb right { - dir: V, HW: [[.888,AMS]], + 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]], + 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]], + dir: H, HW: [[1000,AMS]], stretch: {left:[0x21DA,AMS], rep:[0x2261,MAIN]} }, 0x21DB: // right triple arrow { - dir: H, HW: [[1,AMS]], + dir: H, HW: [[1000,AMS]], stretch: {right:[0x21DB,AMS], rep:[0x2261,MAIN]} }, 0x23B4: // top square bracket @@ -141,12 +141,12 @@ }, 0x23DC: // top paren { - dir: H, HW: [[.778,AMS,0,0x2322],[1,MAIN,0,0x2322]], + dir: H, HW: [[778,AMS,0,0x2322],[100,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]], + dir: H, HW: [[778,AMS,0,0x2323],[100,MAIN,0,0x2323]], stretch: {left:[0xE152,SIZE4], rep:[0xE154,SIZE4], right:[0xE153,SIZE4]} }, 0x23E0: // top tortoise shell From 1d9ba6992aa6c2d347c41eca36dadbfc3a3e05d8 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Thu, 16 Jun 2016 11:30:58 -0400 Subject: [PATCH 15/29] Add alias for U+2206 to U+0394, and remove incorrect data from SVG files. Apparently the batik conversion added these somehow, so that should still be fixed. Resolves issue #1418. --- .../output/CommonHTML/fonts/TeX/fontdata.js | 1 + .../jax/output/HTML-CSS/fonts/TeX/fontdata.js | 1 + .../SVG/fonts/TeX/Main/Bold/MathOperators.js | 3 -- .../output/SVG/fonts/TeX/Main/Italic/Main.js | 3 +- .../fonts/TeX/Main/Italic/MathOperators.js | 29 ------------------- .../output/SVG/fonts/TeX/Main/Regular/Main.js | 3 +- .../fonts/TeX/Main/Regular/MathOperators.js | 29 ------------------- .../SVG/fonts/TeX/Math/BoldItalic/Main.js | 5 +--- .../output/SVG/fonts/TeX/Math/Italic/Main.js | 5 +--- .../SVG/fonts/TeX/SansSerif/Bold/Other.js | 5 +--- .../SVG/fonts/TeX/SansSerif/Italic/Other.js | 5 +--- .../SVG/fonts/TeX/SansSerif/Regular/Other.js | 5 +--- .../SVG/fonts/TeX/Typewriter/Regular/Other.js | 5 +--- unpacked/jax/output/SVG/fonts/TeX/fontdata.js | 7 ++--- 14 files changed, 12 insertions(+), 94 deletions(-) delete mode 100644 unpacked/jax/output/SVG/fonts/TeX/Main/Italic/MathOperators.js delete mode 100644 unpacked/jax/output/SVG/fonts/TeX/Main/Regular/MathOperators.js diff --git a/unpacked/jax/output/CommonHTML/fonts/TeX/fontdata.js b/unpacked/jax/output/CommonHTML/fonts/TeX/fontdata.js index 76687a0b9..f94b6bef6 100644 --- a/unpacked/jax/output/CommonHTML/fonts/TeX/fontdata.js +++ b/unpacked/jax/output/CommonHTML/fonts/TeX/fontdata.js @@ -179,6 +179,7 @@ 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 diff --git a/unpacked/jax/output/HTML-CSS/fonts/TeX/fontdata.js b/unpacked/jax/output/HTML-CSS/fonts/TeX/fontdata.js index 4164da5c2..324785b9e 100644 --- a/unpacked/jax/output/HTML-CSS/fonts/TeX/fontdata.js +++ b/unpacked/jax/output/HTML-CSS/fonts/TeX/fontdata.js @@ -161,6 +161,7 @@ 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 diff --git a/unpacked/jax/output/SVG/fonts/TeX/Main/Bold/MathOperators.js b/unpacked/jax/output/SVG/fonts/TeX/Main/Bold/MathOperators.js index ed69c3d22..08aec5208 100644 --- a/unpacked/jax/output/SVG/fonts/TeX/Main/Bold/MathOperators.js +++ b/unpacked/jax/output/SVG/fonts/TeX/Main/Bold/MathOperators.js @@ -33,9 +33,6 @@ MathJax.Hub.Insert( // EMPTY SET 0x2205: [767,73,575,46,528,'285 711Q307 711 326 708T357 701T370 698Q371 698 375 710T383 735T389 750Q395 767 415 767Q431 767 438 757T446 738T436 701T426 670Q426 668 433 664Q468 633 489 588Q511 542 519 488T528 344Q528 286 524 243T508 150T466 63T394 6Q345 -17 287 -17Q265 -17 246 -14T216 -7T203 -4Q191 -47 183 -60T159 -73Q146 -73 137 -63T128 -44Q128 -38 138 -7L148 24L141 30Q134 35 120 49Q94 77 78 113T56 194T48 268T46 344Q46 388 47 416T56 494T78 577T122 644T194 694Q239 711 285 711ZM351 639Q350 639 346 642T337 648T325 654T306 658T283 660Q254 660 221 638T181 567Q171 513 171 375Q171 164 182 129L351 639ZM402 356Q402 516 395 555Q395 557 395 559T394 563T394 566L393 568L223 57Q252 34 286 34H288Q318 34 346 53T387 109Q402 152 402 329V356'], - // INCREMENT - 0x2206: [698,0,958,56,901,''], - // NABLA 0x2207: [686,24,958,56,901,'56 673Q56 679 65 686H892Q901 679 901 673Q901 668 714 331T521 -15Q518 -18 506 -24H452Q440 -19 436 -15Q431 -8 337 162T150 501L57 669Q57 670 56 672V673ZM528 136L758 553H297Q298 551 414 341L528 136'], diff --git a/unpacked/jax/output/SVG/fonts/TeX/Main/Italic/Main.js b/unpacked/jax/output/SVG/fonts/TeX/Main/Italic/Main.js index a2f380f34..d7a3a3e52 100644 --- a/unpacked/jax/output/SVG/fonts/TeX/Main/Italic/Main.js +++ b/unpacked/jax/output/SVG/fonts/TeX/Main/Italic/Main.js @@ -30,8 +30,7 @@ MathJax.OutputJax.SVG.FONTDATA.FONTS['MathJax_Main-italic'] = { [0x300,0x36F,"CombDiacritMarks"], [0x370,0x3FF,"GreekAndCoptic"], [0x2000,0x206F,"GeneralPunctuation"], - [0x2100,0x214F,"LetterlikeSymbols"], - [0x2200,0x22FF,"MathOperators"] + [0x2100,0x214F,"LetterlikeSymbols"] ], // POUND SIGN diff --git a/unpacked/jax/output/SVG/fonts/TeX/Main/Italic/MathOperators.js b/unpacked/jax/output/SVG/fonts/TeX/Main/Italic/MathOperators.js deleted file mode 100644 index aef973c55..000000000 --- a/unpacked/jax/output/SVG/fonts/TeX/Main/Italic/MathOperators.js +++ /dev/null @@ -1,29 +0,0 @@ -/************************************************************* - * - * MathJax/jax/output/SVG/fonts/TeX/svg/Main/Italic/MathOperators.js - * - * Copyright (c) 2011-2015 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.Insert( - MathJax.OutputJax.SVG.FONTDATA.FONTS['MathJax_Main-italic'], - { - // INCREMENT - 0x2206: [716,0,818,70,751,''] - } -); - -MathJax.Ajax.loadComplete(MathJax.OutputJax.SVG.fontDir+"/Main/Italic/MathOperators.js"); diff --git a/unpacked/jax/output/SVG/fonts/TeX/Main/Regular/Main.js b/unpacked/jax/output/SVG/fonts/TeX/Main/Regular/Main.js index f6a493cf7..cfb3b68a0 100644 --- a/unpacked/jax/output/SVG/fonts/TeX/Main/Regular/Main.js +++ b/unpacked/jax/output/SVG/fonts/TeX/Main/Regular/Main.js @@ -36,8 +36,7 @@ MathJax.OutputJax.SVG.FONTDATA.FONTS['MathJax_Main'] = { [0x2B0,0x2FF,"SpacingModLetters"], [0x300,0x36F,"CombDiacritMarks"], [0x370,0x3FF,"GreekAndCoptic"], - [0x2100,0x214F,"LetterlikeSymbols"], - [0x2200,0x22FF,"MathOperators"], + [0x2100,0x214F,"LetterlikeSymbols"] [0x25A0,0x25FF,"GeometricShapes"], [0x2600,0x26FF,"MiscSymbols"], [0x2A00,0x2AFF,"SuppMathOperators"] diff --git a/unpacked/jax/output/SVG/fonts/TeX/Main/Regular/MathOperators.js b/unpacked/jax/output/SVG/fonts/TeX/Main/Regular/MathOperators.js deleted file mode 100644 index 2a76ab16a..000000000 --- a/unpacked/jax/output/SVG/fonts/TeX/Main/Regular/MathOperators.js +++ /dev/null @@ -1,29 +0,0 @@ -/************************************************************* - * - * MathJax/jax/output/SVG/fonts/TeX/svg/Main/Regular/MathOperators.js - * - * Copyright (c) 2011-2015 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.Insert( - MathJax.OutputJax.SVG.FONTDATA.FONTS['MathJax_Main'], - { - // INCREMENT - 0x2206: [716,0,833,46,786,''] - } -); - -MathJax.Ajax.loadComplete(MathJax.OutputJax.SVG.fontDir+"/Main/Regular/MathOperators.js"); diff --git a/unpacked/jax/output/SVG/fonts/TeX/Math/BoldItalic/Main.js b/unpacked/jax/output/SVG/fonts/TeX/Math/BoldItalic/Main.js index 361fc1c7b..a1061bfe1 100644 --- a/unpacked/jax/output/SVG/fonts/TeX/Math/BoldItalic/Main.js +++ b/unpacked/jax/output/SVG/fonts/TeX/Math/BoldItalic/Main.js @@ -386,10 +386,7 @@ MathJax.OutputJax.SVG.FONTDATA.FONTS['MathJax_Math-bold-italic'] = { 0x3F1: [451,194,612,75,603,'371 -168Q357 -168 323 -171T245 -175Q143 -175 109 -150T75 -66Q75 -5 100 108T137 254Q153 299 179 334T232 390T277 419T311 434Q357 451 403 451Q435 451 455 449T506 435T560 400Q603 357 603 282Q603 213 569 148T465 38T304 -8Q273 -8 247 -2T204 14T176 31T159 46T152 53Q152 52 148 27T144 -16Q144 -36 150 -44T189 -58T293 -64Q405 -65 432 -75Q466 -88 466 -127Q466 -140 459 -172Q455 -188 451 -191T426 -194H420Q405 -194 400 -191T395 -176Q396 -170 394 -169T378 -168Q373 -168 371 -168ZM236 116Q236 77 258 60T311 43Q369 43 407 94Q429 123 451 206T474 331Q474 400 409 400H406Q339 400 299 341Q276 305 256 227T236 116'], // GREEK LUNATE EPSILON SYMBOL - 0x3F5: [444,7,483,44,450,'415 89Q423 89 429 74T436 46Q436 43 434 39Q432 36 420 29T380 11T322 -5Q311 -7 281 -7Q216 -7 168 10T94 54T56 110T44 167V181Q44 262 94 329Q104 343 119 357T162 391T234 425T327 443Q328 443 348 443T383 444Q434 444 442 438Q450 430 450 416Q446 392 424 383L376 382Q306 381 278 369Q230 349 208 294Q199 274 199 268Q199 267 291 267Q305 267 325 267T353 268Q383 268 394 263T406 241Q406 214 380 206Q375 205 279 205T183 203Q174 176 174 140Q174 87 208 65T292 43Q295 43 300 43T307 44Q337 49 372 69T415 89'], - - // INCREMENT - 0x2206: [711,0,958,59,904,''] + 0x3F5: [444,7,483,44,450,'415 89Q423 89 429 74T436 46Q436 43 434 39Q432 36 420 29T380 11T322 -5Q311 -7 281 -7Q216 -7 168 10T94 54T56 110T44 167V181Q44 262 94 329Q104 343 119 357T162 391T234 425T327 443Q328 443 348 443T383 444Q434 444 442 438Q450 430 450 416Q446 392 424 383L376 382Q306 381 278 369Q230 349 208 294Q199 274 199 268Q199 267 291 267Q305 267 325 267T353 268Q383 268 394 263T406 241Q406 214 380 206Q375 205 279 205T183 203Q174 176 174 140Q174 87 208 65T292 43Q295 43 300 43T307 44Q337 49 372 69T415 89'] }; MathJax.Ajax.loadComplete(MathJax.OutputJax.SVG.fontDir+"/Math/BoldItalic/Main.js"); diff --git a/unpacked/jax/output/SVG/fonts/TeX/Math/Italic/Main.js b/unpacked/jax/output/SVG/fonts/TeX/Math/Italic/Main.js index 61be7e134..4f5d72539 100644 --- a/unpacked/jax/output/SVG/fonts/TeX/Math/Italic/Main.js +++ b/unpacked/jax/output/SVG/fonts/TeX/Math/Italic/Main.js @@ -385,10 +385,7 @@ MathJax.OutputJax.SVG.FONTDATA.FONTS['MathJax_Math-italic'] = { 0x3F1: [442,194,517,67,510,'205 -174Q136 -174 102 -153T67 -76Q67 -25 91 85T127 234Q143 289 182 341Q252 427 341 441Q343 441 349 441T359 442Q432 442 471 394T510 276Q510 169 431 80T253 -10Q226 -10 204 -2T169 19T146 44T132 64L128 73Q128 72 124 53T116 5T112 -44Q112 -68 117 -78T150 -95T236 -102Q327 -102 356 -111T386 -154Q386 -166 384 -178Q381 -190 378 -192T361 -194H348Q342 -188 342 -179Q342 -169 315 -169Q294 -169 264 -171T205 -174ZM424 322Q424 359 407 382T357 405Q322 405 287 376T231 300Q221 276 204 217Q188 152 188 116Q188 68 210 47T259 26Q297 26 334 62Q367 92 389 158T418 266T424 322'], // GREEK LUNATE EPSILON SYMBOL - 0x3F5: [431,11,406,40,382,'227 -11Q149 -11 95 41T40 174Q40 262 87 322Q121 367 173 396T287 430Q289 431 329 431H367Q382 426 382 411Q382 385 341 385H325H312Q191 385 154 277L150 265H327Q340 256 340 246Q340 228 320 219H138V217Q128 187 128 143Q128 77 160 52T231 26Q258 26 284 36T326 57T343 68Q350 68 354 58T358 39Q358 36 357 35Q354 31 337 21T289 0T227 -11'], - - // INCREMENT - 0x2206: [716,0,833,48,788,''] + 0x3F5: [431,11,406,40,382,'227 -11Q149 -11 95 41T40 174Q40 262 87 322Q121 367 173 396T287 430Q289 431 329 431H367Q382 426 382 411Q382 385 341 385H325H312Q191 385 154 277L150 265H327Q340 256 340 246Q340 228 320 219H138V217Q128 187 128 143Q128 77 160 52T231 26Q258 26 284 36T326 57T343 68Q350 68 354 58T358 39Q358 36 357 35Q354 31 337 21T289 0T227 -11'] }; MathJax.Ajax.loadComplete(MathJax.OutputJax.SVG.fontDir+"/Math/Italic/Main.js"); diff --git a/unpacked/jax/output/SVG/fonts/TeX/SansSerif/Bold/Other.js b/unpacked/jax/output/SVG/fonts/TeX/SansSerif/Bold/Other.js index af8b3e1d7..c1e44162a 100644 --- a/unpacked/jax/output/SVG/fonts/TeX/SansSerif/Bold/Other.js +++ b/unpacked/jax/output/SVG/fonts/TeX/SansSerif/Bold/Other.js @@ -76,10 +76,7 @@ MathJax.Hub.Insert( 0x201C: [694,-443,558,138,520,'144 443L138 449V581L176 636Q182 644 188 653T198 667T205 677T211 685T215 689T220 692T224 693T230 694H247H258Q283 694 283 683Q283 678 265 635T246 590Q246 588 261 588H276Q279 584 283 581V449L276 443H144ZM381 443L375 449V581L413 636Q419 644 425 653T435 667T442 677T448 685T452 689T457 692T461 693T467 694H484H495Q520 694 520 683Q520 678 502 635T483 590Q483 588 498 588H513Q516 584 520 581V449L513 443H381'], // RIGHT DOUBLE QUOTATION MARK - 0x201D: [694,-442,558,37,420,'38 687Q42 693 45 693Q46 694 111 694H176Q179 690 183 687V556L144 501Q139 494 134 486T126 474T120 465T114 457T110 451T106 447T102 445T98 443T94 443T89 442H73H62Q37 442 37 453Q37 458 55 501T74 546Q74 548 59 548L44 549L38 555V687ZM275 687Q279 693 282 693Q283 694 348 694H413Q416 690 420 687V556L381 501Q376 494 371 486T363 474T357 465T351 457T347 451T343 447T339 445T335 443T331 443T326 442H310H299Q274 442 274 453Q274 458 292 501T311 546Q311 548 296 548L281 549L275 555V687'], - - // INCREMENT - 0x2206: [694,1,917,60,856,''] + 0x201D: [694,-442,558,37,420,'38 687Q42 693 45 693Q46 694 111 694H176Q179 690 183 687V556L144 501Q139 494 134 486T126 474T120 465T114 457T110 451T106 447T102 445T98 443T94 443T89 442H73H62Q37 442 37 453Q37 458 55 501T74 546Q74 548 59 548L44 549L38 555V687ZM275 687Q279 693 282 693Q283 694 348 694H413Q416 690 420 687V556L381 501Q376 494 371 486T363 474T357 465T351 457T347 451T343 447T339 445T335 443T331 443T326 442H310H299Q274 442 274 453Q274 458 292 501T311 546Q311 548 296 548L281 549L275 555V687'] } ); diff --git a/unpacked/jax/output/SVG/fonts/TeX/SansSerif/Italic/Other.js b/unpacked/jax/output/SVG/fonts/TeX/SansSerif/Italic/Other.js index 549114ba5..7de1653ec 100644 --- a/unpacked/jax/output/SVG/fonts/TeX/SansSerif/Italic/Other.js +++ b/unpacked/jax/output/SVG/fonts/TeX/SansSerif/Italic/Other.js @@ -76,10 +76,7 @@ MathJax.Hub.Insert( 0x201C: [694,-471,500,274,613,'393 567L383 520Q373 474 372 473Q372 471 323 471T274 473L276 480Q277 486 280 499T285 522L295 569L371 694H396L419 693L416 685Q412 677 405 661T391 630L363 570L378 569Q393 569 393 567ZM587 567L577 520Q567 474 566 473Q566 471 517 471T468 473L470 480Q471 486 474 499T479 522L489 569L565 694H590L613 693L610 685Q606 677 599 661T585 630L557 570L572 569Q587 569 587 567'], // RIGHT DOUBLE QUOTATION MARK - 0x201D: [694,-471,500,133,472,'171 647L180 694H229Q278 694 278 693L276 686Q275 680 273 668T268 644L258 597L182 471H157Q133 471 133 472L189 595Q189 596 174 596H160V598Q160 601 171 647ZM365 647L374 694H423Q472 694 472 693L470 686Q469 680 467 668T462 644L452 597L376 471H351Q327 471 327 472L383 595Q383 596 368 596H354V598Q354 601 365 647'], - - // INCREMENT - 0x2206: [694,0,833,42,790,''] + 0x201D: [694,-471,500,133,472,'171 647L180 694H229Q278 694 278 693L276 686Q275 680 273 668T268 644L258 597L182 471H157Q133 471 133 472L189 595Q189 596 174 596H160V598Q160 601 171 647ZM365 647L374 694H423Q472 694 472 693L470 686Q469 680 467 668T462 644L452 597L376 471H351Q327 471 327 472L383 595Q383 596 368 596H354V598Q354 601 365 647'] } ); diff --git a/unpacked/jax/output/SVG/fonts/TeX/SansSerif/Regular/Other.js b/unpacked/jax/output/SVG/fonts/TeX/SansSerif/Regular/Other.js index 93d25b5c9..6ab9be82b 100644 --- a/unpacked/jax/output/SVG/fonts/TeX/SansSerif/Regular/Other.js +++ b/unpacked/jax/output/SVG/fonts/TeX/SansSerif/Regular/Other.js @@ -76,10 +76,7 @@ MathJax.Hub.Insert( 0x201C: [694,-471,500,174,467,'174 568L224 694H273L258 633Q243 572 242 571Q242 569 257 569H272V471H174V568ZM368 568L418 694H467L452 633Q437 572 436 571Q436 569 451 569H466V471H368V568'], // RIGHT DOUBLE QUOTATION MARK - 0x201D: [694,-471,500,32,325,'33 596V694H131V597L82 471H32L47 532Q62 593 63 594Q63 596 48 596H33ZM227 596V694H325V597L276 471H226L241 532Q256 593 257 594Q257 596 242 596H227'], - - // INCREMENT - 0x2206: [694,0,833,42,790,''] + 0x201D: [694,-471,500,32,325,'33 596V694H131V597L82 471H32L47 532Q62 593 63 594Q63 596 48 596H33ZM227 596V694H325V597L276 471H226L241 532Q256 593 257 594Q257 596 242 596H227'] } ); diff --git a/unpacked/jax/output/SVG/fonts/TeX/Typewriter/Regular/Other.js b/unpacked/jax/output/SVG/fonts/TeX/Typewriter/Regular/Other.js index f0f230afb..c03b20b08 100644 --- a/unpacked/jax/output/SVG/fonts/TeX/Typewriter/Regular/Other.js +++ b/unpacked/jax/output/SVG/fonts/TeX/Typewriter/Regular/Other.js @@ -67,10 +67,7 @@ MathJax.Hub.Insert( 0x7E3: [681,-357,525,176,350,'176 479Q176 563 227 622T310 681Q324 680 337 667T350 641Q350 627 340 619T312 599T280 566Q256 531 252 485V471Q261 472 262 472Q285 472 302 455T320 414Q320 389 303 373T261 357Q223 357 200 391T176 479'], // PRIME - 0x2032: [623,-334,525,211,313,'211 572Q211 593 226 608T262 623Q281 623 297 610T313 573Q313 561 307 465Q301 370 299 357T284 336Q279 334 262 334Q240 334 231 343Q226 350 225 362T217 465Q211 549 211 572'], - - // INCREMENT - 0x2206: [623,0,525,35,489,''] + 0x2032: [623,-334,525,211,313,'211 572Q211 593 226 608T262 623Q281 623 297 610T313 573Q313 561 307 465Q301 370 299 357T284 336Q279 334 262 334Q240 334 231 343Q226 350 225 362T217 465Q211 549 211 572'] } ); diff --git a/unpacked/jax/output/SVG/fonts/TeX/fontdata.js b/unpacked/jax/output/SVG/fonts/TeX/fontdata.js index 752df6866..1d6c89565 100644 --- a/unpacked/jax/output/SVG/fonts/TeX/fontdata.js +++ b/unpacked/jax/output/SVG/fonts/TeX/fontdata.js @@ -160,6 +160,7 @@ 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 @@ -602,7 +603,6 @@ [0x300,0x36F,"CombDiacritMarks"], [0x370,0x3FF,"GreekAndCoptic"], [0x2100,0x214F,"LetterlikeSymbols"], - [0x2200,0x22FF,"MathOperators"], [0x25A0,0x25FF,"GeometricShapes"], [0x2600,0x26FF,"MiscSymbols"], [0x2A00,0x2AFF,"SuppMathOperators"] @@ -1555,10 +1555,7 @@ 0x3F1: [442,194,517,67,510,'205 -174Q136 -174 102 -153T67 -76Q67 -25 91 85T127 234Q143 289 182 341Q252 427 341 441Q343 441 349 441T359 442Q432 442 471 394T510 276Q510 169 431 80T253 -10Q226 -10 204 -2T169 19T146 44T132 64L128 73Q128 72 124 53T116 5T112 -44Q112 -68 117 -78T150 -95T236 -102Q327 -102 356 -111T386 -154Q386 -166 384 -178Q381 -190 378 -192T361 -194H348Q342 -188 342 -179Q342 -169 315 -169Q294 -169 264 -171T205 -174ZM424 322Q424 359 407 382T357 405Q322 405 287 376T231 300Q221 276 204 217Q188 152 188 116Q188 68 210 47T259 26Q297 26 334 62Q367 92 389 158T418 266T424 322'], // GREEK LUNATE EPSILON SYMBOL - 0x3F5: [431,11,406,40,382,'227 -11Q149 -11 95 41T40 174Q40 262 87 322Q121 367 173 396T287 430Q289 431 329 431H367Q382 426 382 411Q382 385 341 385H325H312Q191 385 154 277L150 265H327Q340 256 340 246Q340 228 320 219H138V217Q128 187 128 143Q128 77 160 52T231 26Q258 26 284 36T326 57T343 68Q350 68 354 58T358 39Q358 36 357 35Q354 31 337 21T289 0T227 -11'], - - // INCREMENT - 0x2206: [716,0,833,48,788,''] + 0x3F5: [431,11,406,40,382,'227 -11Q149 -11 95 41T40 174Q40 262 87 322Q121 367 173 396T287 430Q289 431 329 431H367Q382 426 382 411Q382 385 341 385H325H312Q191 385 154 277L150 265H327Q340 256 340 246Q340 228 320 219H138V217Q128 187 128 143Q128 77 160 52T231 26Q258 26 284 36T326 57T343 68Q350 68 354 58T358 39Q358 36 357 35Q354 31 337 21T289 0T227 -11'] }; SVG.FONTDATA.FONTS['MathJax_Main'][0x22EE][0] += 400; // adjust height for \vdots From 8f628e0590f87f073185c1e7938964dbb1c41002 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Thu, 16 Jun 2016 22:20:56 -0400 Subject: [PATCH 16/29] Adjust height and depth of minus to match plus, and fix arrow rep to remove the extra when it is used as an arrow extender. Fix up some spacing and use shorthands for some font names. Resolves issue #1187. --- .../CommonHTML/fonts/TeX/fontdata-extra.js | 36 ++++++++-------- .../output/CommonHTML/fonts/TeX/fontdata.js | 6 ++- .../HTML-CSS/fonts/Asana-Math/fontdata.js | 29 ++++++++----- .../HTML-CSS/fonts/Gyre-Pagella/fontdata.js | 28 +++++++------ .../HTML-CSS/fonts/Gyre-Termes/fontdata.js | 28 +++++++------ .../HTML-CSS/fonts/Latin-Modern/fontdata.js | 28 +++++++------ .../HTML-CSS/fonts/Neo-Euler/fontdata.js | 16 ++++++-- .../HTML-CSS/fonts/STIX-Web/fontdata-extra.js | 41 ++++++++++--------- .../HTML-CSS/fonts/STIX-Web/fontdata.js | 10 +++-- .../output/HTML-CSS/fonts/STIX/fontdata.js | 10 +++-- .../HTML-CSS/fonts/TeX/fontdata-extra.js | 34 +++++++-------- .../jax/output/HTML-CSS/fonts/TeX/fontdata.js | 35 +++++++++------- unpacked/jax/output/HTML-CSS/jax.js | 2 +- .../output/SVG/fonts/Asana-Math/fontdata.js | 29 ++++++++----- .../output/SVG/fonts/Gyre-Pagella/fontdata.js | 29 +++++++------ .../output/SVG/fonts/Gyre-Termes/fontdata.js | 29 +++++++------ .../output/SVG/fonts/Latin-Modern/fontdata.js | 31 +++++++------- .../output/SVG/fonts/Neo-Euler/fontdata.js | 14 +++++-- .../SVG/fonts/STIX-Web/fontdata-extra.js | 41 ++++++++++--------- .../jax/output/SVG/fonts/STIX-Web/fontdata.js | 12 +++--- .../output/SVG/fonts/TeX/fontdata-extra.js | 34 +++++++-------- unpacked/jax/output/SVG/fonts/TeX/fontdata.js | 33 +++++++++------ 22 files changed, 319 insertions(+), 236 deletions(-) diff --git a/unpacked/jax/output/CommonHTML/fonts/TeX/fontdata-extra.js b/unpacked/jax/output/CommonHTML/fonts/TeX/fontdata-extra.js index 166da0eee..709a5f784 100644 --- a/unpacked/jax/output/CommonHTML/fonts/TeX/fontdata-extra.js +++ b/unpacked/jax/output/CommonHTML/fonts/TeX/fontdata-extra.js @@ -35,7 +35,9 @@ 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 { @@ -43,16 +45,16 @@ }, 0x219E: // left two-headed arrow { - dir: H, HW: [[1,AMS]], stretch: {left:[0x219E,AMS], rep:[0x2212,MAIN]} + 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:[0x2212,MAIN]} + 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:[0x2212,MAIN], right:[0x2223,SIZE1,0,-.05,.9]} + stretch: {min:1, left:[0x2190,MAIN], rep:ARROWREP, right:[0x2223,SIZE1,0,-.05,.9]} }, 0x21A5: // up arrow from bar { @@ -62,7 +64,7 @@ 0x21A6: // right arrow from bar { dir: H, HW: [[1,MAIN]], - stretch: {left:[0x2223,SIZE1,-.09,-.05,.9], rep:[0x2212,MAIN], right:[0x2192,MAIN]} + stretch: {left:[0x2223,SIZE1,-.09,-.05,.9], rep:ARROWREP, right:[0x2192,MAIN]} }, 0x21A7: // down arrow from bar { @@ -82,12 +84,12 @@ 0x21BC: // left harpoon with barb up { dir: H, HW: [[1,MAIN]], - stretch: {left:[0x21BC,MAIN], rep:[0x2212,MAIN]} + stretch: {left:[0x21BC,MAIN], rep:ARROWREP} }, 0x21BD: // left harpoon with barb down { dir: H, HW: [[1,MAIN]], - stretch: {left:[0x21BD,MAIN], rep:[0x2212,MAIN]} + stretch: {left:[0x21BD,MAIN], rep:ARROWREP} }, 0x21BE: // up harpoon with barb right { @@ -102,12 +104,12 @@ 0x21C0: // right harpoon with barb up { dir: H, HW: [[1,MAIN]], - stretch: {right:[0x21C0,MAIN], rep:[0x2212,MAIN]} + stretch: {right:[0x21C0,MAIN], rep:ARROWREP} }, 0x21C1: // right harpoon with barb down { dir: H, HW: [[1,MAIN]], - stretch: {right:[0x21C1,MAIN], rep:[0x2212,MAIN]} + stretch: {right:[0x21C1,MAIN], rep:ARROWREP} }, 0x21C2: // down harpoon with barb right { @@ -162,17 +164,17 @@ 0x2906: // leftwards double arrow from bar { dir: H, HW: [], - stretch: {min:1, left:[0x21D0,MAIN], rep:[0x3D,MAIN], right:[0x2223,SIZE1,0,-.1]} + 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:[0x3D,MAIN], right:[0x21D2,MAIN]} + 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:[0x2212,MAIN], right:[0x21C0,MAIN]} + stretch: {min:.5, left:[0x21BC,MAIN], rep:ARROWREP, right:[0x21C0,MAIN]} }, 0x294F: // up barb right down barb right harpoon { @@ -182,7 +184,7 @@ 0x2950: // left barb dow right barb down harpoon { dir: H, HW: [], - stretch: {min:.5, left:[0x21BD,MAIN], rep:[0x2212,MAIN], right:[0x21C1,MAIN]} + stretch: {min:.5, left:[0x21BD,MAIN], rep:ARROWREP, right:[0x21C1,MAIN]} }, 0x2951: // up barb left down barb left harpoon { @@ -192,12 +194,12 @@ 0x295A: // leftwards harpoon with barb up from bar { dir: H, HW: [], - stretch: {min:1, left:[0x21BC,MAIN], rep:[0x2212,MAIN], right:[0x2223,SIZE1,0,-.05,.9]} + 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:[0x2212,MAIN], right:[0x21C0,MAIN]} + stretch: {min:1, left:[0x2223,SIZE1,-.05,-.05,.9], rep:ARROWREP, right:[0x21C0,MAIN]} }, 0x295C: // up harpoon with barb right from bar { @@ -212,12 +214,12 @@ 0x295E: // leftwards harpoon with barb down from bar { dir: H, HW: [], - stretch: {min:1, left:[0x21BD,MAIN], rep:[0x2212,MAIN], right:[0x2223,SIZE1,0,-.05,.9]} + 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:[0x2212,MAIN], right:[0x21C1,MAIN]} + stretch: {min:1, left:[0x2223,SIZE1,-.05,-.05,.9], rep:ARROWREP, right:[0x21C1,MAIN]} }, 0x2960: // up harpoon with barb left from bar { diff --git a/unpacked/jax/output/CommonHTML/fonts/TeX/fontdata.js b/unpacked/jax/output/CommonHTML/fonts/TeX/fontdata.js index f94b6bef6..0dbb1e617 100644 --- a/unpacked/jax/output/CommonHTML/fonts/TeX/fontdata.js +++ b/unpacked/jax/output/CommonHTML/fonts/TeX/fontdata.js @@ -37,8 +37,8 @@ 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,0,.1]; // add depth for arrow extender - var DARROWREP = [0x3D,MAIN,0,0,0,0,.1]; // add depth for arrow extender + 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; @@ -1588,6 +1588,8 @@ 0xE154: [120,0,400,-10,410] // stix-oblique open face capital letter A }; + 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; diff --git a/unpacked/jax/output/HTML-CSS/fonts/Asana-Math/fontdata.js b/unpacked/jax/output/HTML-CSS/fonts/Asana-Math/fontdata.js index 4db13cd4a..ec87a5797 100644 --- a/unpacked/jax/output/HTML-CSS/fonts/Asana-Math/fontdata.js +++ b/unpacked/jax/output/HTML-CSS/fonts/Asana-Math/fontdata.js @@ -21,7 +21,7 @@ (function (HTMLCSS,MML,AJAX) { - var VERSION = "2.6.0"; + var VERSION = "2.6.0"; var ALPHABETS = "AsanaMathJax_Alphabets", ARROWS = "AsanaMathJax_Arrows", @@ -141,7 +141,7 @@ offsetA: 0x1D670, offsetN: 0x1D7F6 }, - "-Asana-Math-variant": {fonts: [MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,VARIANTS,NONUNICODE,SIZE1]}, + "-Asana-Math-variant": {fonts: [MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,VARIANTS,NONUNICODE,SIZE1]}, "-tex-caligraphic": {offsetA: 0xE20A, noLowerCase: 1, fonts: [VARIANTS,MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,NONUNICODE,SIZE1], italic: true}, "-tex-oldstyle": {offsetN: 0xE200, fonts: [VARIANTS,MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,NONUNICODE,SIZE1]}, "-tex-caligraphic-bold": {offsetA: 0xE224, noLowerCase: 1, fonts: [VARIANTS,MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,NONUNICODE,SIZE1], italic: true, bold: true}, @@ -160,7 +160,7 @@ remap: {0x03F5: 52, 0x03D1: 53, 0x03F0: 54, 0x03D5: 55, 0x03F1: 56, 0x03D6: 57, 0x03F4: 17}} ], - RULECHAR: 0x0305, + RULECHAR: 0x2212, REMAP: { 0x25C2: 0x25C0, @@ -208,7 +208,7 @@ HW: [[0.941,MAIN], [1.471,SIZE1], [2.041,SIZE2], [2.552,SIZE3], [2.615,SIZE3,1.025]], stretch: {bot:[0x23A0,SYMBOLS], ext:[0x239F,SYMBOLS], top:[0x239E,SYMBOLS]} }, - 0x2D: {alias: 0x305, dir: H}, + 0x2D: {alias: 0x2212, dir: H}, 0x2F: {alias: 0x2044, dir: H}, 0x3D: { @@ -254,9 +254,9 @@ stretch: {bot:[0x23AD,SYMBOLS], ext:[0x23AA,SYMBOLS], mid:[0x23AC,SYMBOLS], top:[0x23AB,SYMBOLS]} }, 0x7E: {alias: 0x303, dir: H}, - 0xAF: {alias: 0x305, dir: H}, + 0xAF: {alias: 0x2212, dir: H}, 0x2C6: {alias: 0x302, dir: H}, - 0x2C9: {alias: 0x305, dir: H}, + 0x2C9: {alias: 0x2212, dir: H}, 0x2DC: {alias: 0x303, dir: H}, 0x302: { @@ -288,15 +288,15 @@ }, 0x333: EXTRAH, 0x33F: EXTRAH, - 0x2015: {alias: 0x305, dir: H}, + 0x2015: {alias: 0x2212, dir: H}, 0x2016: { dir: V, HW: [[0.885,MAIN], [1.275,SIZE1], [1.555,SIZE2], [1.897,SIZE3], [2.315,SIZE4]], stretch: {ext:[0xE005,SIZE6], top:[0xE005,SIZE6]} }, - 0x2017: {alias: 0x305, dir: H}, - 0x203E: {alias: 0x305, dir: H}, + 0x2017: {alias: 0x2212, dir: H}, + 0x203E: {alias: 0x2212, dir: H}, 0x2044: { dir: V, @@ -405,7 +405,10 @@ }, 0x2210: EXTRAV, 0x2211: EXTRAV, - 0x2212: {alias: 0x305, dir: H}, + 0x2212: { + dir: H, HW: [], + stretch: {rep:[0x2212,MAIN,0,0,0,-.23,-.23]} + }, 0x2215: {alias: 0x2044, dir: V}, 0x221A: { @@ -506,7 +509,7 @@ }, 0x23E0: EXTRAH, 0x23E1: EXTRAH, - 0x2500: {alias: 0x305, dir: H}, + 0x2500: {alias: 0x2212, dir: H}, 0x2758: {alias: 0x2223, dir: V}, 0x27C5: { @@ -593,6 +596,10 @@ } }); + MathJax.Hub.Register.LoadHook(HTMLCSS.fontDir+"/Main/Regular/Main.js",function () { + HTMLCSS.FONTDATA.FONTS[MAIN][0x2212][0] = HTMLCSS.FONTDATA.FONTS[MAIN][0x002B][0]; // - needs height and depth of + + HTMLCSS.FONTDATA.FONTS[MAIN][0x2212][1] = HTMLCSS.FONTDATA.FONTS[MAIN][0x002B][1]; // - needs height and depth of + + }); MathJax.Hub.Register.LoadHook(HTMLCSS.fontDir+"/Size6/Regular/Main.js",function () { var u; u = HTMLCSS.FONTDATA.DELIMITERS[0x23DE].stretch.rep[0]; diff --git a/unpacked/jax/output/HTML-CSS/fonts/Gyre-Pagella/fontdata.js b/unpacked/jax/output/HTML-CSS/fonts/Gyre-Pagella/fontdata.js index 42041e1c6..4565a7e9b 100644 --- a/unpacked/jax/output/HTML-CSS/fonts/Gyre-Pagella/fontdata.js +++ b/unpacked/jax/output/HTML-CSS/fonts/Gyre-Pagella/fontdata.js @@ -21,7 +21,7 @@ (function (HTMLCSS,MML,AJAX) { - var VERSION = "2.6.0"; + var VERSION = "2.6.0"; var ALPHABETS = "GyrePagellaMathJax_Alphabets", ARROWS = "GyrePagellaMathJax_Arrows", @@ -141,7 +141,7 @@ offsetA: 0x1D670, offsetN: 0x1D7F6 }, - "-Gyre-Pagella-variant": {fonts: [VARIANTS,MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,NONUNICODE,SIZE1]}, + "-Gyre-Pagella-variant": {fonts: [VARIANTS,MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,NONUNICODE,SIZE1]}, "-tex-caligraphic": {fonts: [MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,VARIANTS,NONUNICODE,SIZE1], italic: true}, "-tex-oldstyle": {fonts: [MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,VARIANTS,NONUNICODE,SIZE1]}, "-tex-caligraphic-bold": {fonts: [MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,VARIANTS,NONUNICODE,SIZE1], italic: true, bold: true}, @@ -160,7 +160,7 @@ remap: {0x03F5: 52, 0x03D1: 53, 0x03F0: 54, 0x03D5: 55, 0x03F1: 56, 0x03D6: 57, 0x03F4: 17}} ], - RULECHAR: 0x0305, + RULECHAR: 0x2212, REMAP: { 0x25C2: 0x25C0, @@ -207,7 +207,7 @@ HW: [[0.828,MAIN], [0.988,SIZE1], [1.180,SIZE2], [1.410,SIZE3], [1.686,SIZE4], [2.018,SIZE5], [2.416,SIZE6], [2.612,SIZE6,1.081]], stretch: {bot:[0x23A0,SYMBOLS], ext:[0x239F,SYMBOLS], top:[0x239E,SYMBOLS]} }, - 0x2D: {alias: 0x305, dir: H}, + 0x2D: {alias: 0x2212, dir: H}, 0x2F: { dir: V, @@ -259,7 +259,7 @@ 0x7E: {alias: 0x303, dir: H}, 0xAF: {alias: 0x332, dir: H}, 0x2C6: {alias: 0x302, dir: H}, - 0x2C9: {alias: 0x305, dir: H}, + 0x2C9: {alias: 0x2212, dir: H}, 0x2DC: {alias: 0x303, dir: H}, 0x302: { @@ -297,15 +297,15 @@ }, 0x333: EXTRAH, 0x33F: EXTRAH, - 0x2015: {alias: 0x305, dir: H}, + 0x2015: {alias: 0x2212, dir: H}, 0x2016: { dir: V, HW: [[0.800,MAIN], [0.960,SIZE1], [1.152,SIZE2], [1.382,SIZE3], [1.658,SIZE4], [1.990,SIZE5], [2.388,SIZE6]], stretch: {bot:[0xE12A,SIZE6], ext:[0xE12B,SIZE6], top:[0xE12C,SIZE6]} }, - 0x2017: {alias: 0x305, dir: H}, - 0x203E: {alias: 0x305, dir: H}, + 0x2017: {alias: 0x2212, dir: H}, + 0x203E: {alias: 0x2212, dir: H}, 0x2044: { dir: V, @@ -477,8 +477,8 @@ 0x2212: { dir: H, - HW: [[0.600,MAIN]], - stretch: {left:[0xE127,SIZE6], rep:[0xE128,SIZE6], right:[0xE129,SIZE6]} + HW: [], + stretch: {rep:[0x2212,MAIN,0,0,0,-.27,-.28]} }, 0x2215: {alias: 0x2044, dir: V}, 0x221A: @@ -561,7 +561,7 @@ HW: [[0.596,SYMBOLS]], stretch: {ext:[0x23AA,SYMBOLS]} }, - 0x23AF: {alias: 0x305, dir: H}, + 0x23AF: {alias: 0x2212, dir: H}, 0x23B0: { dir: V, @@ -598,7 +598,7 @@ }, 0x23E0: EXTRAH, 0x23E1: EXTRAH, - 0x2500: {alias: 0x305, dir: H}, + 0x2500: {alias: 0x2212, dir: H}, 0x27A1: EXTRAH, 0x27E6: EXTRAV, 0x27E7: EXTRAV, @@ -673,6 +673,10 @@ } }); + MathJax.Hub.Register.LoadHook(HTMLCSS.fontDir+"/Main/Regular/Main.js",function () { + HTMLCSS.FONTDATA.FONTS[MAIN][0x2212][0] = HTMLCSS.FONTDATA.FONTS[MAIN][0x002B][0]; // - needs height and depth of + + HTMLCSS.FONTDATA.FONTS[MAIN][0x2212][1] = HTMLCSS.FONTDATA.FONTS[MAIN][0x002B][1]; // - needs height and depth of + + }); MathJax.Hub.Register.LoadHook(HTMLCSS.fontDir+"/Size1/Regular/Main.js",function () { var i; for (i = 0x222B; i <= 0x222D; i++) { diff --git a/unpacked/jax/output/HTML-CSS/fonts/Gyre-Termes/fontdata.js b/unpacked/jax/output/HTML-CSS/fonts/Gyre-Termes/fontdata.js index 9053e7611..b4eac2f17 100644 --- a/unpacked/jax/output/HTML-CSS/fonts/Gyre-Termes/fontdata.js +++ b/unpacked/jax/output/HTML-CSS/fonts/Gyre-Termes/fontdata.js @@ -21,7 +21,7 @@ (function (HTMLCSS,MML,AJAX) { - var VERSION = "2.6.0"; + var VERSION = "2.6.0"; var ALPHABETS = "GyreTermesMathJax_Alphabets", ARROWS = "GyreTermesMathJax_Arrows", @@ -141,7 +141,7 @@ offsetA: 0x1D670, offsetN: 0x1D7F6 }, - "-Gyre-Termes-variant": {fonts: [VARIANTS,MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,NONUNICODE,SIZE1]}, + "-Gyre-Termes-variant": {fonts: [VARIANTS,MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,NONUNICODE,SIZE1]}, "-tex-caligraphic": {fonts: [MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,VARIANTS,NONUNICODE,SIZE1], italic: true}, "-tex-oldstyle": {fonts: [MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,VARIANTS,NONUNICODE,SIZE1]}, "-tex-caligraphic-bold": {fonts: [MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,VARIANTS,NONUNICODE,SIZE1], italic: true, bold: true}, @@ -160,7 +160,7 @@ remap: {0x03F5: 52, 0x03D1: 53, 0x03F0: 54, 0x03D5: 55, 0x03F1: 56, 0x03D6: 57, 0x03F4: 17}} ], - RULECHAR: 0x0305, + RULECHAR: 0x2212, REMAP: { 0x25C2: 0x25C0, @@ -207,7 +207,7 @@ HW: [[0.816,MAIN], [0.976,SIZE1], [1.168,SIZE2], [1.398,SIZE3], [1.674,SIZE4], [2.006,SIZE5], [2.404,SIZE6], [2.780,SIZE6,1.157]], stretch: {bot:[0x23A0,SYMBOLS], ext:[0x239F,SYMBOLS], top:[0x239E,SYMBOLS]} }, - 0x2D: {alias: 0x305, dir: H}, + 0x2D: {alias: 0x2212, dir: H}, 0x2F: { dir: V, @@ -259,7 +259,7 @@ 0x7E: {alias: 0x303, dir: H}, 0xAF: {alias: 0x332, dir: H}, 0x2C6: {alias: 0x302, dir: H}, - 0x2C9: {alias: 0x305, dir: H}, + 0x2C9: {alias: 0x2212, dir: H}, 0x2DC: {alias: 0x303, dir: H}, 0x302: { @@ -297,15 +297,15 @@ }, 0x333: EXTRAH, 0x33F: EXTRAH, - 0x2015: {alias: 0x305, dir: H}, + 0x2015: {alias: 0x2212, dir: H}, 0x2016: { dir: V, HW: [[0.800,MAIN], [0.960,SIZE1], [1.152,SIZE2], [1.382,SIZE3], [1.658,SIZE4], [1.990,SIZE5], [2.388,SIZE6]], stretch: {bot:[0xE12A,SIZE6], ext:[0xE12B,SIZE6], top:[0xE12C,SIZE6]} }, - 0x2017: {alias: 0x305, dir: H}, - 0x203E: {alias: 0x305, dir: H}, + 0x2017: {alias: 0x2212, dir: H}, + 0x203E: {alias: 0x2212, dir: H}, 0x2044: { dir: V, @@ -477,8 +477,8 @@ 0x2212: { dir: H, - HW: [[0.500,MAIN]], - stretch: {left:[0xE127,SIZE6], rep:[0xE128,SIZE6], right:[0xE129,SIZE6]} + HW: [], + stretch: {rep:[0x2212,MAIN,0,0,0,-.224,-.224]} }, 0x2215: {alias: 0x2044, dir: V}, 0x221A: @@ -561,7 +561,7 @@ HW: [[0.596,SYMBOLS]], stretch: {ext:[0x23AA,SYMBOLS]} }, - 0x23AF: {alias: 0x305, dir: H}, + 0x23AF: {alias: 0x2212, dir: H}, 0x23B0: { dir: V, @@ -598,7 +598,7 @@ }, 0x23E0: EXTRAH, 0x23E1: EXTRAH, - 0x2500: {alias: 0x305, dir: H}, + 0x2500: {alias: 0x2212, dir: H}, 0x27A1: EXTRAH, 0x27E6: EXTRAV, 0x27E7: EXTRAV, @@ -673,6 +673,10 @@ } }); + MathJax.Hub.Register.LoadHook(HTMLCSS.fontDir+"/Main/Regular/Main.js",function () { + HTMLCSS.FONTDATA.FONTS[MAIN][0x2212][0] = HTMLCSS.FONTDATA.FONTS[MAIN][0x002B][0]; // - needs height and depth of + + HTMLCSS.FONTDATA.FONTS[MAIN][0x2212][1] = HTMLCSS.FONTDATA.FONTS[MAIN][0x002B][1]; // - needs height and depth of + + }); MathJax.Hub.Register.LoadHook(HTMLCSS.fontDir+"/Size1/Regular/Main.js",function () { var i; for (i = 0x222B; i <= 0x222D; i++) { diff --git a/unpacked/jax/output/HTML-CSS/fonts/Latin-Modern/fontdata.js b/unpacked/jax/output/HTML-CSS/fonts/Latin-Modern/fontdata.js index 950b86830..e4426eaeb 100644 --- a/unpacked/jax/output/HTML-CSS/fonts/Latin-Modern/fontdata.js +++ b/unpacked/jax/output/HTML-CSS/fonts/Latin-Modern/fontdata.js @@ -21,7 +21,7 @@ (function (HTMLCSS,MML,AJAX) { - var VERSION = "2.6.0"; + var VERSION = "2.6.0"; var ALPHABETS = "LatinModernMathJax_Alphabets", ARROWS = "LatinModernMathJax_Arrows", @@ -143,7 +143,7 @@ offsetA: 0x1D670, offsetN: 0x1D7F6 }, - "-Latin-Modern-variant": {fonts: [VARIANTS,MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,NONUNICODE,SIZE1]}, + "-Latin-Modern-variant": {fonts: [VARIANTS,MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,NONUNICODE,SIZE1]}, "-tex-caligraphic": {fonts: [MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,VARIANTS,NONUNICODE,SIZE1], italic: true}, "-tex-oldstyle": {fonts: [MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,VARIANTS,NONUNICODE,SIZE1]}, "-tex-caligraphic-bold": {fonts: [MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,VARIANTS,NONUNICODE,SIZE1], italic: true, bold: true}, @@ -162,7 +162,7 @@ remap: {0x03F5: 52, 0x03D1: 53, 0x03F0: 54, 0x03D5: 55, 0x03F1: 56, 0x03D6: 57, 0x03F4: 17}} ], - RULECHAR: 0x0305, + RULECHAR: 0x2212, REMAP: { 0x25C2: 0x25C0, @@ -209,7 +209,7 @@ HW: [[0.996,MAIN], [1.094,SIZE1], [1.194,SIZE2], [1.444,SIZE3], [1.792,SIZE4], [2.092,SIZE5], [2.392,SIZE6], [2.990,SIZE7]], stretch: {bot:[0x23A0,SYMBOLS], ext:[0x239F,SYMBOLS], top:[0x239E,SYMBOLS]} }, - 0x2D: {alias: 0x305, dir: H}, + 0x2D: {alias: 0x2212, dir: H}, 0x2F: { dir: V, @@ -261,7 +261,7 @@ 0x7E: {alias: 0x303, dir: H}, 0xAF: {alias: 0x332, dir: H}, 0x2C6: {alias: 0x302, dir: H}, - 0x2C9: {alias: 0x305, dir: H}, + 0x2C9: {alias: 0x2212, dir: H}, 0x2DC: {alias: 0x303, dir: H}, 0x302: { @@ -299,15 +299,15 @@ }, 0x333: EXTRAH, 0x33F: EXTRAH, - 0x2015: {alias: 0x305, dir: H}, + 0x2015: {alias: 0x2212, dir: H}, 0x2016: { dir: V, HW: [[1.000,MAIN], [1.202,SIZE1], [1.444,SIZE2], [1.734,SIZE3], [2.084,SIZE4], [2.502,SIZE5], [3.004,SIZE6], [3.606,SIZE7]], stretch: {bot:[0xE12A,SIZE7], ext:[0xE12B,SIZE7], top:[0xE12C,SIZE7]} }, - 0x2017: {alias: 0x305, dir: H}, - 0x203E: {alias: 0x305, dir: H}, + 0x2017: {alias: 0x2212, dir: H}, + 0x203E: {alias: 0x2212, dir: H}, 0x2044: { dir: V, @@ -474,8 +474,8 @@ 0x2212: { dir: H, - HW: [[0.666,MAIN]], - stretch: {left:[0xE127,SIZE7], rep:[0xE128,SIZE7], right:[0xE129,SIZE7]} + HW: [], + stretch: {rep:[0x2212,MAIN,0,0,0,-.31,-.31]} }, 0x2215: {alias: 0x2044, dir: V}, 0x221A: @@ -558,7 +558,7 @@ HW: [[0.748,SYMBOLS]], stretch: {ext:[0x23AA,SYMBOLS]} }, - 0x23AF: {alias: 0x305, dir: H}, + 0x23AF: {alias: 0x2212, dir: H}, 0x23B0: { dir: V, @@ -595,7 +595,7 @@ }, 0x23E0: EXTRAH, 0x23E1: EXTRAH, - 0x2500: {alias: 0x305, dir: H}, + 0x2500: {alias: 0x2212, dir: H}, 0x27A1: EXTRAH, 0x27E6: EXTRAV, 0x27E7: EXTRAV, @@ -670,6 +670,10 @@ } }); + MathJax.Hub.Register.LoadHook(HTMLCSS.fontDir+"/Main/Regular/Main.js",function () { + HTMLCSS.FONTDATA.FONTS[MAIN][0x2212][0] = HTMLCSS.FONTDATA.FONTS[MAIN][0x002B][0]; // - needs height and depth of + + HTMLCSS.FONTDATA.FONTS[MAIN][0x2212][1] = HTMLCSS.FONTDATA.FONTS[MAIN][0x002B][1]; // - needs height and depth of + + }); MathJax.Hub.Register.LoadHook(HTMLCSS.fontDir+"/Size7/Regular/Main.js",function () { var u; u = HTMLCSS.FONTDATA.DELIMITERS[0x23DE].stretch.rep[0]; diff --git a/unpacked/jax/output/HTML-CSS/fonts/Neo-Euler/fontdata.js b/unpacked/jax/output/HTML-CSS/fonts/Neo-Euler/fontdata.js index 4a3d5a91a..5294e7c5a 100644 --- a/unpacked/jax/output/HTML-CSS/fonts/Neo-Euler/fontdata.js +++ b/unpacked/jax/output/HTML-CSS/fonts/Neo-Euler/fontdata.js @@ -21,7 +21,7 @@ (function (HTMLCSS,MML,AJAX) { - var VERSION = "2.6.0"; + var VERSION = "2.6.0"; var ALPHABETS = "NeoEulerMathJax_Alphabets", ARROWS = "NeoEulerMathJax_Arrows", @@ -132,7 +132,7 @@ offsetA: 0x1D670, offsetN: 0x1D7F6 }, - "-Neo-Euler-variant": {fonts: [VARIANTS,MAIN,NORMAL,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,NONUNICODE,SIZE1]}, + "-Neo-Euler-variant": {fonts: [VARIANTS,MAIN,NORMAL,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,NONUNICODE,SIZE1]}, "-tex-caligraphic": {fonts: [MAIN,NORMAL,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,VARIANTS,NONUNICODE,SIZE1], italic: true}, "-tex-oldstyle": {offsetN: 0xE200, fonts: [VARIANTS,MAIN,NORMAL,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,NONUNICODE,SIZE1]}, "-tex-caligraphic-bold": {fonts: [MAIN,NORMAL,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,VARIANTS,NONUNICODE,SIZE1], italic: true, bold: true}, @@ -151,7 +151,7 @@ remap: {0x03F5: 52, 0x03D1: 53, 0x03F0: 54, 0x03D5: 55, 0x03F1: 56, 0x03D6: 57, 0x03F4: 17}} ], - RULECHAR: 0x00AF, + RULECHAR: 0x2212, REMAP: { 0x20F0: 0x002A, @@ -341,7 +341,11 @@ 0x220F: EXTRAV, 0x2210: EXTRAV, 0x2211: EXTRAV, - 0x2212: {alias: 0xAF, dir: H}, + 0x2212: { + dir: H, + HW: [], + stretch: {rep:[0x2212,MAIN,0,0,0,-.31,-.31]} + }, 0x2215: { dir: V, @@ -486,6 +490,10 @@ } }); + MathJax.Hub.Register.LoadHook(HTMLCSS.fontDir+"/Main/Regular/Main.js",function () { + HTMLCSS.FONTDATA.FONTS[MAIN][0x2212][0] = HTMLCSS.FONTDATA.FONTS[MAIN][0x002B][0]; // - needs height and depth of + + HTMLCSS.FONTDATA.FONTS[MAIN][0x2212][1] = HTMLCSS.FONTDATA.FONTS[MAIN][0x002B][1]; // - needs height and depth of + + }); MathJax.Hub.Register.LoadHook(HTMLCSS.fontDir+"/Size5/Regular/Main.js",function () { var u; u = HTMLCSS.FONTDATA.DELIMITERS[0x23DE].stretch.rep[0]; diff --git a/unpacked/jax/output/HTML-CSS/fonts/STIX-Web/fontdata-extra.js b/unpacked/jax/output/HTML-CSS/fonts/STIX-Web/fontdata-extra.js index e7f77b4f4..10718f420 100644 --- a/unpacked/jax/output/HTML-CSS/fonts/STIX-Web/fontdata-extra.js +++ b/unpacked/jax/output/HTML-CSS/fonts/STIX-Web/fontdata-extra.js @@ -25,6 +25,7 @@ var DELIMITERS = HTMLCSS.FONTDATA.DELIMITERS; var H = "H", V = "V"; + var ARROWREP = [0x2212,MAIN,0,0,0,-.26,-.26]; var ALPHABETSBOLDITALIC = "STIXMathJax_Alphabets-bold-italic", ALPHABETSBOLD = "STIXMathJax_Alphabets-bold", @@ -162,7 +163,7 @@ { dir: H, HW: [[0.786,MAIN]], - stretch: {left:[0x219E,MAIN], rep:[0x2212,MAIN]} + stretch: {left:[0x219E,MAIN], rep:ARROWREP} }, 0x219F: { @@ -174,7 +175,7 @@ { dir: H, HW: [[0.786,MAIN]], - stretch: {right:[0x21A0,MAIN], rep:[0x2212,MAIN]} + stretch: {right:[0x21A0,MAIN], rep:ARROWREP} }, 0x21A1: { @@ -216,13 +217,13 @@ { dir: H, HW: [[0.786,MAIN]], - stretch: {left:[0x2190,MAIN], rep:[0x2212,MAIN], right:[0xE0B5,ARROWS]} + stretch: {left:[0x2190,MAIN], rep:ARROWREP, right:[0xE0B5,ARROWS]} }, 0x21AA: { dir: H, HW: [[0.786,MAIN]], - stretch: {left:[0xE0B4,ARROWS], rep:[0x2212,MAIN], right:[0x2192,MAIN]} + stretch: {left:[0xE0B4,ARROWS], rep:ARROWREP, right:[0x2192,MAIN]} }, 0x21B0: { @@ -294,7 +295,7 @@ { dir: H, HW: [[0.847,MAIN]], - stretch: {right:[0x21C1,MAIN], rep:[0x2212,MAIN]} + stretch: {right:[0x21C1,MAIN], rep:ARROWREP} }, 0x21C2: { @@ -360,31 +361,31 @@ { dir: H, HW: [[0.806,ARROWS]], - stretch: {left:[0x21E4,ARROWS], rep:[0x2212,MAIN]} + stretch: {left:[0x21E4,ARROWS], rep:ARROWREP} }, 0x21E5: { dir: H, HW: [[0.806,ARROWS]], - stretch: {right:[0x21E5,ARROWS], rep:[0x2212,MAIN]} + stretch: {right:[0x21E5,ARROWS], rep:ARROWREP} }, 0x21FD: { dir: H, HW: [[0.806,ARROWS]], - stretch: {left:[0x21FD,ARROWS], rep:[0x2212,MAIN]} + stretch: {left:[0x21FD,ARROWS], rep:ARROWREP} }, 0x21FE: { dir: H, HW: [[0.806,ARROWS]], - stretch: {right:[0x21FE,ARROWS], rep:[0x2212,MAIN]} + stretch: {right:[0x21FE,ARROWS], rep:ARROWREP} }, 0x21FF: { dir: H, HW: [[0.886,ARROWS]], - stretch: {left:[0x21FD,ARROWS], rep:[0x2212,MAIN], right:[0x21FE,ARROWS]} + stretch: {left:[0x21FD,ARROWS], rep:ARROWREP, right:[0x21FE,ARROWS]} }, 0x220F: { @@ -609,7 +610,7 @@ { dir: H, HW: [[0.850,ARROWS]], - stretch: {left:[0x21BC,MAIN], rep:[0x2212,MAIN], right:[0x21C0,MAIN]} + stretch: {left:[0x21BC,MAIN], rep:ARROWREP, right:[0x21C0,MAIN]} }, 0x294F: { @@ -621,7 +622,7 @@ { dir: H, HW: [[0.850,ARROWS]], - stretch: {left:[0x21BD,MAIN], rep:[0x2212,MAIN], right:[0x21C1,MAIN]} + stretch: {left:[0x21BD,MAIN], rep:ARROWREP, right:[0x21C1,MAIN]} }, 0x2951: { @@ -633,13 +634,13 @@ { dir: H, HW: [[0.816,ARROWS]], - stretch: {left:[0x2952,ARROWS], rep:[0x2212,MAIN]} + stretch: {left:[0x2952,ARROWS], rep:ARROWREP} }, 0x2953: { dir: H, HW: [[0.816,ARROWS]], - stretch: {right:[0x2953,ARROWS], rep:[0x2212,MAIN]} + stretch: {right:[0x2953,ARROWS], rep:ARROWREP} }, 0x2954: { @@ -657,13 +658,13 @@ { dir: H, HW: [[0.816,ARROWS]], - stretch: {left:[0x2956,ARROWS], rep:[0x2212,MAIN]} + stretch: {left:[0x2956,ARROWS], rep:ARROWREP} }, 0x2957: { dir: H, HW: [[0.816,ARROWS]], - stretch: {right:[0x2957,ARROWS], rep:[0x2212,MAIN]} + stretch: {right:[0x2957,ARROWS], rep:ARROWREP} }, 0x2958: { @@ -681,13 +682,13 @@ { dir: H, HW: [[0.816,ARROWS]], - stretch: {left:[0x21BC,MAIN], rep:[0x2212,MAIN], right:[0x22A3,MAINBOLD,0.000,0.100,0.600]} + stretch: {left:[0x21BC,MAIN], rep:ARROWREP, right:[0x22A3,MAINBOLD,0.000,0.100,0.600]} }, 0x295B: { dir: H, HW: [[0.816,ARROWS]], - stretch: {left:[0xE0B6,ARROWS], rep:[0x2212,MAIN], right:[0x21C0,MAIN]} + stretch: {left:[0xE0B6,ARROWS], rep:ARROWREP, right:[0x21C0,MAIN]} }, 0x295C: { @@ -705,13 +706,13 @@ { dir: H, HW: [[0.816,ARROWS]], - stretch: {left:[0x21BD,MAIN], rep:[0x2212,MAIN], right:[0x22A3,MAINBOLD,0.000,0.100,0.600]} + stretch: {left:[0x21BD,MAIN], rep:ARROWREP, right:[0x22A3,MAINBOLD,0.000,0.100,0.600]} }, 0x295F: { dir: H, HW: [[0.816,ARROWS]], - stretch: {left:[0xE0B6,ARROWS], rep:[0x2212,MAIN], right:[0x21C1,MAIN]} + stretch: {left:[0xE0B6,ARROWS], rep:ARROWREP, right:[0x21C1,MAIN]} }, 0x2960: { diff --git a/unpacked/jax/output/HTML-CSS/fonts/STIX-Web/fontdata.js b/unpacked/jax/output/HTML-CSS/fonts/STIX-Web/fontdata.js index 9eecc41a2..f6bee1576 100644 --- a/unpacked/jax/output/HTML-CSS/fonts/STIX-Web/fontdata.js +++ b/unpacked/jax/output/HTML-CSS/fonts/STIX-Web/fontdata.js @@ -80,6 +80,7 @@ VARIANTS = "STIXMathJax_Variants"; var H = "H", V = "V", EXTRAH = {load:"extra", dir:H}, EXTRAV = {load:"extra", dir:V}; + var ARROWREP = [0x2212,MAIN,0,0,0,-.26,-.26]; HTMLCSS.Augment({ FONTDATA: { @@ -399,7 +400,7 @@ { dir: H, HW: [[0.786,MAIN]], - stretch: {left:[0x2190,MAIN], rep:[0x23AF,SYMBOLS]} + stretch: {left:[0x2190,MAIN], rep:ARROWREP} }, 0x2191: { @@ -411,7 +412,7 @@ { dir: H, HW: [[0.786,MAIN]], - stretch: {rep:[0x23AF,SYMBOLS], right:[0x2192,MAIN]} + stretch: {rep:ARROWREP, right:[0x2192,MAIN]} }, 0x2193: { @@ -423,7 +424,7 @@ { dir: H, HW: [[0.850,MAIN]], - stretch: {left:[0x2190,MAIN], rep:[0x23AF,SYMBOLS], right:[0x2192,MAIN]} + stretch: {left:[0x2190,MAIN], rep:ARROWREP, right:[0x2192,MAIN]} }, 0x2195: { @@ -744,7 +745,8 @@ MathJax.Hub.Register.LoadHook(HTMLCSS.fontDir+"/Main/Regular/Main.js",function () { HTMLCSS.FONTDATA.FONTS[MAIN][0x22EE][0] += 400; // adjust height for \vdots HTMLCSS.FONTDATA.FONTS[MAIN][0x22F1][0] += 500; // adjust height for \ddots - HTMLCSS.FONTDATA.FONTS[MAIN][0x2212][1] += 100; // adjust depth for minus (arrow extender) + HTMLCSS.FONTDATA.FONTS[MAIN][0x2212][0] = HTMLCSS.FONTDATA.FONTS[MAIN][0x002B][0]; // - needs height and depth of + + HTMLCSS.FONTDATA.FONTS[MAIN][0x2212][1] = HTMLCSS.FONTDATA.FONTS[MAIN][0x002B][1]; // - needs height and depth of + HTMLCSS.FONTDATA.FONTS[MAIN][0x003D][1] += 100; // adjust depth for = (double arrow extender) }); MathJax.Hub.Register.LoadHook(HTMLCSS.fontDir+"/Size5/Regular/Main.js",function () { diff --git a/unpacked/jax/output/HTML-CSS/fonts/STIX/fontdata.js b/unpacked/jax/output/HTML-CSS/fonts/STIX/fontdata.js index 773e2f93d..34f601574 100644 --- a/unpacked/jax/output/HTML-CSS/fonts/STIX/fontdata.js +++ b/unpacked/jax/output/HTML-CSS/fonts/STIX/fontdata.js @@ -42,6 +42,7 @@ SIZE4 = "STIXSizeFourSym", SIZE5 = "STIXSizeFiveSym"; var H = "H", V = "V", EXTRAH = {load:"extra", dir:H}, EXTRAV = {load:"extra", dir:V}; + var ARROWREP = [0x2212,GENERAL,0,0,0,-.26,-.26]; // remove extra height/depth added below HTMLCSS.Augment({ FONTDATA: { @@ -225,7 +226,7 @@ }, 0x2190: // left arrow { - dir: H, HW: [[.926,GENERAL]], stretch: {left:[0x2190,GENERAL], rep:[0x2212,GENERAL]} + dir: H, HW: [[.926,GENERAL]], stretch: {left:[0x2190,GENERAL], rep:ARROWREP} }, 0x2191: // \uparrow { @@ -233,7 +234,7 @@ }, 0x2192: // right arrow { - dir: H, HW: [[.926,GENERAL]], stretch: {rep:[0x2212,GENERAL], right:[0x2192,GENERAL]} + dir: H, HW: [[.926,GENERAL]], stretch: {rep:ARROWREP, right:[0x2192,GENERAL]} }, 0x2193: // \downarrow { @@ -242,7 +243,7 @@ 0x2194: // left-right arrow { dir: H, HW: [[.926,GENERAL]], - stretch: {left:[0x2190,GENERAL], rep:[0x2212,GENERAL], right:[0x2192,GENERAL]} + stretch: {left:[0x2190,GENERAL], rep:ARROWREP, right:[0x2192,GENERAL]} }, 0x2195: // \updownarrow { @@ -1508,6 +1509,9 @@ 0x221A: [943,11,737,67,767] // SQUARE ROOT }; + + HTMLCSS.FONTDATA.FONTS['STIXGeneral'][0x2212][0] = HTMLCSS.FONTDATA.FONTS['STIXGeneral'][0x002B][0]; // minus is sized as plus + HTMLCSS.FONTDATA.FONTS['STIXGeneral'][0x2212][1] = HTMLCSS.FONTDATA.FONTS['STIXGeneral'][0x002B][1]; // minus is sized as plus HTMLCSS.FONTDATA.FONTS['STIXGeneral'][0x22EE][0] += 400; // adjust height for \vdots HTMLCSS.FONTDATA.FONTS['STIXGeneral'][0x22F1][0] += 500; // adjust height for \ddots HTMLCSS.FONTDATA.FONTS['STIXGeneral'][0x2212][1] += 100; // adjust depth for minus (arrow extender) diff --git a/unpacked/jax/output/HTML-CSS/fonts/TeX/fontdata-extra.js b/unpacked/jax/output/HTML-CSS/fonts/TeX/fontdata-extra.js index 8cb6497fd..2b6c5de95 100644 --- a/unpacked/jax/output/HTML-CSS/fonts/TeX/fontdata-extra.js +++ b/unpacked/jax/output/HTML-CSS/fonts/TeX/fontdata-extra.js @@ -35,6 +35,8 @@ SIZE1 = "MathJax_Size1", SIZE4 = "MathJax_Size4"; var H = "H", V = "V"; + var ARROWREP = [0x2212,MAIN,0,0,0,-.3,-.3]; // 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 @@ -43,16 +45,16 @@ }, 0x219E: // left two-headed arrow { - dir: H, HW: [[1,AMS]], stretch: {left:[0x219E,AMS], rep:[0x2212,MAIN]} + 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:[0x2212,MAIN]} + 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:[0x2212,MAIN], right:[0x2223,SIZE1,0,-.05,.9]} + stretch: {min:1, left:[0x2190,MAIN], rep:ARROWREP, right:[0x2223,SIZE1,0,-.05,.9]} }, 0x21A5: // up arrow from bar { @@ -62,7 +64,7 @@ 0x21A6: // right arrow from bar { dir: H, HW: [[1,MAIN]], - stretch: {left:[0x2223,SIZE1,-.09,-.05,.9], rep:[0x2212,MAIN], right:[0x2192,MAIN]} + stretch: {left:[0x2223,SIZE1,-.09,-.05,.9], rep:ARROWREP, right:[0x2192,MAIN]} }, 0x21A7: // down arrow from bar { @@ -82,12 +84,12 @@ 0x21BC: // left harpoon with barb up { dir: H, HW: [[1,MAIN]], - stretch: {left:[0x21BC,MAIN], rep:[0x2212,MAIN]} + stretch: {left:[0x21BC,MAIN], rep:ARROWREP} }, 0x21BD: // left harpoon with barb down { dir: H, HW: [[1,MAIN]], - stretch: {left:[0x21BD,MAIN], rep:[0x2212,MAIN]} + stretch: {left:[0x21BD,MAIN], rep:ARROWREP} }, 0x21BE: // up harpoon with barb right { @@ -102,12 +104,12 @@ 0x21C0: // right harpoon with barb up { dir: H, HW: [[1,MAIN]], - stretch: {right:[0x21C0,MAIN], rep:[0x2212,MAIN]} + stretch: {right:[0x21C0,MAIN], rep:ARROWREP} }, 0x21C1: // right harpoon with barb down { dir: H, HW: [[1,MAIN]], - stretch: {right:[0x21C1,MAIN], rep:[0x2212,MAIN]} + stretch: {right:[0x21C1,MAIN], rep:ARROWREP} }, 0x21C2: // down harpoon with barb right { @@ -162,17 +164,17 @@ 0x2906: // leftwards double arrow from bar { dir: H, HW: [], - stretch: {min:1, left:[0x21D0,MAIN], rep:[0x3D,MAIN], right:[0x2223,SIZE1,0,-.1]} + 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:[0x3D,MAIN], right:[0x21D2,MAIN]} + 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:[0x2212,MAIN], right:[0x21C0,MAIN]} + stretch: {min:.5, left:[0x21BC,MAIN], rep:ARROWREP, right:[0x21C0,MAIN]} }, 0x294F: // up barb right down barb right harpoon { @@ -182,7 +184,7 @@ 0x2950: // left barb dow right barb down harpoon { dir: H, HW: [], - stretch: {min:.5, left:[0x21BD,MAIN], rep:[0x2212,MAIN], right:[0x21C1,MAIN]} + stretch: {min:.5, left:[0x21BD,MAIN], rep:ARROWREP, right:[0x21C1,MAIN]} }, 0x2951: // up barb left down barb left harpoon { @@ -192,12 +194,12 @@ 0x295A: // leftwards harpoon with barb up from bar { dir: H, HW: [], - stretch: {min:1, left:[0x21BC,MAIN], rep:[0x2212,MAIN], right:[0x2223,SIZE1,0,-.05,.9]} + 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:[0x2212,MAIN], right:[0x21C0,MAIN]} + stretch: {min:1, left:[0x2223,SIZE1,-.05,-.05,.9], rep:ARROWREP, right:[0x21C0,MAIN]} }, 0x295C: // up harpoon with barb right from bar { @@ -212,12 +214,12 @@ 0x295E: // leftwards harpoon with barb down from bar { dir: H, HW: [], - stretch: {min:1, left:[0x21BD,MAIN], rep:[0x2212,MAIN], right:[0x2223,SIZE1,0,-.05,.9]} + 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:[0x2212,MAIN], right:[0x21C1,MAIN]} + stretch: {min:1, left:[0x2223,SIZE1,-.05,-.05,.9], rep:ARROWREP, right:[0x21C1,MAIN]} }, 0x2960: // up harpoon with barb left from bar { diff --git a/unpacked/jax/output/HTML-CSS/fonts/TeX/fontdata.js b/unpacked/jax/output/HTML-CSS/fonts/TeX/fontdata.js index 324785b9e..385bd645a 100644 --- a/unpacked/jax/output/HTML-CSS/fonts/TeX/fontdata.js +++ b/unpacked/jax/output/HTML-CSS/fonts/TeX/fontdata.js @@ -37,8 +37,8 @@ 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,0,.1]; // add depth for arrow extender - var DARROWREP = [0x3D,MAIN,0,0,0,0,.1]; // add depth for arrow extender + 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 HTMLCSS.Augment({ FONTDATA: { @@ -369,6 +369,10 @@ { 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]} @@ -427,7 +431,7 @@ }, 0x2212: // horizontal line { - dir: H, HW: [[.778,MAIN]], stretch: {rep:[0x2212,MAIN]} + dir: H, HW: [[.5,MAIN,0,0x2013]], stretch: {rep:ARROWREP} }, 0x221A: // \surd { @@ -518,8 +522,9 @@ 0x0303: {alias: 0x02DC, dir:H}, // wide tilde 0x030C: {alias: 0x02C7, dir:H}, // wide caron 0x0332: {alias: 0x2212, dir:H}, // combining low line - 0x2015: {alias: 0x2212, dir:H}, // horizontal line - 0x2017: {alias: 0x2212, dir:H}, // horizontal 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 0x2215: {alias: 0x002F, dir:V}, // division slash 0x2329: {alias: 0x27E8, dir:V}, // langle @@ -1563,15 +1568,17 @@ 0xE154: [120,0,400,-10,410] // stix-oblique open face capital letter A }; - HTMLCSS.FONTDATA.FONTS['MathJax_Main'][0x22EE][0] += 400; // adjust height for \vdots - HTMLCSS.FONTDATA.FONTS['MathJax_Main'][0x22F1][0] += 700; // adjust height for \ddots - HTMLCSS.FONTDATA.FONTS['MathJax_Size4'][0xE154][0] += 200; // adjust height for brace extender - HTMLCSS.FONTDATA.FONTS['MathJax_Size4'][0xE154][1] += 200; // adjust depth for brace extender - HTMLCSS.FONTDATA.FONTS['MathJax_Main'][0x2245][2] -= 222; // fix error in character's right bearing - HTMLCSS.FONTDATA.FONTS['MathJax_Main'][0x2245][5] = {rfix:-222}; // fix error in character's right bearing + HTMLCSS.FONTDATA.FONTS[MAIN][0x2212][0] = HTMLCSS.FONTDATA.FONTS[MAIN][0x002B][0]; // minus is sized as plus + HTMLCSS.FONTDATA.FONTS[MAIN][0x2212][1] = HTMLCSS.FONTDATA.FONTS[MAIN][0x002B][1]; // minus is sized as plus + HTMLCSS.FONTDATA.FONTS[MAIN][0x22EE][0] += 400; // adjust height for \vdots + HTMLCSS.FONTDATA.FONTS[MAIN][0x22F1][0] += 700; // adjust height for \ddots + HTMLCSS.FONTDATA.FONTS[SIZE4][0xE154][0] += 200; // adjust height for brace extender + HTMLCSS.FONTDATA.FONTS[SIZE4][0xE154][1] += 200; // adjust depth for brace extender + HTMLCSS.FONTDATA.FONTS[MAIN][0x2245][2] -= 222; // fix error in character's right bearing + HTMLCSS.FONTDATA.FONTS[MAIN][0x2245][5] = {rfix:-222}; // fix error in character's right bearing MathJax.Hub.Register.LoadHook(HTMLCSS.fontDir+"/Main/Bold/MathOperators.js",function () { - HTMLCSS.FONTDATA.FONTS['MathJax_Main-bold'][0x2245][2] -= 106; // fix error in character's right bearing - HTMLCSS.FONTDATA.FONTS['MathJax_Main-bold'][0x2245][5] = {rfix:-106}; // fix error in character's right bearing + HTMLCSS.FONTDATA.FONTS[BOLD][0x2245][2] -= 106; // fix error in character's right bearing + HTMLCSS.FONTDATA.FONTS[BOLD][0x2245][5] = {rfix:-106}; // fix error in character's right bearing }); MathJax.Hub.Register.LoadHook(HTMLCSS.fontDir+"/Typewriter/Regular/BasicLatin.js",function () { HTMLCSS.FONTDATA.FONTS['MathJax_Typewriter'][0x20][2] += 275; // fix error in character width @@ -1581,7 +1588,7 @@ // // Add some spacing characters (more will come later) // - MathJax.Hub.Insert(HTMLCSS.FONTDATA.FONTS['MathJax_Main'],{ + MathJax.Hub.Insert(HTMLCSS.FONTDATA.FONTS[MAIN],{ 0xEEE0: [0,0,-575,0,0,{space:1}], 0xEEE1: [0,0,-300,0,0,{space:1}], 0xEEE8: [0,0,25,0,0,{space:1}] diff --git a/unpacked/jax/output/HTML-CSS/jax.js b/unpacked/jax/output/HTML-CSS/jax.js index 8dad7d6aa..5ac40ac6a 100644 --- a/unpacked/jax/output/HTML-CSS/jax.js +++ b/unpacked/jax/output/HTML-CSS/jax.js @@ -2624,7 +2624,7 @@ if (surd.isMultiChar || (HTMLCSS.AdjustSurd && HTMLCSS.imgFonts)) {surd.bbox.w *= .95} if (surd.bbox.h + surd.bbox.d > H) {q = ((surd.bbox.h+surd.bbox.d) - (H-t))/2} var ruleC = HTMLCSS.FONTDATA.DELIMITERS[HTMLCSS.FONTDATA.RULECHAR]; - if (!ruleC || W < ruleC.HW[0][0]*scale || scale < .75) { + if (!ruleC || W < (ruleC.HW[0]||[0])[0]*scale || scale < .75) { HTMLCSS.createRule(rule,0,t,W); rule.bbox.h = -t; } else { HTMLCSS.createDelimiter(rule,HTMLCSS.FONTDATA.RULECHAR,W,scale); diff --git a/unpacked/jax/output/SVG/fonts/Asana-Math/fontdata.js b/unpacked/jax/output/SVG/fonts/Asana-Math/fontdata.js index 63c173182..a3b2b163d 100644 --- a/unpacked/jax/output/SVG/fonts/Asana-Math/fontdata.js +++ b/unpacked/jax/output/SVG/fonts/Asana-Math/fontdata.js @@ -21,7 +21,7 @@ (function (SVG,MML,AJAX,HUB) { - var VERSION = "2.6.0"; + var VERSION = "2.6.0"; var ALPHABETS = "AsanaMathJax_Alphabets", ARROWS = "AsanaMathJax_Arrows", @@ -138,7 +138,7 @@ offsetA: 0x1D670, offsetN: 0x1D7F6 }, - "-Asana-Math-variant": {fonts: [MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,VARIANTS,NONUNICODE,SIZE1]}, + "-Asana-Math-variant": {fonts: [MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,VARIANTS,NONUNICODE,SIZE1]}, "-tex-caligraphic": {offsetA: 0xE20A, noLowerCase: 1, fonts: [VARIANTS,MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,NONUNICODE,SIZE1], italic: true}, "-tex-oldstyle": {offsetN: 0xE200, fonts: [VARIANTS,MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,NONUNICODE,SIZE1]}, "-tex-caligraphic-bold": {offsetA: 0xE224, noLowerCase: 1, fonts: [VARIANTS,MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,NONUNICODE,SIZE1], italic: true, bold: true}, @@ -157,7 +157,7 @@ remap: {0x03F5: 52, 0x03D1: 53, 0x03F0: 54, 0x03D5: 55, 0x03F1: 56, 0x03D6: 57, 0x03F4: 17}} ], - RULECHAR: 0x0305, + RULECHAR: 0x2212, REMAP: { 0x25C2: 0x25C0, @@ -205,7 +205,7 @@ HW: [[941,MAIN], [1471,SIZE1], [2041,SIZE2], [2552,SIZE3], [2615,SIZE3,1.025]], stretch: {bot:[0x23A0,SYMBOLS], ext:[0x239F,SYMBOLS], top:[0x239E,SYMBOLS]} }, - 0x2D: {alias: 0x305, dir: H}, + 0x2D: {alias: 0x2212, dir: H}, 0x2F: {alias: 0x2044, dir: H}, 0x3D: { @@ -251,9 +251,9 @@ stretch: {bot:[0x23AD,SYMBOLS], ext:[0x23AA,SYMBOLS], mid:[0x23AC,SYMBOLS], top:[0x23AB,SYMBOLS]} }, 0x7E: {alias: 0x303, dir: H}, - 0xAF: {alias: 0x305, dir: H}, + 0xAF: {alias: 0x2212, dir: H}, 0x2C6: {alias: 0x302, dir: H}, - 0x2C9: {alias: 0x305, dir: H}, + 0x2C9: {alias: 0x2212, dir: H}, 0x2DC: {alias: 0x303, dir: H}, 0x302: { @@ -285,15 +285,15 @@ }, 0x333: EXTRAH, 0x33F: EXTRAH, - 0x2015: {alias: 0x305, dir: H}, + 0x2015: {alias: 0x2212, dir: H}, 0x2016: { dir: V, HW: [[885,MAIN], [1275,SIZE1], [1555,SIZE2], [1897,SIZE3], [2315,SIZE4]], stretch: {ext:[0xE005,SIZE6], top:[0xE005,SIZE6]} }, - 0x2017: {alias: 0x305, dir: H}, - 0x203E: {alias: 0x305, dir: H}, + 0x2017: {alias: 0x2212, dir: H}, + 0x203E: {alias: 0x2212, dir: H}, 0x2044: { dir: V, @@ -402,7 +402,10 @@ }, 0x2210: EXTRAV, 0x2211: EXTRAV, - 0x2212: {alias: 0x305, dir: H}, + 0x2212: { + dir: H, HW: [], + stretch: {rep:[0x2212,MAIN,0,0,0,-.23,-.23]} + }, 0x2215: {alias: 0x2044, dir: V}, 0x221A: { @@ -503,7 +506,7 @@ }, 0x23E0: EXTRAH, 0x23E1: EXTRAH, - 0x2500: {alias: 0x305, dir: H}, + 0x2500: {alias: 0x2212, dir: H}, 0x2758: {alias: 0x2223, dir: V}, 0x27C5: { @@ -590,6 +593,10 @@ } }); + MathJax.Hub.Register.LoadHook(SVG.fontDir+"/Main/Regular/Main.js",function () { + SVG.FONTDATA.FONTS[MAIN][0x2212][0] = SVG.FONTDATA.FONTS[MAIN][0x002B][0]; // - needs height and depth of + + SVG.FONTDATA.FONTS[MAIN][0x2212][1] = SVG.FONTDATA.FONTS[MAIN][0x002B][1]; // - needs height and depth of + + }); MathJax.Hub.Register.LoadHook(SVG.fontDir+"/Size6/Regular/Main.js",function () { var u; u = SVG.FONTDATA.DELIMITERS[0x23DE].stretch.rep[0]; diff --git a/unpacked/jax/output/SVG/fonts/Gyre-Pagella/fontdata.js b/unpacked/jax/output/SVG/fonts/Gyre-Pagella/fontdata.js index 2c294921f..7d1aa7852 100644 --- a/unpacked/jax/output/SVG/fonts/Gyre-Pagella/fontdata.js +++ b/unpacked/jax/output/SVG/fonts/Gyre-Pagella/fontdata.js @@ -21,7 +21,7 @@ (function (SVG,MML,AJAX,HUB) { - var VERSION = "2.6.0"; + var VERSION = "2.6.0"; var ALPHABETS = "GyrePagellaMathJax_Alphabets", ARROWS = "GyrePagellaMathJax_Arrows", @@ -138,7 +138,7 @@ offsetA: 0x1D670, offsetN: 0x1D7F6 }, - "-Gyre-Pagella-variant": {fonts: [VARIANTS,MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,NONUNICODE,SIZE1]}, + "-Gyre-Pagella-variant": {fonts: [VARIANTS,MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,NONUNICODE,SIZE1]}, "-tex-caligraphic": {fonts: [MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,VARIANTS,NONUNICODE,SIZE1], italic: true}, "-tex-oldstyle": {fonts: [MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,VARIANTS,NONUNICODE,SIZE1]}, "-tex-caligraphic-bold": {fonts: [MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,VARIANTS,NONUNICODE,SIZE1], italic: true, bold: true}, @@ -157,7 +157,7 @@ remap: {0x03F5: 52, 0x03D1: 53, 0x03F0: 54, 0x03D5: 55, 0x03F1: 56, 0x03D6: 57, 0x03F4: 17}} ], - RULECHAR: 0x0305, + RULECHAR: 0x2212, REMAP: { 0x25C2: 0x25C0, @@ -204,7 +204,7 @@ HW: [[828,MAIN], [988,SIZE1], [1180,SIZE2], [1410,SIZE3], [1686,SIZE4], [2017,SIZE5], [2416,SIZE6], [2612,SIZE6,1.081]], stretch: {bot:[0x23A0,SYMBOLS], ext:[0x239F,SYMBOLS], top:[0x239E,SYMBOLS]} }, - 0x2D: {alias: 0x305, dir: H}, + 0x2D: {alias: 0x2212, dir: H}, 0x2F: { dir: V, @@ -256,7 +256,7 @@ 0x7E: {alias: 0x303, dir: H}, 0xAF: {alias: 0x332, dir: H}, 0x2C6: {alias: 0x302, dir: H}, - 0x2C9: {alias: 0x305, dir: H}, + 0x2C9: {alias: 0x2212, dir: H}, 0x2DC: {alias: 0x303, dir: H}, 0x302: { @@ -294,15 +294,15 @@ }, 0x333: EXTRAH, 0x33F: EXTRAH, - 0x2015: {alias: 0x305, dir: H}, + 0x2015: {alias: 0x2212, dir: H}, 0x2016: { dir: V, HW: [[800,MAIN], [960,SIZE1], [1152,SIZE2], [1382,SIZE3], [1658,SIZE4], [1990,SIZE5], [2388,SIZE6]], stretch: {bot:[0xE12A,SIZE6], ext:[0xE12B,SIZE6], top:[0xE12C,SIZE6]} }, - 0x2017: {alias: 0x305, dir: H}, - 0x203E: {alias: 0x305, dir: H}, + 0x2017: {alias: 0x2212, dir: H}, + 0x203E: {alias: 0x2212, dir: H}, 0x2044: { dir: V, @@ -473,9 +473,8 @@ 0x2211: EXTRAV, 0x2212: { - dir: H, - HW: [[600,MAIN]], - stretch: {left:[0xE127,SIZE6], rep:[0xE128,SIZE6], right:[0xE129,SIZE6]} + HW: [], + stretch: {rep:[0x2212,MAIN,0,0,0,-.27,-.28]} }, 0x2215: {alias: 0x2044, dir: V}, 0x221A: @@ -558,7 +557,7 @@ HW: [[596,SYMBOLS]], stretch: {ext:[0x23AA,SYMBOLS]} }, - 0x23AF: {alias: 0x305, dir: H}, + 0x23AF: {alias: 0x2212, dir: H}, 0x23B0: { dir: V, @@ -595,7 +594,7 @@ }, 0x23E0: EXTRAH, 0x23E1: EXTRAH, - 0x2500: {alias: 0x305, dir: H}, + 0x2500: {alias: 0x2212, dir: H}, 0x27A1: EXTRAH, 0x27E6: EXTRAV, 0x27E7: EXTRAV, @@ -670,6 +669,10 @@ } }); + MathJax.Hub.Register.LoadHook(SVG.fontDir+"/Main/Regular/Main.js",function () { + SVG.FONTDATA.FONTS[MAIN][0x2212][0] = SVG.FONTDATA.FONTS[MAIN][0x002B][0]; // - needs height and depth of + + SVG.FONTDATA.FONTS[MAIN][0x2212][1] = SVG.FONTDATA.FONTS[MAIN][0x002B][1]; // - needs height and depth of + + }); MathJax.Hub.Register.LoadHook(SVG.fontDir+"/Size1/Regular/Main.js",function () { var i; for (i = 0x222B; i <= 0x222D; i++) diff --git a/unpacked/jax/output/SVG/fonts/Gyre-Termes/fontdata.js b/unpacked/jax/output/SVG/fonts/Gyre-Termes/fontdata.js index ff67c7956..8bfd7eaf3 100644 --- a/unpacked/jax/output/SVG/fonts/Gyre-Termes/fontdata.js +++ b/unpacked/jax/output/SVG/fonts/Gyre-Termes/fontdata.js @@ -21,7 +21,7 @@ (function (SVG,MML,AJAX,HUB) { - var VERSION = "2.6.0"; + var VERSION = "2.6.0"; var ALPHABETS = "GyreTermesMathJax_Alphabets", ARROWS = "GyreTermesMathJax_Arrows", @@ -138,7 +138,7 @@ offsetA: 0x1D670, offsetN: 0x1D7F6 }, - "-Gyre-Termes-variant": {fonts: [VARIANTS,MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,NONUNICODE,SIZE1]}, + "-Gyre-Termes-variant": {fonts: [VARIANTS,MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,NONUNICODE,SIZE1]}, "-tex-caligraphic": {fonts: [MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,VARIANTS,NONUNICODE,SIZE1], italic: true}, "-tex-oldstyle": {fonts: [MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,VARIANTS,NONUNICODE,SIZE1]}, "-tex-caligraphic-bold": {fonts: [MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,VARIANTS,NONUNICODE,SIZE1], italic: true, bold: true}, @@ -157,7 +157,7 @@ remap: {0x03F5: 52, 0x03D1: 53, 0x03F0: 54, 0x03D5: 55, 0x03F1: 56, 0x03D6: 57, 0x03F4: 17}} ], - RULECHAR: 0x0305, + RULECHAR: 0x2212, REMAP: { 0x25C2: 0x25C0, @@ -204,7 +204,7 @@ HW: [[816,MAIN], [976,SIZE1], [1168,SIZE2], [1398,SIZE3], [1674,SIZE4], [2005,SIZE5], [2404,SIZE6], [2780,SIZE6,1.157]], stretch: {bot:[0x23A0,SYMBOLS], ext:[0x239F,SYMBOLS], top:[0x239E,SYMBOLS]} }, - 0x2D: {alias: 0x305, dir: H}, + 0x2D: {alias: 0x2212, dir: H}, 0x2F: { dir: V, @@ -256,7 +256,7 @@ 0x7E: {alias: 0x303, dir: H}, 0xAF: {alias: 0x332, dir: H}, 0x2C6: {alias: 0x302, dir: H}, - 0x2C9: {alias: 0x305, dir: H}, + 0x2C9: {alias: 0x2212, dir: H}, 0x2DC: {alias: 0x303, dir: H}, 0x302: { @@ -294,15 +294,15 @@ }, 0x333: EXTRAH, 0x33F: EXTRAH, - 0x2015: {alias: 0x305, dir: H}, + 0x2015: {alias: 0x2212, dir: H}, 0x2016: { dir: V, HW: [[800,MAIN], [960,SIZE1], [1152,SIZE2], [1382,SIZE3], [1658,SIZE4], [1990,SIZE5], [2388,SIZE6]], stretch: {bot:[0xE12A,SIZE6], ext:[0xE12B,SIZE6], top:[0xE12C,SIZE6]} }, - 0x2017: {alias: 0x305, dir: H}, - 0x203E: {alias: 0x305, dir: H}, + 0x2017: {alias: 0x2212, dir: H}, + 0x203E: {alias: 0x2212, dir: H}, 0x2044: { dir: V, @@ -473,9 +473,8 @@ 0x2211: EXTRAV, 0x2212: { - dir: H, - HW: [[500,MAIN]], - stretch: {left:[0xE127,SIZE6], rep:[0xE128,SIZE6], right:[0xE129,SIZE6]} + HW: [], + stretch: {rep:[0x2212,MAIN,0,0,0,-.224,-.224]} }, 0x2215: {alias: 0x2044, dir: V}, 0x221A: @@ -558,7 +557,7 @@ HW: [[596,SYMBOLS]], stretch: {ext:[0x23AA,SYMBOLS]} }, - 0x23AF: {alias: 0x305, dir: H}, + 0x23AF: {alias: 0x2212, dir: H}, 0x23B0: { dir: V, @@ -595,7 +594,7 @@ }, 0x23E0: EXTRAH, 0x23E1: EXTRAH, - 0x2500: {alias: 0x305, dir: H}, + 0x2500: {alias: 0x2212, dir: H}, 0x27A1: EXTRAH, 0x27E6: EXTRAV, 0x27E7: EXTRAV, @@ -670,6 +669,10 @@ } }); + MathJax.Hub.Register.LoadHook(SVG.fontDir+"/Main/Regular/Main.js",function () { + SVG.FONTDATA.FONTS[MAIN][0x2212][0] = SVG.FONTDATA.FONTS[MAIN][0x002B][0]; // - needs height and depth of + + SVG.FONTDATA.FONTS[MAIN][0x2212][1] = SVG.FONTDATA.FONTS[MAIN][0x002B][1]; // - needs height and depth of + + }); MathJax.Hub.Register.LoadHook(SVG.fontDir+"/Size1/Regular/Main.js",function () { var i; for (i = 0x222B; i <= 0x222D; i++) diff --git a/unpacked/jax/output/SVG/fonts/Latin-Modern/fontdata.js b/unpacked/jax/output/SVG/fonts/Latin-Modern/fontdata.js index 0eacda78a..f0966ad4f 100644 --- a/unpacked/jax/output/SVG/fonts/Latin-Modern/fontdata.js +++ b/unpacked/jax/output/SVG/fonts/Latin-Modern/fontdata.js @@ -21,7 +21,7 @@ (function (SVG,MML,AJAX,HUB) { - var VERSION = "2.6.0"; + var VERSION = "2.6.0"; var ALPHABETS = "LatinModernMathJax_Alphabets", ARROWS = "LatinModernMathJax_Arrows", @@ -140,7 +140,7 @@ offsetA: 0x1D670, offsetN: 0x1D7F6 }, - "-Latin-Modern-variant": {fonts: [VARIANTS,MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,NONUNICODE,SIZE1]}, + "-Latin-Modern-variant": {fonts: [VARIANTS,MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,NONUNICODE,SIZE1]}, "-tex-caligraphic": {fonts: [MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,VARIANTS,NONUNICODE,SIZE1], italic: true}, "-tex-oldstyle": {fonts: [MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,VARIANTS,NONUNICODE,SIZE1]}, "-tex-caligraphic-bold": {fonts: [MAIN,NORMAL,MONOSPACE,LATIN,ALPHABETS,MARKS,ARROWS,OPERATORS,SYMBOLS,SHAPES,MISC,VARIANTS,NONUNICODE,SIZE1], italic: true, bold: true}, @@ -159,7 +159,7 @@ remap: {0x03F5: 52, 0x03D1: 53, 0x03F0: 54, 0x03D5: 55, 0x03F1: 56, 0x03D6: 57, 0x03F4: 17}} ], - RULECHAR: 0x0305, + RULECHAR: 0x2212, REMAP: { 0x25C2: 0x25C0, @@ -206,7 +206,7 @@ HW: [[996,MAIN], [1094,SIZE1], [1194,SIZE2], [1444,SIZE3], [1792,SIZE4], [2092,SIZE5], [2392,SIZE6], [2990,SIZE7]], stretch: {bot:[0x23A0,SYMBOLS], ext:[0x239F,SYMBOLS], top:[0x239E,SYMBOLS]} }, - 0x2D: {alias: 0x305, dir: H}, + 0x2D: {alias: 0x2212, dir: H}, 0x2F: { dir: V, @@ -258,7 +258,7 @@ 0x7E: {alias: 0x303, dir: H}, 0xAF: {alias: 0x332, dir: H}, 0x2C6: {alias: 0x302, dir: H}, - 0x2C9: {alias: 0x305, dir: H}, + 0x2C9: {alias: 0x2212, dir: H}, 0x2DC: {alias: 0x303, dir: H}, 0x302: { @@ -270,11 +270,10 @@ dir: H, HW: [[370,MAIN], [652,SIZE1], [778,SIZE2], [931,SIZE3], [1115,SIZE4], [1335,SIZE5], [1599,SIZE6], [1915,SIZE7]] }, - 0x305: + 0x2212: { - dir: H, - HW: [[392,MARKS], [568,SIZE1]], - stretch: {left:[0xE0FB,SIZE7], rep:[0xE0FC,SIZE7], right:[0xE0FD,SIZE7]} + HW: [], + stretch: {rep:[0x2212,MAIN,0,0,0,-.31,-.31]} }, 0x306: EXTRAH, 0x30C: @@ -296,15 +295,15 @@ }, 0x333: EXTRAH, 0x33F: EXTRAH, - 0x2015: {alias: 0x305, dir: H}, + 0x2015: {alias: 0x2212, dir: H}, 0x2016: { dir: V, HW: [[1000,MAIN], [1202,SIZE1], [1444,SIZE2], [1734,SIZE3], [2084,SIZE4], [2502,SIZE5], [3004,SIZE6], [3606,SIZE7]], stretch: {bot:[0xE12A,SIZE7], ext:[0xE12B,SIZE7], top:[0xE12C,SIZE7]} }, - 0x2017: {alias: 0x305, dir: H}, - 0x203E: {alias: 0x305, dir: H}, + 0x2017: {alias: 0x2212, dir: H}, + 0x203E: {alias: 0x2212, dir: H}, 0x2044: { dir: V, @@ -555,7 +554,7 @@ HW: [[748,SYMBOLS]], stretch: {ext:[0x23AA,SYMBOLS]} }, - 0x23AF: {alias: 0x305, dir: H}, + 0x23AF: {alias: 0x2212, dir: H}, 0x23B0: { dir: V, @@ -592,7 +591,7 @@ }, 0x23E0: EXTRAH, 0x23E1: EXTRAH, - 0x2500: {alias: 0x305, dir: H}, + 0x2500: {alias: 0x2212, dir: H}, 0x27A1: EXTRAH, 0x27E6: EXTRAV, 0x27E7: EXTRAV, @@ -667,6 +666,10 @@ } }); + MathJax.Hub.Register.LoadHook(SVG.fontDir+"/Main/Regular/Main.js",function () { + SVG.FONTDATA.FONTS[MAIN][0x2212][0] = SVG.FONTDATA.FONTS[MAIN][0x002B][0]; // - needs height and depth of + + SVG.FONTDATA.FONTS[MAIN][0x2212][1] = SVG.FONTDATA.FONTS[MAIN][0x002B][1]; // - needs height and depth of + + }); MathJax.Hub.Register.LoadHook(SVG.fontDir+"/Size7/Regular/Main.js",function () { var u; u = SVG.FONTDATA.DELIMITERS[0x23DE].stretch.rep[0]; diff --git a/unpacked/jax/output/SVG/fonts/Neo-Euler/fontdata.js b/unpacked/jax/output/SVG/fonts/Neo-Euler/fontdata.js index 9f76bccab..113e7b91d 100644 --- a/unpacked/jax/output/SVG/fonts/Neo-Euler/fontdata.js +++ b/unpacked/jax/output/SVG/fonts/Neo-Euler/fontdata.js @@ -21,7 +21,7 @@ (function (SVG,MML,AJAX,HUB) { - var VERSION = "2.6.0"; + var VERSION = "2.6.0"; var ALPHABETS = "NeoEulerMathJax_Alphabets", ARROWS = "NeoEulerMathJax_Arrows", @@ -148,7 +148,7 @@ remap: {0x03F5: 52, 0x03D1: 53, 0x03F0: 54, 0x03D5: 55, 0x03F1: 56, 0x03D6: 57, 0x03F4: 17}} ], - RULECHAR: 0x00AF, + RULECHAR: 0x2212, REMAP: { 0x20F0: 0x002A, @@ -338,7 +338,11 @@ 0x220F: EXTRAV, 0x2210: EXTRAV, 0x2211: EXTRAV, - 0x2212: {alias: 0xAF, dir: H}, + 0x2212: { + dir: H, + HW: [], + stretch: {rep:[0x2212,MAIN,0,0,0,-.31,-.31]} + }, 0x2215: { dir: V, @@ -483,6 +487,10 @@ } }); + MathJax.Hub.Register.LoadHook(SVG.fontDir+"/Main/Regular/Main.js",function () { + SVG.FONTDATA.FONTS[MAIN][0x2212][0] = SVG.FONTDATA.FONTS[MAIN][0x002B][0]; // - needs height and depth of + + SVG.FONTDATA.FONTS[MAIN][0x2212][1] = SVG.FONTDATA.FONTS[MAIN][0x002B][1]; // - needs height and depth of + + }); MathJax.Hub.Register.LoadHook(SVG.fontDir+"/Size5/Regular/Main.js",function () { var u; u = SVG.FONTDATA.DELIMITERS[0x23DE].stretch.rep[0]; diff --git a/unpacked/jax/output/SVG/fonts/STIX-Web/fontdata-extra.js b/unpacked/jax/output/SVG/fonts/STIX-Web/fontdata-extra.js index 44bb64fd7..db3053663 100644 --- a/unpacked/jax/output/SVG/fonts/STIX-Web/fontdata-extra.js +++ b/unpacked/jax/output/SVG/fonts/STIX-Web/fontdata-extra.js @@ -25,6 +25,7 @@ var DELIMITERS = SVG.FONTDATA.DELIMITERS; var H = "H", V = "V"; + var ARROWREP = [0x2212,MAIN,0,0,0,-.26,-.26]; var ALPHABETSBOLDITALIC = "STIXMathJax_Alphabets-bold-italic", ALPHABETSBOLD = "STIXMathJax_Alphabets-bold", @@ -162,7 +163,7 @@ { dir: H, HW: [[786,MAIN]], - stretch: {left:[0x219E,MAIN], rep:[0x2212,MAIN]} + stretch: {left:[0x219E,MAIN], rep:ARROWREP} }, 0x219F: { @@ -174,7 +175,7 @@ { dir: H, HW: [[786,MAIN]], - stretch: {right:[0x21A0,MAIN], rep:[0x2212,MAIN]} + stretch: {right:[0x21A0,MAIN], rep:ARROWREP} }, 0x21A1: { @@ -216,13 +217,13 @@ { dir: H, HW: [[786,MAIN]], - stretch: {left:[0x2190,MAIN], rep:[0x2212,MAIN], right:[0xE0B5,ARROWS]} + stretch: {left:[0x2190,MAIN], rep:ARROWREP, right:[0xE0B5,ARROWS]} }, 0x21AA: { dir: H, HW: [[786,MAIN]], - stretch: {left:[0xE0B4,ARROWS], rep:[0x2212,MAIN], right:[0x2192,MAIN]} + stretch: {left:[0xE0B4,ARROWS], rep:ARROWREP, right:[0x2192,MAIN]} }, 0x21B0: { @@ -294,7 +295,7 @@ { dir: H, HW: [[847,MAIN]], - stretch: {right:[0x21C1,MAIN], rep:[0x2212,MAIN]} + stretch: {right:[0x21C1,MAIN], rep:ARROWREP} }, 0x21C2: { @@ -360,31 +361,31 @@ { dir: H, HW: [[806,ARROWS]], - stretch: {left:[0x21E4,ARROWS], rep:[0x2212,MAIN]} + stretch: {left:[0x21E4,ARROWS], rep:ARROWREP} }, 0x21E5: { dir: H, HW: [[806,ARROWS]], - stretch: {right:[0x21E5,ARROWS], rep:[0x2212,MAIN]} + stretch: {right:[0x21E5,ARROWS], rep:ARROWREP} }, 0x21FD: { dir: H, HW: [[806,ARROWS]], - stretch: {left:[0x21FD,ARROWS], rep:[0x2212,MAIN]} + stretch: {left:[0x21FD,ARROWS], rep:ARROWREP} }, 0x21FE: { dir: H, HW: [[806,ARROWS]], - stretch: {right:[0x21FE,ARROWS], rep:[0x2212,MAIN]} + stretch: {right:[0x21FE,ARROWS], rep:ARROWREP} }, 0x21FF: { dir: H, HW: [[886,ARROWS]], - stretch: {left:[0x21FD,ARROWS], rep:[0x2212,MAIN], right:[0x21FE,ARROWS]} + stretch: {left:[0x21FD,ARROWS], rep:ARROWREP, right:[0x21FE,ARROWS]} }, 0x220F: { @@ -609,7 +610,7 @@ { dir: H, HW: [[850,ARROWS]], - stretch: {left:[0x21BC,MAIN], rep:[0x2212,MAIN], right:[0x21C0,MAIN]} + stretch: {left:[0x21BC,MAIN], rep:ARROWREP, right:[0x21C0,MAIN]} }, 0x294F: { @@ -621,7 +622,7 @@ { dir: H, HW: [[850,ARROWS]], - stretch: {left:[0x21BD,MAIN], rep:[0x2212,MAIN], right:[0x21C1,MAIN]} + stretch: {left:[0x21BD,MAIN], rep:ARROWREP, right:[0x21C1,MAIN]} }, 0x2951: { @@ -633,13 +634,13 @@ { dir: H, HW: [[816,ARROWS]], - stretch: {left:[0x2952,ARROWS], rep:[0x2212,MAIN]} + stretch: {left:[0x2952,ARROWS], rep:ARROWREP} }, 0x2953: { dir: H, HW: [[816,ARROWS]], - stretch: {right:[0x2953,ARROWS], rep:[0x2212,MAIN]} + stretch: {right:[0x2953,ARROWS], rep:ARROWREP} }, 0x2954: { @@ -657,13 +658,13 @@ { dir: H, HW: [[816,ARROWS]], - stretch: {left:[0x2956,ARROWS], rep:[0x2212,MAIN]} + stretch: {left:[0x2956,ARROWS], rep:ARROWREP} }, 0x2957: { dir: H, HW: [[816,ARROWS]], - stretch: {right:[0x2957,ARROWS], rep:[0x2212,MAIN]} + stretch: {right:[0x2957,ARROWS], rep:ARROWREP} }, 0x2958: { @@ -681,13 +682,13 @@ { dir: H, HW: [[816,ARROWS]], - stretch: {left:[0x21BC,MAIN], rep:[0x2212,MAIN], right:[0x22A3,MAINBOLD,0.000,0.100,0.600]} + stretch: {left:[0x21BC,MAIN], rep:ARROWREP, right:[0x22A3,MAINBOLD,0.000,0.100,0.600]} }, 0x295B: { dir: H, HW: [[816,ARROWS]], - stretch: {left:[0xE0B6,ARROWS], rep:[0x2212,MAIN], right:[0x21C0,MAIN]} + stretch: {left:[0xE0B6,ARROWS], rep:ARROWREP, right:[0x21C0,MAIN]} }, 0x295C: { @@ -705,13 +706,13 @@ { dir: H, HW: [[816,ARROWS]], - stretch: {left:[0x21BD,MAIN], rep:[0x2212,MAIN], right:[0x22A3,MAINBOLD,0.000,0.100,0.600]} + stretch: {left:[0x21BD,MAIN], rep:ARROWREP, right:[0x22A3,MAINBOLD,0.000,0.100,0.600]} }, 0x295F: { dir: H, HW: [[816,ARROWS]], - stretch: {left:[0xE0B6,ARROWS], rep:[0x2212,MAIN], right:[0x21C1,MAIN]} + stretch: {left:[0xE0B6,ARROWS], rep:ARROWREP, right:[0x21C1,MAIN]} }, 0x2960: { diff --git a/unpacked/jax/output/SVG/fonts/STIX-Web/fontdata.js b/unpacked/jax/output/SVG/fonts/STIX-Web/fontdata.js index 86878424a..8f5eebf0b 100644 --- a/unpacked/jax/output/SVG/fonts/STIX-Web/fontdata.js +++ b/unpacked/jax/output/SVG/fonts/STIX-Web/fontdata.js @@ -21,7 +21,7 @@ (function (SVG,MML,AJAX,HUB) { - var VERSION = "2.6.0"; + var VERSION = "2.6.0"; var ALPHABETSBOLDITALIC = "STIXMathJax_Alphabets-bold-italic", ALPHABETSBOLD = "STIXMathJax_Alphabets-bold", @@ -80,6 +80,7 @@ VARIANTS = "STIXMathJax_Variants"; var H = "H", V = "V", EXTRAH = {load:"extra", dir:H}, EXTRAV = {load:"extra", dir:V}; + var ARROWREP = [0x2212,MAIN,0,0,0,-.26,-.26]; SVG.Augment({ FONTDATA: { @@ -396,7 +397,7 @@ { dir: H, HW: [[786,MAIN]], - stretch: {left:[0x2190,MAIN], rep:[0x23AF,SYMBOLS]} + stretch: {left:[0x2190,MAIN], rep:ARROWREP} }, 0x2191: { @@ -408,7 +409,7 @@ { dir: H, HW: [[786,MAIN]], - stretch: {rep:[0x23AF,SYMBOLS], right:[0x2192,MAIN]} + stretch: {rep:ARROWREP, right:[0x2192,MAIN]} }, 0x2193: { @@ -420,7 +421,7 @@ { dir: H, HW: [[850,MAIN]], - stretch: {left:[0x2190,MAIN], rep:[0x23AF,SYMBOLS], right:[0x2192,MAIN]} + stretch: {left:[0x2190,MAIN], rep:ARROWREP, right:[0x2192,MAIN]} }, 0x2195: { @@ -741,7 +742,8 @@ MathJax.Hub.Register.LoadHook(SVG.fontDir+"/Main/Regular/Main.js",function () { SVG.FONTDATA.FONTS[MAIN][0x22EE][0] += 400; // adjust height for \vdots SVG.FONTDATA.FONTS[MAIN][0x22F1][0] += 500; // adjust height for \ddots - SVG.FONTDATA.FONTS[MAIN][0x2212][1] += 100; // adjust depth for minus (arrow extender) + SVG.FONTDATA.FONTS[MAIN][0x2212][0] = SVG.FONTDATA.FONTS[MAIN][0x002B][0]; // - needs height and depth of + + SVG.FONTDATA.FONTS[MAIN][0x2212][1] = SVG.FONTDATA.FONTS[MAIN][0x002B][1]; // - needs height and depth of + SVG.FONTDATA.FONTS[MAIN][0x003D][1] += 100; // adjust depth for = (double arrow extender) }); MathJax.Hub.Register.LoadHook(SVG.fontDir+"/Size5/Regular/Main.js",function () { diff --git a/unpacked/jax/output/SVG/fonts/TeX/fontdata-extra.js b/unpacked/jax/output/SVG/fonts/TeX/fontdata-extra.js index c80cc2d8f..0390c4d5f 100644 --- a/unpacked/jax/output/SVG/fonts/TeX/fontdata-extra.js +++ b/unpacked/jax/output/SVG/fonts/TeX/fontdata-extra.js @@ -35,6 +35,8 @@ SIZE1 = "MathJax_Size1", SIZE4 = "MathJax_Size4"; var H = "H", V = "V"; + var ARROWREP = [0x2212,MAIN,0,0,0,-.31,-.31]; // add depth for arrow extender + var DARROWREP = [0x3D,MAIN,0,0,0,0,.1]; // add depth for arrow extender var delim = { 0x003D: // equal sign @@ -43,16 +45,16 @@ }, 0x219E: // left two-headed arrow { - dir: H, HW: [[1000,AMS]], stretch: {left:[0x219E,AMS], rep:[0x2212,MAIN]} + dir: H, HW: [[1000,AMS]], stretch: {left:[0x219E,AMS], rep:ARROWREP} }, 0x21A0: // right two-headed arrow { - dir: H, HW: [[1000,AMS]], stretch: {right:[0x21A0,AMS], rep:[0x2212,MAIN]} + dir: H, HW: [[1000,AMS]], stretch: {right:[0x21A0,AMS], rep:ARROWREP} }, 0x21A4: // left arrow from bar { dir: H, HW: [], - stretch: {min:1, left:[0x2190,MAIN], rep:[0x2212,MAIN], right:[0x2223,SIZE1,0,-.05,.9]} + stretch: {min:1, left:[0x2190,MAIN], rep:ARROWREP, right:[0x2223,SIZE1,0,-.05,.9]} }, 0x21A5: // up arrow from bar { @@ -62,7 +64,7 @@ 0x21A6: // right arrow from bar { dir: H, HW: [[1000,MAIN]], - stretch: {left:[0x2223,SIZE1,-.09,-.05,.9], rep:[0x2212,MAIN], right:[0x2192,MAIN]} + stretch: {left:[0x2223,SIZE1,-.09,-.05,.9], rep:ARROWREP, right:[0x2192,MAIN]} }, 0x21A7: // down arrow from bar { @@ -82,12 +84,12 @@ 0x21BC: // left harpoon with barb up { dir: H, HW: [[1000,MAIN]], - stretch: {left:[0x21BC,MAIN], rep:[0x2212,MAIN]} + stretch: {left:[0x21BC,MAIN], rep:ARROWREP} }, 0x21BD: // left harpoon with barb down { dir: H, HW: [[1000,MAIN]], - stretch: {left:[0x21BD,MAIN], rep:[0x2212,MAIN]} + stretch: {left:[0x21BD,MAIN], rep:ARROWREP} }, 0x21BE: // up harpoon with barb right { @@ -102,12 +104,12 @@ 0x21C0: // right harpoon with barb up { dir: H, HW: [[1000,MAIN]], - stretch: {right:[0x21C0,MAIN], rep:[0x2212,MAIN]} + stretch: {right:[0x21C0,MAIN], rep:ARROWREP} }, 0x21C1: // right harpoon with barb down { dir: H, HW: [[1000,MAIN]], - stretch: {right:[0x21C1,MAIN], rep:[0x2212,MAIN]} + stretch: {right:[0x21C1,MAIN], rep:ARROWREP} }, 0x21C2: // down harpoon with barb right { @@ -162,17 +164,17 @@ 0x2906: // leftwards double arrow from bar { dir: H, HW: [], - stretch: {min:1, left:[0x21D0,MAIN], rep:[0x3D,MAIN], right:[0x2223,SIZE1,0,-.1]} + 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:[0x3D,MAIN], right:[0x21D2,MAIN]} + 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:[0x2212,MAIN], right:[0x21C0,MAIN]} + stretch: {min:.5, left:[0x21BC,MAIN], rep:ARROWREP, right:[0x21C0,MAIN]} }, 0x294F: // up barb right down barb right harpoon { @@ -182,7 +184,7 @@ 0x2950: // left barb dow right barb down harpoon { dir: H, HW: [], - stretch: {min:.5, left:[0x21BD,MAIN], rep:[0x2212,MAIN], right:[0x21C1,MAIN]} + stretch: {min:.5, left:[0x21BD,MAIN], rep:ARROWREP, right:[0x21C1,MAIN]} }, 0x2951: // up barb left down barb left harpoon { @@ -192,12 +194,12 @@ 0x295A: // leftwards harpoon with barb up from bar { dir: H, HW: [], - stretch: {min:1, left:[0x21BC,MAIN], rep:[0x2212,MAIN], right:[0x2223,SIZE1,0,-.05,.9]} + 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:[0x2212,MAIN], right:[0x21C0,MAIN]} + stretch: {min:1, left:[0x2223,SIZE1,-.05,-.05,.9], rep:ARROWREP, right:[0x21C0,MAIN]} }, 0x295C: // up harpoon with barb right from bar { @@ -212,12 +214,12 @@ 0x295E: // leftwards harpoon with barb down from bar { dir: H, HW: [], - stretch: {min:1, left:[0x21BD,MAIN], rep:[0x2212,MAIN], right:[0x2223,SIZE1,0,-.05,.9]} + 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:[0x2212,MAIN], right:[0x21C1,MAIN]} + stretch: {min:1, left:[0x2223,SIZE1,-.05,-.05,.9], rep:ARROWREP, right:[0x21C1,MAIN]} }, 0x2960: // up harpoon with barb left from bar { diff --git a/unpacked/jax/output/SVG/fonts/TeX/fontdata.js b/unpacked/jax/output/SVG/fonts/TeX/fontdata.js index 1d6c89565..c9fa2f51f 100644 --- a/unpacked/jax/output/SVG/fonts/TeX/fontdata.js +++ b/unpacked/jax/output/SVG/fonts/TeX/fontdata.js @@ -38,8 +38,8 @@ SIZE4 = "MathJax_Size4"; var H = "H", V = "V", EXTRAH = {load:"extra", dir:H}, EXTRAV = {load:"extra", dir:V}; var STDHW = [[1000,MAIN],[1200,SIZE1],[1800,SIZE2],[2400,SIZE3],[3000,SIZE4]]; - var ARROWREP = [0x2212,MAIN,0,0,0,0,.1]; // add depth for arrow extender - var DARROWREP = [0x3D,MAIN,0,0,0,0,.1]; // add depth for arrow extender + var ARROWREP = [0x2212,MAIN,0,0,0,-.31,-.31]; // add depth for arrow extender + var DARROWREP = [0x3D,MAIN,0,0,0,0,.1]; // add depth for arrow extender SVG.Augment({ FONTDATA: { @@ -368,6 +368,10 @@ { dir: H, HW: [[333+250,MAIN],[555+250,SIZE1],[1000+330,SIZE2],[1443+330,SIZE3],[1887,SIZE4]] }, + 0x2013: // en-dash + { + dir: H, HW: [[500,MAIN]], stretch: {rep:[0x2013,MAIN]} + }, 0x2016: // vertical arrow extension { dir: V, HW: [[602,SIZE1],[1000,MAIN,null,0x2225]], stretch: {ext:[0x2225,MAIN]} @@ -426,8 +430,8 @@ }, 0x2212: // horizontal line { - dir: H, HW: [[778,MAIN]], stretch: {rep:[0x2212,MAIN], fuzz:300} - }, + dir: H, HW: [[.5,MAIN,0,0x2013]], stretch: {rep:ARROWREP, fuzz:300} + }, 0x221A: // \surd { dir: V, HW: STDHW, @@ -513,8 +517,9 @@ 0x0303: {alias: 0x02DC, dir:H}, // wide tilde 0x030C: {alias: 0x02C7, dir:H}, // wide caron 0x0332: {alias: 0x2212, dir:H}, // combining low line - 0x2015: {alias: 0x2212, dir:H}, // horizontal line - 0x2017: {alias: 0x2212, dir:H}, // horizontal 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}, // over line 0x2215: {alias: 0x002F, dir:V}, // division slash 0x2329: {alias: 0x27E8, dir:V}, // langle @@ -1558,13 +1563,15 @@ 0x3F5: [431,11,406,40,382,'227 -11Q149 -11 95 41T40 174Q40 262 87 322Q121 367 173 396T287 430Q289 431 329 431H367Q382 426 382 411Q382 385 341 385H325H312Q191 385 154 277L150 265H327Q340 256 340 246Q340 228 320 219H138V217Q128 187 128 143Q128 77 160 52T231 26Q258 26 284 36T326 57T343 68Q350 68 354 58T358 39Q358 36 357 35Q354 31 337 21T289 0T227 -11'] }; - SVG.FONTDATA.FONTS['MathJax_Main'][0x22EE][0] += 400; // adjust height for \vdots - SVG.FONTDATA.FONTS['MathJax_Main'][0x22F1][0] += 700; // adjust height for \ddots + SVG.FONTDATA.FONTS[MAIN][0x2212][0] = SVG.FONTDATA.FONTS[MAIN][0x002B][0]; // minus is size + SVG.FONTDATA.FONTS[MAIN][0x2212][1] = SVG.FONTDATA.FONTS[MAIN][0x002B][1]; // minus is size + SVG.FONTDATA.FONTS[MAIN][0x22EE][0] += 400; // adjust height for \vdots + SVG.FONTDATA.FONTS[MAIN][0x22F1][0] += 700; // adjust height for \ddots // // Add some spacing characters (more will come later) // - MathJax.Hub.Insert(SVG.FONTDATA.FONTS['MathJax_Main'],{ + MathJax.Hub.Insert(SVG.FONTDATA.FONTS[MAIN],{ 0x2000: [0,0,500,0,0,{space:1}], // en quad 0x2001: [0,0,1000,0,0,{space:1}], // em quad 0x2002: [0,0,500,0,0,{space:1}], // en space @@ -1582,13 +1589,13 @@ HUB.Register.StartupHook("SVG Jax Require",function () { HUB.Register.LoadHook(SVG.fontDir+"/Size4/Regular/Main.js",function () { - SVG.FONTDATA.FONTS['MathJax_Size4'][0xE154][0] += 200; // adjust height for brace extender - SVG.FONTDATA.FONTS['MathJax_Size4'][0xE154][1] += 200; // adjust depth for brace extender + SVG.FONTDATA.FONTS[SIZE4][0xE154][0] += 200; // adjust height for brace extender + SVG.FONTDATA.FONTS[SIZE4][0xE154][1] += 200; // adjust depth for brace extender }); - SVG.FONTDATA.FONTS['MathJax_Main'][0x2245][2] -= 222; // fix incorrect right bearing in font + SVG.FONTDATA.FONTS[MAIN][0x2245][2] -= 222; // fix incorrect right bearing in font HUB.Register.LoadHook(SVG.fontDir+"/Main/Bold/MathOperators.js",function () { - SVG.FONTDATA.FONTS['MathJax_Main-bold'][0x2245][2] -= 106; // fix incorrect right bearing in font + SVG.FONTDATA.FONTS[BOLD][0x2245][2] -= 106; // fix incorrect right bearing in font }); HUB.Register.LoadHook(SVG.fontDir+"/Typewriter/Regular/BasicLatin.js",function () { From e7446074c0a3c9a51b9eed6f4dc0aa86ce31cf60 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Sat, 18 Jun 2016 09:23:48 -0400 Subject: [PATCH 17/29] Make content-mathml extension use proper form for -n. Issue #989. --- unpacked/extensions/MathML/content-mathml.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/unpacked/extensions/MathML/content-mathml.js b/unpacked/extensions/MathML/content-mathml.js index b1846603f..a6cf174d1 100644 --- a/unpacked/extensions/MathML/content-mathml.js +++ b/unpacked/extensions/MathML/content-mathml.js @@ -190,7 +190,18 @@ MathJax.Extension["MathML/content-mathml"] = (function(HUB) { */ appendToken: function(parentNode,name,textContent) { var element = CToP.createElement(name); - element.appendChild(document.createTextNode(textContent)); + if (name === 'mn' && textContent.substr(0,1) === "-") { + // + // use n instead of -n + // + element.appendChild(document.createTextNode(textContent.substr(1))); + var mrow = CToP.createElement('mrow'); + CToP.appendToken(mrow,'mo','\u2212'); + mrow.appendChild(element); + element = mrow; + } else { + element.appendChild(document.createTextNode(textContent)); + } parentNode.appendChild(element); return element; }, From 94f2f20448535e329dc9dbe6f21385a7fac8d160 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Mon, 20 Jun 2016 18:23:18 -0400 Subject: [PATCH 18/29] Fix problem with Safari inserting linebreaks for in-line math due to new width-detection scheme (linebreakSpan). #1478. --- unpacked/jax/output/CommonHTML/jax.js | 9 +++++---- unpacked/jax/output/HTML-CSS/jax.js | 9 ++++++--- unpacked/jax/output/SVG/jax.js | 9 +++++---- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/unpacked/jax/output/CommonHTML/jax.js b/unpacked/jax/output/CommonHTML/jax.js index b0fd4eacd..4c8ca67d5 100644 --- a/unpacked/jax/output/CommonHTML/jax.js +++ b/unpacked/jax/output/CommonHTML/jax.js @@ -174,7 +174,8 @@ position: "absolute", width:"1px", height:"60ex" }, - ".mjx-line-box-test": { + ".mjx-line-box-test": {display: "table!important"}, + ".mjx-line-box-test span": { display: "table-cell!important", width: "10000em!important", "min-width":0, "max-width":"none", @@ -245,7 +246,7 @@ // // Used in preTranslate to get linebreak width // - this.linebreakSpan = HTML.Element("span",{className:"mjx-line-box-test"}); + this.linebreakSpan = HTML.Element("span",{className:"mjx-line-box-test"},[["span"]]); // // Set up styles and preload web fonts @@ -278,7 +279,7 @@ document.body.appendChild(this.linebreakSpan); this.defaultEm = this.getFontSize(this.TestSpan); this.defaultEx = this.TestSpan.firstChild.offsetHeight/60; - this.defaultWidth = this.linebreakSpan.offsetWidth; + this.defaultWidth = this.linebreakSpan.firstChild.offsetWidth; document.body.removeChild(this.linebreakSpan); document.body.removeChild(this.TestSpan); }, @@ -452,7 +453,7 @@ jax = script.MathJax.elementJax; if (!jax) continue; em = CHTML.getFontSize(test); ex = test.firstChild.offsetHeight/60; - cwidth = Math.max(0,test.previousSibling.offsetWidth-2); + cwidth = Math.max(0,test.previousSibling.firstChild.offsetWidth-2); if (ex === 0 || ex === "NaN") { ex = this.defaultEx; cwidth = this.defaultWidth; diff --git a/unpacked/jax/output/HTML-CSS/jax.js b/unpacked/jax/output/HTML-CSS/jax.js index 366d75bdb..706e8782f 100644 --- a/unpacked/jax/output/HTML-CSS/jax.js +++ b/unpacked/jax/output/HTML-CSS/jax.js @@ -339,6 +339,9 @@ "min-height": 0, "max-height":"none" }, ".MathJax_LineBox": { + display: (oldIE ? "block" : "table") + "!important" + }, + ".MathJax_LineBox span": { display: (oldIE ? "block" : "table-cell") + "!important", width: (oldIE ? "100%" : "10000em") + "!important", "min-width":0, "max-width":"none", @@ -495,7 +498,7 @@ ); // Used in preTranslate to get linebreak width - this.linebreakSpan = MathJax.HTML.Element("span",{className:"MathJax_LineBox"}); + this.linebreakSpan = MathJax.HTML.Element("span",{className:"MathJax_LineBox"},[["span"]]); // Set up styles and preload web fonts return AJAX.Styles(this.config.styles,["InitializeHTML",this]); @@ -551,7 +554,7 @@ document.body.appendChild(this.linebreakSpan); this.defaultEx = this.EmExSpan.firstChild.offsetHeight/60; this.defaultEm = this.EmExSpan.lastChild.firstChild.offsetHeight/60; - this.defaultWidth = this.linebreakSpan.offsetWidth; + this.defaultWidth = this.linebreakSpan.firstChild.offsetWidth; document.body.removeChild(this.linebreakSpan); document.body.removeChild(this.EmExSpan); }, @@ -621,7 +624,7 @@ jax = script.MathJax.elementJax; if (!jax) continue; ex = test.firstChild.offsetHeight/60; em = test.lastChild.firstChild.offsetHeight/60; - cwidth = Math.max(0,div.previousSibling.offsetWidth - 2); + cwidth = Math.max(0,div.previousSibling.firstChild.offsetWidth - 2); if (relwidth) {maxwidth = cwidth} if (ex === 0 || ex === "NaN") { // can't read width, so move to hidden div for processing diff --git a/unpacked/jax/output/SVG/jax.js b/unpacked/jax/output/SVG/jax.js index ef7a4732f..a6a49c70a 100644 --- a/unpacked/jax/output/SVG/jax.js +++ b/unpacked/jax/output/SVG/jax.js @@ -100,7 +100,8 @@ "min-height": 0, "max-height":"none", padding:0, border: 0, margin: 0 }, - ".MathJax_SVG_LineBox": { + ".MathJax_SVG_LineBox": {display: "table!important"}, + ".MathJax_SVG_LineBox span": { display: "table-cell!important", width: "10000em!important", "min-width":0, "max-width":"none", @@ -179,7 +180,7 @@ ); // Used in preTranslate to get linebreak width - this.linebreakSpan = HTML.Element("span",{className:"MathJax_SVG_LineBox"}); + this.linebreakSpan = HTML.Element("span",{className:"MathJax_SVG_LineBox"},[["span"]]); // Set up styles return AJAX.Styles(this.config.styles,["InitializeSVG",this]); @@ -195,7 +196,7 @@ document.body.appendChild(this.ExSpan); document.body.appendChild(this.linebreakSpan); this.defaultEx = this.ExSpan.firstChild.offsetHeight/60; - this.defaultWidth = this.linebreakSpan.offsetWidth; + this.defaultWidth = this.linebreakSpan.firstChild.offsetWidth; document.body.removeChild(this.linebreakSpan); document.body.removeChild(this.ExSpan); }, @@ -261,7 +262,7 @@ test = script.previousSibling; div = test.previousSibling; jax = script.MathJax.elementJax; if (!jax) continue; ex = test.firstChild.offsetHeight/60; - cwidth = Math.max(0,(div.previousSibling.offsetWidth-2) / this.config.scale * 100); + cwidth = Math.max(0,(div.previousSibling.firstChild.offsetWidth-2) / this.config.scale * 100); if (ex === 0 || ex === "NaN") { // can't read width, so move to hidden div for processing // (this will cause a reflow for each math element that is hidden) From b6504fb366658f307c570d20cdf28f7b44eb5e54 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Wed, 22 Jun 2016 11:58:12 -0400 Subject: [PATCH 19/29] Use a new approach to aligning labels with their table rows that should reduce the round-off problems by forcing each row to the desired height, and doing the same with the labels. Resolves issue #1532 (and #1500). --- .../jax/output/CommonHTML/autoload/mtable.js | 75 ++++++++----------- unpacked/jax/output/CommonHTML/jax.js | 4 +- 2 files changed, 33 insertions(+), 46 deletions(-) diff --git a/unpacked/jax/output/CommonHTML/autoload/mtable.js b/unpacked/jax/output/CommonHTML/autoload/mtable.js index 0012b2788..cdec28225 100644 --- a/unpacked/jax/output/CommonHTML/autoload/mtable.js +++ b/unpacked/jax/output/CommonHTML/autoload/mtable.js @@ -59,11 +59,6 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () { // this.CHTMLgetBoxSizes(values,state); this.CHTMLgetAttributes(values,state); - if (values.equalrows) { - state.HD = true; - state.HH = Math.max.apply(Math,state.H); - state.DD = Math.max.apply(Math,state.D); - } this.CHTMLadjustCells(values,state); if (values.frame) table.style.border = state.t+" "+values.frame; this.CHTMLalignV(values,state,node); @@ -110,6 +105,12 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () { 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 (var 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; }, // @@ -187,19 +188,23 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () { 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; - if (values.fspace) T = CHTML.Em(state.FSPACE[1]); + 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]; - B -= 1/CHTML.em/2; - } - B = CHTML.Em(Math.max(0,B)); + if (RLINES[i] !== MML.LINES.NONE && RLINES[i] !== "") border = state.t+" "+RLINES[i]; + 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 // @@ -219,7 +224,7 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () { R -= 1/CHTML.em/2; } R = CHTML.Em(Math.max(0,R)); - cell.padding = T+" "+R+" "+B+" "+L; + cell.padding = T+" "+R+" 0px "+L; if (border) cell.borderBottom = border; L = R; // @@ -231,25 +236,12 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () { align = (rdata.data[j-s].columnalign||RCALIGN[i][j]||CALIGN[j]); if (align !== MML.ALIGN.CENTER) cell.textAlign = align; // - // Equal heights forced by adding an element of the proper size - // (setting style.height seems to work very strangely) + // Adjust baseline of cells to match cell height // - if (state.HD && j === 0) { - CHTML.addElement(row[j].parentNode,"mjx-mtd",{style:{padding:T+" 0 "+B}}, - [["mjx-box",{style:{ - height:CHTML.Em(state.HH+state.DD), - "vertical-align":CHTML.Em(-state.DD) - }}]] - ); - } - // - // Adjust height and depth of cells - // - cell = row[j].firstChild.style; var H = Math.max(1,cbox.h); - if (H !== state.H[i]) cell.marginTop = CHTML.Em(state.H[i]-H); - if (cbox.d < state.D[i]) cell.marginBottom = CHTML.Em(state.D[i]-cbox.d); + if (H !== state.H[i]) row[j].firstChild.style.marginTop = CHTML.Em(state.H[i]-H); } + row.node.style.height = CHTML.Em(state.RHD[i]); T = B; } CSPACE[state.J] /= 2; RSPACE[ROWS.length-1] /= 2; // back to normal @@ -277,9 +269,8 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () { 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} - var h = state.HH, d = state.DD; for (var i = 0; i < M; i++) { - if (!state.HD) {h = H[i]; d = D[i]} + var h = H[i], d = D[i]; T += h + d + RSPACE[i]; if (n) { if (i === n-1) { @@ -411,10 +402,9 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () { CHTMLstretchCells: function (values,state) { var ROWS = state.rows, H = state.H, D = state.D, W = state.W, J = state.J, M = ROWS.length-1; - var h = state.HH, d = state.DD; for (var i = 0; i <= M; i++) { var row = ROWS[i], rdata = this.data[i]; - if (!state.HD) {h = H[i]; d = D[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; @@ -457,7 +447,7 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () { var box = CHTML.addElement(node,"mjx-box",{ style:{width:"100%","text-align":indent.indentalign} }); box.appendChild(table); - var labels = CHTML.Element("mjx-stack"); + 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]); @@ -485,21 +475,18 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () { // // Vertically align the labels with their rows // - var LABELS = state.labels, T = 0, H = state.H, D = state.D, RSPACE = state.RSPACE; + var LABELS = state.labels, T = 0; if (values.fspace) T = state.FSPACE[0] + (values.frame ? 1/CHTML.em : 0); - var h = state.HH, d = state.DD; for (var i = 0, m = LABELS.length; i < m; i++) { - if (!state.HD) {h = H[i]; d = D[i]} if (LABELS[i] && this.data[i].data[0]) { labels.appendChild(LABELS[i]); var lbox = this.data[i].data[0].CHTML; - T += h - Math.max(1,lbox.h); - if (T) LABELS[i].style.marginTop = CHTML.Em(T); - T = d - lbox.d; + 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 { - T += h + d; + CHTML.addElement(labels,"mjx-label",{style:{height:CHTML.Em(state.RHD[i])}}); } - T += RSPACE[i]; } // // Propagate full-width equations, and reserve room for equation plus label @@ -521,7 +508,7 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () { // Add a new row with no label // if (!options) options = {rows:[],labels:[]}; - var row = []; options.rows.push(row); + var row = []; options.rows.push(row); row.node = node; options.labels.push(null); // // Add the cells to the row @@ -545,7 +532,7 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () { // Add a new row, and get the label // if (!options) options = {rows:[],labels:[]}; - var row = []; options.rows.push(row); + 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; diff --git a/unpacked/jax/output/CommonHTML/jax.js b/unpacked/jax/output/CommonHTML/jax.js index 0b48f9ae2..54c7cde96 100644 --- a/unpacked/jax/output/CommonHTML/jax.js +++ b/unpacked/jax/output/CommonHTML/jax.js @@ -123,13 +123,13 @@ ".mjx-mtr": {display:"table-row"}, ".mjx-mlabeledtr": {display:"table-row"}, ".mjx-mtd": {display:"table-cell", "text-align":"center"}, - ".mjx-label": {display:"block"}, + ".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"}, + ".mjx-itable": {display:"inline-table", width:"auto"}, ".mjx-row": {display:"table-row"}, ".mjx-cell": {display:"table-cell"}, ".mjx-table": {display:"table", width:"100%"}, From f2ac60f2c57c52a18243ae2942610dfde5f83392 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Wed, 22 Jun 2016 13:59:09 -0400 Subject: [PATCH 20/29] Make sure CHTML output stays a table-cell when focused. --- unpacked/jax/output/CommonHTML/jax.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unpacked/jax/output/CommonHTML/jax.js b/unpacked/jax/output/CommonHTML/jax.js index 0b48f9ae2..b3f457c84 100644 --- a/unpacked/jax/output/CommonHTML/jax.js +++ b/unpacked/jax/output/CommonHTML/jax.js @@ -72,7 +72,7 @@ display: "inline-table" // see issues #1282 and #1338 }, ".mjx-full-width": { - display: "table-cell", + display: "table-cell!important", width: "10000em" }, From 3ee5ca30bbfd97475b4e07569f0d0bba1c77bd9e Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Thu, 23 Jun 2016 20:37:25 -0400 Subject: [PATCH 21/29] Don't let preview width interfere with the determination of the container width. Resolves issue #1364. --- unpacked/jax/output/CommonHTML/jax.js | 6 ++++-- unpacked/jax/output/HTML-CSS/jax.js | 2 ++ unpacked/jax/output/SVG/jax.js | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/unpacked/jax/output/CommonHTML/jax.js b/unpacked/jax/output/CommonHTML/jax.js index 0b48f9ae2..f65492ec6 100644 --- a/unpacked/jax/output/CommonHTML/jax.js +++ b/unpacked/jax/output/CommonHTML/jax.js @@ -404,6 +404,7 @@ 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 // @@ -465,11 +466,12 @@ // for (i = 0; i < m; i++) { script = scripts[i]; if (!script.parentNode) continue; - test = scripts[i].previousSibling; + test = scripts.previousSibling; span = test.previousSibling; - jax = scripts[i].MathJax.elementJax; if (!jax) continue; + jax = scripts.MathJax.elementJax; if (!jax) continue; span.parentNode.removeChild(span); test.parentNode.removeChild(test); + if (script.MathJax.preview) script.MathJax.preview.style.display = ""; } state.CHTMLeqn = state.CHTMLlast = 0; state.CHTMLi = -1; state.CHTMLchunk = this.config.EqnChunk; diff --git a/unpacked/jax/output/HTML-CSS/jax.js b/unpacked/jax/output/HTML-CSS/jax.js index 8dad7d6aa..efef875ac 100644 --- a/unpacked/jax/output/HTML-CSS/jax.js +++ b/unpacked/jax/output/HTML-CSS/jax.js @@ -577,6 +577,7 @@ prev = script.previousSibling; if (prev && String(prev.className).match(/^MathJax(_Display)?( MathJax_Processing)?$/)) {prev.parentNode.removeChild(prev)} + if (script.MathJax.preview) script.MathJax.preview.style.display = "none"; // // Add the span, and a div if in display mode, // then mark it as being processed @@ -652,6 +653,7 @@ if (!jax.HTMLCSS.isHidden) {span = span.previousSibling} span.parentNode.removeChild(span); test.parentNode.removeChild(test); + if (script.MathJax.preview) script.MathJax.preview.style.display = ""; } // // Set state variables used for displaying equations in chunks diff --git a/unpacked/jax/output/SVG/jax.js b/unpacked/jax/output/SVG/jax.js index d6b7f4274..e9f34961d 100644 --- a/unpacked/jax/output/SVG/jax.js +++ b/unpacked/jax/output/SVG/jax.js @@ -221,6 +221,7 @@ prev = script.previousSibling; if (prev && String(prev.className).match(/^MathJax(_SVG)?(_Display)?( MathJax(_SVG)?_Process(ing|ed))?$/)) {prev.parentNode.removeChild(prev)} + if (script.MathJax.preview) script.MathJax.preview.style.display = "none"; // // Add the span, and a div if in display mode, // then set the role and mark it as being processed @@ -285,6 +286,7 @@ if (!jax.SVG.isHidden) {span = span.previousSibling} span.parentNode.removeChild(span); test.parentNode.removeChild(test); + if (script.MathJax.preview) script.MathJax.preview.style.display = ""; } // // Set state variables used for displaying equations in chunks From 0e433e2f40637ae36a147ce84afead2b856a36a2 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Mon, 4 Jul 2016 11:02:06 -0400 Subject: [PATCH 22/29] Fix getNode() yet again to walk the tree properly. Also, make CHTMLcoreNode() step through inferred rows (to match what Core() does). Finally, make CHTMLaddChild() add a box of the correct type if forceChild is set. Resolves issue #1541. --- unpacked/jax/output/CommonHTML/jax.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/unpacked/jax/output/CommonHTML/jax.js b/unpacked/jax/output/CommonHTML/jax.js index 0b48f9ae2..a4bc6ffa7 100644 --- a/unpacked/jax/output/CommonHTML/jax.js +++ b/unpacked/jax/output/CommonHTML/jax.js @@ -365,14 +365,13 @@ // nodes, not nodes that might be nested deeper in the tree (see issue #1447). // getNode: function (node,type) { - while (node && node.childNodes.length === 1 && node.firstChild.id == null) - node = node.firstChild; - if (node) { - var name = RegExp("\\b"+type+"\\b"); + var name = RegExp("\\b"+type+"\\b"); + while (node) { for (var i = 0, m = node.childNodes.length; i < m; i++) { var child = node.childNodes[i]; if (name.test(child.className)) return child; } + node = (node.firstChild && (node.firstChild.id||"") === "" ? node.firstChild : null); } return null; }, @@ -1386,12 +1385,10 @@ }, 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) { - var type = options.childNodes; - if (type) { - if (type instanceof Array) type = type[i]||"span"; - node = CHTML.addElement(node,type); - } + 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) @@ -1405,7 +1402,9 @@ if (cbox.skew) bbox.skew = cbox.skew; if (cbox.pwidth) bbox.pwidth = cbox.pwidth; } - } else if (options.forceChild) {cnode = CHTML.addElement(node,"mjx-box")} + } else if (options.forceChild) { + cnode = CHTML.addElement(node,(type||"mjx-box")); + } return cnode; }, @@ -1415,6 +1414,7 @@ return node; }, CHTMLcoreNode: function (node) { + if (this.inferRow && this.data[0]) return this.data[0].CHTMLcoreNode(node.firstChild); return this.CHTMLchildNode(node,this.CoreIndex()); }, From 86165f9a3acdb20b1dbe49e8183f0cce3985d228 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Mon, 4 Jul 2016 13:16:06 -0400 Subject: [PATCH 23/29] Fix determination of line-breaing parent element. Resolves issue #1548. --- unpacked/jax/output/CommonHTML/autoload/multiline.js | 3 ++- unpacked/jax/output/HTML-CSS/autoload/multiline.js | 2 +- unpacked/jax/output/SVG/autoload/multiline.js | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/unpacked/jax/output/CommonHTML/autoload/multiline.js b/unpacked/jax/output/CommonHTML/autoload/multiline.js index 1f8422aaa..0be9d309b 100644 --- a/unpacked/jax/output/CommonHTML/autoload/multiline.js +++ b/unpacked/jax/output/CommonHTML/autoload/multiline.js @@ -68,7 +68,7 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () { // var parent = this; while (parent.inferred || (parent.parent && parent.parent.type === "mrow" && - parent.parent.data.length === 1)) {parent = parent.parent} + parent.parent.isEmbellished())) {parent = parent.parent} var isTop = ((parent.type === "math" && parent.Get("display") === "block") || parent.type === "mtd"); parent.isMultiline = true; @@ -234,6 +234,7 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () { 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); +console.log(align,state.isTop); return align; }, CHTMLgetShift: function (state,values,align,noadjust) { diff --git a/unpacked/jax/output/HTML-CSS/autoload/multiline.js b/unpacked/jax/output/HTML-CSS/autoload/multiline.js index 574997a9a..d26514a96 100644 --- a/unpacked/jax/output/HTML-CSS/autoload/multiline.js +++ b/unpacked/jax/output/HTML-CSS/autoload/multiline.js @@ -67,7 +67,7 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () { // var parent = this; while (parent.inferred || (parent.parent && parent.parent.type === "mrow" && - parent.parent.data.length === 1)) {parent = parent.parent} + parent.isEmbellished())) {parent = parent.parent} var isTop = ((parent.type === "math" && parent.Get("display") === "block") || parent.type === "mtd"); parent.isMultiline = true; diff --git a/unpacked/jax/output/SVG/autoload/multiline.js b/unpacked/jax/output/SVG/autoload/multiline.js index 6a918e599..9354ea9d3 100644 --- a/unpacked/jax/output/SVG/autoload/multiline.js +++ b/unpacked/jax/output/SVG/autoload/multiline.js @@ -65,7 +65,7 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () { // var parent = this; while (parent.inferred || (parent.parent && parent.parent.type === "mrow" && - parent.parent.data.length === 1)) {parent = parent.parent} + parent.isEmbellished())) {parent = parent.parent} var isTop = ((parent.type === "math" && parent.Get("display") === "block") || parent.type === "mtd"); parent.isMultiline = true; From 4fdec9f911e8ba243afff8021b4905e1f7adbe67 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Mon, 4 Jul 2016 13:36:40 -0400 Subject: [PATCH 24/29] Remove debugging code. --- unpacked/jax/output/CommonHTML/autoload/multiline.js | 1 - 1 file changed, 1 deletion(-) diff --git a/unpacked/jax/output/CommonHTML/autoload/multiline.js b/unpacked/jax/output/CommonHTML/autoload/multiline.js index 0be9d309b..7aba8b154 100644 --- a/unpacked/jax/output/CommonHTML/autoload/multiline.js +++ b/unpacked/jax/output/CommonHTML/autoload/multiline.js @@ -234,7 +234,6 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () { 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); -console.log(align,state.isTop); return align; }, CHTMLgetShift: function (state,values,align,noadjust) { From 92e1ce90b548466656da09dd2a9d2268534f831b Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Tue, 5 Jul 2016 21:06:31 -0400 Subject: [PATCH 25/29] Add as ignored tag, and change to a list of ones to ignore. Cache the math.nextSibling node. Remove msieNewlineBug and fold that into the ignoreTags hash. Resolves issue #1087. --- unpacked/extensions/tex2jax.js | 39 +++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/unpacked/extensions/tex2jax.js b/unpacked/extensions/tex2jax.js index 26238818b..fb0fa9503 100644 --- a/unpacked/extensions/tex2jax.js +++ b/unpacked/extensions/tex2jax.js @@ -72,6 +72,15 @@ MathJax.Extension.tex2jax = { }, + // + // Tags to ignore when searching for TeX in the page + // + ignoreTags: { + br: (MathJax.Hub.Browser.isMSIE && document.documentMode < 9 ? "\n" : " "), + wbr: "", + "#comment": "" + }, + PreProcess: function (element) { if (!this.configured) { this.config = MathJax.Hub.CombineConfig("tex2jax",this.config); @@ -164,8 +173,7 @@ MathJax.Extension.tex2jax = { if (this.search.matched) {element = this.encloseMath(element)} if (element) { do {prev = element; element = element.nextSibling} - while (element && (element.nodeName.toLowerCase() === 'br' || - element.nodeName.toLowerCase() === '#comment')); + while (element && this.ignoreTags[element.nodeName.toLowerCase()] != null); if (!element || element.nodeName !== '#text') {return (this.search.close ? this.prevEndMatch() : prev)} } @@ -242,25 +250,24 @@ MathJax.Extension.tex2jax = { }, encloseMath: function (element) { - var search = this.search, close = search.close, CLOSE, math; + var search = this.search, close = search.close, CLOSE, math, next; if (search.cpos === close.length) {close = close.nextSibling} else {close = close.splitText(search.cpos)} if (!close) {CLOSE = close = MathJax.HTML.addText(search.close.parentNode,"")} search.close = close; math = (search.opos ? search.open.splitText(search.opos) : search.open); - while (math.nextSibling && math.nextSibling !== close) { - if (math.nextSibling.nodeValue !== null) { - if (math.nextSibling.nodeName === "#comment") { - math.nodeValue += math.nextSibling.nodeValue.replace(/^\[CDATA\[((.|\n|\r)*)\]\]$/,"$1"); + while ((next = math.nextSibling) && next !== close) { + if (next.nodeValue !== null) { + if (next.nodeName === "#comment") { + math.nodeValue += next.nodeValue.replace(/^\[CDATA\[((.|\n|\r)*)\]\]$/,"$1"); } else { - math.nodeValue += math.nextSibling.nodeValue; + math.nodeValue += next.nodeValue; } - } else if (this.msieNewlineBug) { - math.nodeValue += (math.nextSibling.nodeName.toLowerCase() === "br" ? "\n" : " "); - } else { - math.nodeValue += " "; + } else{ + var ignore = this.ignoreTags[next.nodeName.toLowerCase()]; + math.nodeValue += (ignore == null ? " " : ignore); } - math.parentNode.removeChild(math.nextSibling); + math.parentNode.removeChild(next); } var TeX = math.nodeValue.substr(search.olen,math.nodeValue.length-search.olen-search.clen); math.parentNode.removeChild(math); @@ -294,10 +301,8 @@ MathJax.Extension.tex2jax = { return script; }, - filterPreview: function (tex) {return tex}, - - msieNewlineBug: (MathJax.Hub.Browser.isMSIE && document.documentMode < 9) - + filterPreview: function (tex) {return tex} + }; // We register the preprocessors with the following priorities: From 2f1c09224ad353da5e73a69994299d15bf0fdf15 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Wed, 6 Jul 2016 07:43:04 -0400 Subject: [PATCH 26/29] Fix line breaking to handle hrefs properly both when they are split and when they are not. Resolves issue #1022. --- .../output/CommonHTML/autoload/multiline.js | 5 ++- .../jax/output/HTML-CSS/autoload/multiline.js | 11 +++++-- unpacked/jax/output/SVG/autoload/multiline.js | 1 + unpacked/jax/output/SVG/jax.js | 33 ++++++++++--------- 4 files changed, 31 insertions(+), 19 deletions(-) diff --git a/unpacked/jax/output/CommonHTML/autoload/multiline.js b/unpacked/jax/output/CommonHTML/autoload/multiline.js index 1f8422aaa..a7017b00c 100644 --- a/unpacked/jax/output/CommonHTML/autoload/multiline.js +++ b/unpacked/jax/output/CommonHTML/autoload/multiline.js @@ -312,6 +312,7 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () { 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; } @@ -326,6 +327,7 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () { // 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; @@ -347,6 +349,7 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () { // 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; // @@ -565,7 +568,7 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () { }, CHTMLmoveLine: function (start,end,node,state,values) { - var NODE = this.CHTMLnodeElement(), BOX = this.CHTMLbbox, w; + var NODE, BOX = this.CHTMLbbox, w; // // If this is the start, move the prescripts, if any. // diff --git a/unpacked/jax/output/HTML-CSS/autoload/multiline.js b/unpacked/jax/output/HTML-CSS/autoload/multiline.js index 574997a9a..67bb5825a 100644 --- a/unpacked/jax/output/HTML-CSS/autoload/multiline.js +++ b/unpacked/jax/output/HTML-CSS/autoload/multiline.js @@ -315,10 +315,13 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () { this.HTMLcleanBBox(slice.bbox); if (end.length === 0) { span = this.HTMLspanElement(); + if (this.href) span = span.parentNode; span.parentNode.removeChild(span); span.nextMathJaxSpan.id = span.id; var n = 0; while (span = span.nextMathJaxSpan) { - var color = this.HTMLhandleColor(span); + var SPAN = span; + if (SPAN.nodeName.toLowerCase() === "a") SPAN = SPAN.firstChild; + var color = this.HTMLhandleColor(SPAN); if (color) {color.id += "-MathJax-Continue-"+n; n++} } } @@ -333,6 +336,7 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () { // HTMLcreateSliceSpan: function (span) { var SPAN = this.HTMLspanElement(), n = 0; + if (this.href) SPAN = SPAN.parentNode; var LAST = SPAN; while (LAST.nextMathJaxSpan) {LAST = LAST.nextMathJaxSpan; n++} var SLICE = SPAN.cloneNode(false); LAST.nextMathJaxSpan = SLICE; SLICE.nextMathJaxSpan = null; SLICE.id += "-MathJax-Continue-"+n; @@ -357,6 +361,7 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () { var color = document.getElementById("MathJax-Color-"+this.spanID+HTMLCSS.idPostfix); if (color) {line.appendChild(color)} var span = this.HTMLspanElement(); + if (this.href) span = span.parentNode; line.appendChild(span); // // If it is last, remove right padding @@ -515,7 +520,9 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () { if (end.length === 0) { var s = this.data[this.sup] || this.data[this.sub]; if (s && this.HTMLnotEmpty(s)) { - var box = s.HTMLspanElement().parentNode, stack = box.parentNode; + var box = s.HTMLspanElement().parentNode; + if (s.href) box = box.parentNode; + var stack = box.parentNode; if (this.data[this.base]) {stack.removeChild(stack.firstChild)} for (box = stack.firstChild; box; box = box.nextSibling) {box.style.left = HTMLCSS.Em(HTMLCSS.unEm(box.style.left)-this.HTMLbaseW)} diff --git a/unpacked/jax/output/SVG/autoload/multiline.js b/unpacked/jax/output/SVG/autoload/multiline.js index 6a918e599..ffc339f5d 100644 --- a/unpacked/jax/output/SVG/autoload/multiline.js +++ b/unpacked/jax/output/SVG/autoload/multiline.js @@ -308,6 +308,7 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () { var slice = BBOX(); this.SVGmoveLine(start,end,slice,state,values); slice.Clean(); + if (this.href) {this.SVGaddHref(slice)} this.SVGhandleColor(slice); svg.Add(slice,svg.w,0,true); return slice; diff --git a/unpacked/jax/output/SVG/jax.js b/unpacked/jax/output/SVG/jax.js index d6b7f4274..e9bb3ce61 100644 --- a/unpacked/jax/output/SVG/jax.js +++ b/unpacked/jax/output/SVG/jax.js @@ -1127,22 +1127,7 @@ // FIXME: if an element is split by linebreaking, the ID will be the same on both parts // FIXME: if an element has an id, its zoomed copy will have the same ID if (this.id) {svg.removeable = false; SVG.Element(svg.element,{"id":this.id})} - if (this.href) { - var a = SVG.Element("a",{"class":"mjx-svg-href"}); - a.setAttributeNS(XLINKNS,"href",this.href); - a.onclick = this.SVGlink; - SVG.addElement(a,"rect",{width:svg.w, height:svg.h+svg.d, y:-svg.d, - fill:"none", stroke:"none", "pointer-events":"all"}); - if (svg.type === "svg") { - // for svg element, put inside the main element - var g = svg.element.firstChild; - while (g.firstChild) {a.appendChild(g.firstChild)} - g.appendChild(a); - } else { - a.appendChild(svg.element); svg.element = a; - } - svg.removeable = false; - } + if (this.href) {this.SVGaddHref(svg)} if (SVG.config.addMMLclasses) { this.SVGaddClass(svg.element,"mjx-svg-"+this.type); svg.removeable = false; @@ -1182,6 +1167,22 @@ } } }, + SVGaddHref: function (svg) { + var a = SVG.Element("a",{"class":"mjx-svg-href"}); + a.setAttributeNS(XLINKNS,"href",this.href); + a.onclick = this.SVGlink; + SVG.addElement(a,"rect",{width:svg.w, height:svg.h+svg.d, y:-svg.d, + fill:"none", stroke:"none", "pointer-events":"all"}); + if (svg.type === "svg") { + // for svg element, put inside the main element + var g = svg.element.firstChild; + while (g.firstChild) {a.appendChild(g.firstChild)} + g.appendChild(a); + } else { + a.appendChild(svg.element); svg.element = a; + } + svg.removeable = false; + }, // // WebKit currently scrolls to the BOTTOM of an svg element if it contains the // target of the link, so implement link by hand, to the containing span element. From 7b98391a682a4714f239e7cc30fd81c1e92fa74b Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Wed, 6 Jul 2016 11:59:43 -0400 Subject: [PATCH 27/29] Add ignoreTags to asciimath2jax to be consistent with tex2jax. --- unpacked/extensions/asciimath2jax.js | 35 ++++++++++++++++------------ unpacked/extensions/tex2jax.js | 2 +- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/unpacked/extensions/asciimath2jax.js b/unpacked/extensions/asciimath2jax.js index f6fae5206..3c414e0b5 100644 --- a/unpacked/extensions/asciimath2jax.js +++ b/unpacked/extensions/asciimath2jax.js @@ -48,12 +48,21 @@ MathJax.Extension.asciimath2jax = { // are ignored. Note that this is a regular expression, // so be sure to quote any regexp special characters - preview: "AsciiMath" // set to "none" to not insert MathJax_Preview spans + preview: "AsciiMath" // set to "none" to not insert MathJax_Preview spans // or set to an array specifying an HTML snippet // to use the same preview for every equation. }, + // + // Tags to ignore when searching for AsciiMath in the page + // + ignoreTags: { + br: (MathJax.Hub.Browser.isMSIE && document.documentMode < 9 ? "\n" : " "), + wbr: "", + "#comment": "" + }, + PreProcess: function (element) { if (!this.configured) { this.config = MathJax.Hub.CombineConfig("asciimath2jax",this.config); @@ -132,8 +141,7 @@ MathJax.Extension.asciimath2jax = { if (this.search.matched) {element = this.encloseMath(element)} if (element) { do {prev = element; element = element.nextSibling} - while (element && (element.nodeName.toLowerCase() === 'br' || - element.nodeName.toLowerCase() === '#comment')); + while (element && this.ignoreTags[element.nodeName.toLowerCase()] != null); if (!element || element.nodeName !== '#text') {return prev} } } @@ -172,25 +180,24 @@ MathJax.Extension.asciimath2jax = { }, encloseMath: function (element) { - var search = this.search, close = search.close, CLOSE, math; + var search = this.search, close = search.close, CLOSE, math, next; if (search.cpos === close.length) {close = close.nextSibling} else {close = close.splitText(search.cpos)} if (!close) {CLOSE = close = MathJax.HTML.addText(search.close.parentNode,"")} search.close = close; math = (search.opos ? search.open.splitText(search.opos) : search.open); - while (math.nextSibling && math.nextSibling !== close) { - if (math.nextSibling.nodeValue !== null) { - if (math.nextSibling.nodeName === "#comment") { - math.nodeValue += math.nextSibling.nodeValue.replace(/^\[CDATA\[((.|\n|\r)*)\]\]$/,"$1"); + while ((next = math.nextSibling) && next !== close) { + if (next.nodeValue !== null) { + if (next.nodeName === "#comment") { + math.nodeValue += next.nodeValue.replace(/^\[CDATA\[((.|\n|\r)*)\]\]$/,"$1"); } else { math.nodeValue += math.nextSibling.nodeValue; } - } else if (this.msieNewlineBug) { - math.nodeValue += (math.nextSibling.nodeName.toLowerCase() === "br" ? "\n" : " "); } else { - math.nodeValue += " "; + var ignore = this.ignoreTags[next.nodeName.toLowerCase()]; + math.nodeValue += (ignore == null ? " " : ignore); } - math.parentNode.removeChild(math.nextSibling); + math.parentNode.removeChild(next); } var AM = math.nodeValue.substr(search.olen,math.nodeValue.length-search.olen-search.clen); math.parentNode.removeChild(math); @@ -224,9 +231,7 @@ MathJax.Extension.asciimath2jax = { return script; }, - filterPreview: function (asciimath) {return asciimath}, - - msieNewlineBug: (MathJax.Hub.Browser.isMSIE && (document.documentMode||0) < 9) + filterPreview: function (asciimath) {return asciimath} }; diff --git a/unpacked/extensions/tex2jax.js b/unpacked/extensions/tex2jax.js index fb0fa9503..80c26602b 100644 --- a/unpacked/extensions/tex2jax.js +++ b/unpacked/extensions/tex2jax.js @@ -263,7 +263,7 @@ MathJax.Extension.tex2jax = { } else { math.nodeValue += next.nodeValue; } - } else{ + } else { var ignore = this.ignoreTags[next.nodeName.toLowerCase()]; math.nodeValue += (ignore == null ? " " : ignore); } From 898f3717a49633247b11fe3d0a2eaf837dbba888 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Mon, 11 Jul 2016 10:12:06 -0400 Subject: [PATCH 28/29] Fix typo in commit 3ee5ca3. Resolves issue #1363 for CommonHTML --- unpacked/jax/output/CommonHTML/jax.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unpacked/jax/output/CommonHTML/jax.js b/unpacked/jax/output/CommonHTML/jax.js index a0434c3cd..5dcc972f3 100644 --- a/unpacked/jax/output/CommonHTML/jax.js +++ b/unpacked/jax/output/CommonHTML/jax.js @@ -473,9 +473,9 @@ // for (i = 0; i < m; i++) { script = scripts[i]; if (!script.parentNode) continue; - test = scripts.previousSibling; + test = script.previousSibling; span = test.previousSibling; - jax = scripts.MathJax.elementJax; if (!jax) continue; + jax = script.MathJax.elementJax; if (!jax) continue; span.parentNode.removeChild(span); test.parentNode.removeChild(test); if (script.MathJax.preview) script.MathJax.preview.style.display = ""; From 0037d6b6dfb1f2363c8032665aa3e31dc8911a8f Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Thu, 21 Jul 2016 15:37:14 -0400 Subject: [PATCH 29/29] Make \def, \let, and \newcommand handle '\ ' properly. Make \let set a control sequence to an undefined control sequence. Resolves issues #1563 and #1564. --- unpacked/extensions/TeX/newcommand.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/unpacked/extensions/TeX/newcommand.js b/unpacked/extensions/TeX/newcommand.js index d43a2114b..a449b1698 100644 --- a/unpacked/extensions/TeX/newcommand.js +++ b/unpacked/extensions/TeX/newcommand.js @@ -51,11 +51,12 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () { * Implement \newcommand{\name}[n][default]{...} */ NewCommand: function (name) { - var cs = this.trimSpaces(this.GetArgument(name)), + var CS = this.GetArgument(name), cs = this.trimSpaces(CS), n = this.GetBrackets(name), opt = this.GetBrackets(name), def = this.GetArgument(name); if (cs.charAt(0) === "\\") {cs = cs.substr(1)} + if (cs === "" && CS.substr(CS.length-1,1) === " ") {cs += " "} if (!cs.match(/^(.|[a-z]+)$/i)) { TEX.Error(["IllegalControlSequenceName", "Illegal control sequence name for %1",name]); @@ -120,10 +121,11 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () { name = this.GetCSname(name); macro = this.csFindMacro(name); if (!macro) { - if (TEXDEF.mathchar0mi[name]) {macro = ["csMathchar0mi",TEXDEF.mathchar0mi[name]]} else - if (TEXDEF.mathchar0mo[name]) {macro = ["csMathchar0mo",TEXDEF.mathchar0mo[name]]} else - if (TEXDEF.mathchar7[name]) {macro = ["csMathchar7",TEXDEF.mathchar7[name]]} else - if (TEXDEF.delimiter["\\"+name] != null) {macro = ["csDelimiter",TEXDEF.delimiter["\\"+name]]} + if (TEXDEF.mathchar0mi[name]) {macro = ["csMathchar0mi",TEXDEF.mathchar0mi[name]]} else + if (TEXDEF.mathchar0mo[name]) {macro = ["csMathchar0mo",TEXDEF.mathchar0mo[name]]} else + if (TEXDEF.mathchar7[name]) {macro = ["csMathchar7",TEXDEF.mathchar7[name]]} else + if (TEXDEF.delimiter["\\"+name] != null) {macro = ["csDelimiter",TEXDEF.delimiter["\\"+name]]} else + return; } } else {macro = ["Macro",c]; this.i++} this.setDef(cs,macro); @@ -145,8 +147,9 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () { TEX.Error(["MissingCS", "%1 must be followed by a control sequence", cmd]) } - var cs = this.trimSpaces(this.GetArgument(cmd)); - return cs.substr(1); + var cs = this.GetArgument(cmd), CS = this.trimSpaces(cs); + if (CS == "\\" && cs.substr(cs.length-1,1) === " ") {CS += " "} + return CS.substr(1); }, /*