From 3c47494d28d16216973fc2902c130fd02d0fdacd Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Thu, 2 Apr 2015 16:12:35 -0400 Subject: [PATCH] Handle empty table cells (still need to do something about setting the widths of columns with no entry in the top row). --- unpacked/jax/output/CommonHTML/autoload/mtable.js | 3 ++- 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 index 59da84aea..0b3f5fa5a 100644 --- 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]); }