From e7961f0dd2202a08e363a752b9c9b040cf9f60fc Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Sat, 22 Aug 2015 07:50:56 -0400 Subject: [PATCH] Make phantom background colors not disappear, make spaces be kept in char boxes, and handle mrow-enclosed atom in superscripts (still needs work, like TWO mrows, etc., and should be made part of mml jax). --- unpacked/jax/output/CommonHTML/jax.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/unpacked/jax/output/CommonHTML/jax.js b/unpacked/jax/output/CommonHTML/jax.js index 7cbcd6b39..96b272758 100644 --- a/unpacked/jax/output/CommonHTML/jax.js +++ b/unpacked/jax/output/CommonHTML/jax.js @@ -93,7 +93,7 @@ "mjx-surd": {"vertical-align":"top"}, - "mjx-mphantom": {visibility:"hidden"}, + "mjx-mphantom *": {visibility:"hidden"}, "mjx-merror": { "background-color":"#FFFF88", @@ -116,7 +116,7 @@ "mjx-box": {display:"inline-block"}, "mjx-block": {display:"block"}, "mjx-span": {display:"span"}, - "mjx-char": {display:"block"}, + "mjx-char": {display:"block", "white-space":"pre"}, "mjx-itable": {display:"inline-table"}, "mjx-row": {display:"table-row"}, "mjx-cell": {display:"table-cell"}, @@ -2232,6 +2232,7 @@ delta = 1.3*bbox.ic + .05; // make faked IC be closer to expeted results } var bmml = this.data[this.base]; + if ((bmml.type === "mrow" || bmml.type === "mstyle") && bmml.data.length === 1) bmml = bmml.data[0]; if (bmml && (bmml.type === "mi" || bmml.type === "mo")) { if (bmml.data.join("").length === 1 && bbox.rscale === 1 && !bbox.sH && !bmml.Get("largeop")) {u = v = 0}