commit 3c47494d28d16216973fc2902c130fd02d0fdacd
parent 7343e81dba4fcdd04af413b3eb2c1cf7e9b9b647
Author: Davide P. Cervone <dpvc@union.edu>
Date: Thu, 2 Apr 2015 16:12:35 -0400
Handle empty table cells (still need to do something about setting the widths of columns with no entry in the top row).
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/unpacked/jax/output/CommonHTML/autoload/mtable.js b/unpacked/jax/output/CommonHTML/autoload/mtable.js
@@ -346,7 +346,7 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () {
else if (CWIDTH[j].match(/%$/)) percent.push(j)
else W[j] = CHTML.length2em(CWIDTH[j],W[j]);
TW += W[j] + CSPACE[j];
- row[j].style.width = CHTML.Em(W[j]);
+ if (row[j]) row[j].style.width = CHTML.Em(W[j]);
}
if (values.frame) TW += 2/CHTML.em;
var hasFit = (fit.length > 0);
@@ -416,6 +416,7 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () {
if (!state.HD) {h = H[i]; d = D[i]}
for (var j = 0; j <= J; j++) {
var cell = row[j], cdata = rdata.data[j];
+ if (!cdata) continue;
if (cdata.CHTML.stretch === "V") cdata.CHTMLstretchV(h,d);
else if (cdata.CHTML.stretch === "H") cdata.CHTMLstretchH(cell,W[j]);
}