From 8f0e833ba62d749f6b5f1a3cab08204d8534caab Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Mon, 23 Feb 2015 12:11:56 -0500 Subject: [PATCH] Remove integral hack that was needed for Times, and don't add TeX space to mspace elements. --- unpacked/jax/output/CommonHTML/jax.js | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/unpacked/jax/output/CommonHTML/jax.js b/unpacked/jax/output/CommonHTML/jax.js index 63fe752e9..0f2679b80 100644 --- a/unpacked/jax/output/CommonHTML/jax.js +++ b/unpacked/jax/output/CommonHTML/jax.js @@ -627,11 +627,6 @@ if (!this.CHTML) this.CHTML = {}; this.CHTML = {w:0, h:0, d:0, l:0, r:0, t:0, b:0}; if (this.inferred) return span; - // ### FIXME: This is a hack to handle the different spacing of the - // ### integral sign in Times compared to CM fonts - if (this.type === "mo" && this.data.join("") === "\u222B") {CHTML.lastIsInt = true} - else if (this.type !== "mspace" || this.width !== "negativethinmathspace") {CHTML.lastIsInt = false} - // ### if (!this.CHTMLspanID) {this.CHTMLspanID = CHTML.GetID()}; var id = (this.id || "MJXc-Span-"+this.CHTMLspanID); return HTML.addElement(span,"span",{className:"MJXc-"+this.type, id:id}); @@ -875,18 +870,16 @@ MML.mspace.Augment({ toCommonHTML: function (span) { - span = this.CHTMLdefaultSpan(span); + span = this.CHTMLcreateSpan(span); + this.CHTMLhandleStyle(span); + this.CHTMLhandleColor(span); var values = this.getValues("height","depth","width"); var w = CHTML.length2em(values.width), h = CHTML.length2em(values.height), d = CHTML.length2em(values.depth); var bbox = this.CHTML; bbox.w = w; bbox.h = h; bbox.d = d; - if (w < 0) { - // ### FIXME: lastIsInt hack - if (!CHTML.lastIsInt) span.style.marginLeft = CHTML.Em(w); - w = 0; - } + if (w < 0) {span.style.marginRight = CHTML.Em(w); w = 0} span.style.width = CHTML.Em(w); span.style.height = CHTML.Em(h+d); if (d) span.style.verticalAlign = CHTML.Em(-d);