diff --git a/unpacked/jax/output/CommonHTML/jax.js b/unpacked/jax/output/CommonHTML/jax.js
index c8cedc0f7..2e46efdd3 100644
--- a/unpacked/jax/output/CommonHTML/jax.js
+++ b/unpacked/jax/output/CommonHTML/jax.js
@@ -180,7 +180,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",
@@ -251,7 +252,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
@@ -284,7 +285,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);
},
@@ -453,7 +454,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 5ac40ac6a..3f4dac9ce 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 d6b7f4274..7b2765f15 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)