diff --git a/unpacked/jax/output/HTML-CSS/jax.js b/unpacked/jax/output/HTML-CSS/jax.js index f1a61a225..7b0aafae4 100644 --- a/unpacked/jax/output/HTML-CSS/jax.js +++ b/unpacked/jax/output/HTML-CSS/jax.js @@ -777,7 +777,7 @@ this.idPostfix = "-zoom"; jax.root.toHTML(span,span); this.idPostfix = ""; this.zoomScale = 1; - var width = jax.root.HTMLspanElement().bbox.width; + var width = jax.root.HTMLspanElement().bbox.width, cwidth; if (width) { // Handle full-width displayed equations // FIXME: this is a hack for now @@ -785,7 +785,10 @@ var id = (jax.root.id||"MathJax-Span-"+jax.root.spanID)+"-zoom"; var child = document.getElementById(id).firstChild; while (child && child.style.width !== width) {child = child.nextSibling} - if (child) {child.style.width = "100%"} + if (child) { + var cwidth = child.offsetWidth; child.style.width = "100%"; + if (cwidth > Mw) {span.style.width = (cwidth+100)+"px"} + } } // // Get height and width of zoomed math and original math diff --git a/unpacked/jax/output/NativeMML/jax.js b/unpacked/jax/output/NativeMML/jax.js index 73342457a..5b4e046aa 100644 --- a/unpacked/jax/output/NativeMML/jax.js +++ b/unpacked/jax/output/NativeMML/jax.js @@ -432,6 +432,7 @@ Zoom: function (jax,span,math,Mw,Mh) { jax.root.toNativeMML(span); if (this.msieIE8HeightBug) {span.style.position = "absolute"} + if (nMML.widthBug) {span.style.width = span.parentNode.style.width = ""} var mW = math.offsetWidth || math.scrollWidth, mH = math.offsetHeight || math.scrollHeight; var zW = span.offsetWidth, zH = span.offsetHeight;