commit 757660863f251706c3139212995bb41eae1d0098
parent b231a0537c936e365db9681bd2f8c9f28281133e
Author: Davide P. Cervone <dpvc@union.edu>
Date: Sat, 5 Dec 2015 18:43:31 -0500
Handle boxes with negative widths in CHTML. Resolves issue #1280
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/unpacked/jax/output/CommonHTML/jax.js b/unpacked/jax/output/CommonHTML/jax.js
@@ -1518,6 +1518,9 @@
} else if (BBOX.pwidth) {
BBOX.mwidth = BBOX.w;
style.width = "100%";
+ } else if (BBOX.w < 0) {
+ style.width = "0px";
+ style.marginRight = CHTML.Em(BBOX.w);
}
if (!this.style) return;
// ### FIXME: adjust for width, height, vertical-align?
@@ -1688,6 +1691,7 @@
MML.math.Augment({
toCommonHTML: function (node) {
node = this.CHTMLdefaultNode(node);
+ if (this.CHTML.w < 0) node.parentNode.style.marginRight = CHTML.Em(this.CHTML.w);
var alttext = this.Get("alttext");
if (alttext && !node.getAttribute("aria-label")) node.setAttribute("aria-label",alttext);
if (!node.getAttribute("role")) node.setAttribute("role","math");