From b8ae3b9817a9b215391a1a11d4d1ae98b8dc86e5 Mon Sep 17 00:00:00 2001
From: "Davide P. Cervone" <dpvc@union.edu>
Date: Wed, 4 Mar 2015 17:35:12 -0500
Subject: [PATCH] Actually set the height of the under- or over-script when
 baseline spacing is not wanted, and make sure the proper node type is created
 for mover.

---
 unpacked/jax/output/CommonHTML/jax.js | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/unpacked/jax/output/CommonHTML/jax.js b/unpacked/jax/output/CommonHTML/jax.js
index ef306df97..9873cdf26 100644
--- a/unpacked/jax/output/CommonHTML/jax.js
+++ b/unpacked/jax/output/CommonHTML/jax.js
@@ -63,7 +63,6 @@
     "mjx-base":   {display:"block"},
     "mjx-under":  {display:"table-cell"},
     "mjx-over":   {display:"block"},
-    "mjx-table > mjxover": {display:"table-cell"},
     
     "mjx-mphantom": {"visibility":"hidden"},
 
@@ -1018,9 +1017,10 @@
         //
         //  Get the nodes for base and limits
         //
+        var types = ["mjx-base","mjx-under","mjx-over"];
+        if (this.over === 1) types[1] = types[2];
         node = this.CHTMLdefaultNode(node,{
-          childNodes:["mjx-base","mjx-under","mjx-over"], noBBox:true, forceChild:true,
-          minChildren: 2
+          childNodes:types, noBBox:true, forceChild:true, minChildren: 2
         });
         var base, under, over;
         base = node.removeChild(node.firstChild);
@@ -1116,13 +1116,13 @@
         //  
         var stack = HTML.Element("mjx-stack");
         stack.appendChild(over); stack.appendChild(base);
-        if (obox.d < 0) {
+        if (obox.d < 0 || obox.h < .25) {
           //
           // For negative depths, set the height and align to top
           // in order to avoid extra baseline space
           //
           over.firstChild.style.verticalAlign = "top";
-          over.style.height = obox.h+obox.d;
+          over.style.height = CHTML.Em(obox.h+obox.d);
         }
         //
         //  Determine the spacing
@@ -1165,13 +1165,13 @@
         ]);
         node.firstChild.firstChild.firstChild.appendChild(stack);
         node.firstChild.lastChild.appendChild(under);
-        if (ubox.d < 0) {
+        if (ubox.d < 0 || ubox.h < .25) {
           //
           // For negative depths, set the height and align to top
           // in order to avoid extra baseline space
           //
           under.firstChild.style.verticalAlign = "top";
-          under.style.height = ubox.h+ubox.d;
+          under.style.height = CHTML.Em(ubox.h+ubox.d);
         }
         //
         //  determine the spacing