diff --git a/unpacked/jax/output/HTML-CSS/config.js b/unpacked/jax/output/HTML-CSS/config.js
index f2672d74e..d8b61805d 100644
--- a/unpacked/jax/output/HTML-CSS/config.js
+++ b/unpacked/jax/output/HTML-CSS/config.js
@@ -24,7 +24,7 @@
MathJax.OutputJax["HTML-CSS"] = MathJax.OutputJax({
id: "HTML-CSS",
- version: "2.1.1",
+ version: "2.1.2",
directory: MathJax.OutputJax.directory + "/HTML-CSS",
extensionDir: MathJax.OutputJax.extensionDir + "/HTML-CSS",
autoloadDir: MathJax.OutputJax.directory + "/HTML-CSS/autoload",
diff --git a/unpacked/jax/output/HTML-CSS/jax.js b/unpacked/jax/output/HTML-CSS/jax.js
index 52bfa7737..0ed956ac5 100644
--- a/unpacked/jax/output/HTML-CSS/jax.js
+++ b/unpacked/jax/output/HTML-CSS/jax.js
@@ -2621,7 +2621,14 @@
math = HTMLCSS.Measured(html,box);
}
HTMLCSS.placeBox(box,0,0);
- stack.style.width = Math.round(HTMLCSS.unEm(stack.style.width)*this.em)+"px"; // get width right if minimum font size is set
+ //
+ // Get width right if minimum font size is set:
+ // Round to nearest pixel (plus a small amount), and convert back to outer-em's.
+ // Add the width to the span (outside the MathJax class, so uses outer em size,
+ // which makes it work even when minimum font size is in effect).
+ //
+ span.style.width = HTMLCSS.Em((Math.round(math.bbox.w*this.em)+.25)/HTMLCSS.outerEm);
+ span.style.display = "inline-block"; stack.style.width = "";
//
// Adjust bbox to match outer em-size
//
diff --git a/unpacked/jax/output/NativeMML/config.js b/unpacked/jax/output/NativeMML/config.js
index 86d51ad2d..fd7af3031 100644
--- a/unpacked/jax/output/NativeMML/config.js
+++ b/unpacked/jax/output/NativeMML/config.js
@@ -24,7 +24,7 @@
MathJax.OutputJax.NativeMML = MathJax.OutputJax({
id: "NativeMML",
- version: "2.1",
+ version: "2.1.1",
directory: MathJax.OutputJax.directory + "/NativeMML",
extensionDir: MathJax.OutputJax.extensionDir + "/NativeMML",
diff --git a/unpacked/jax/output/NativeMML/jax.js b/unpacked/jax/output/NativeMML/jax.js
index e47e45304..87b237d5c 100644
--- a/unpacked/jax/output/NativeMML/jax.js
+++ b/unpacked/jax/output/NativeMML/jax.js
@@ -69,6 +69,7 @@
}
},
settings: HUB.config.menuSettings,
+ ex: 1, // filled in later
Config: function () {
this.SUPER(arguments).Config.call(this);
@@ -205,6 +206,7 @@
if (ex === 0 || ex === "NaN") {ex = this.defaultEx; mex = this.defaultMEx}
scale = (mex > 1 ? ex/mex : 1) * this.config.scale;
scale = Math.floor(Math.max(this.config.minScaleAdjust/100,scale));
+ jax.NativeMML.ex = ex;
} else {scale = 100}
jax.NativeMML.fontSize = scale+"%";
}
@@ -232,6 +234,7 @@
var span = document.getElementById(jax.inputID+"-Frame"),
container = span.firstChild, mspan = container.firstChild;
span.style.fontSize = jax.NativeMML.fontSize;
+ this.ex = jax.NativeMML.ex || this.defaultEx;
//
// Convert to MathML (if restarted, remove any partial math)
//
@@ -615,7 +618,13 @@
// parent element to match. Even if we set the