Handle explicit width correctly for tables in SVG (don't remove extra column spacing)

This commit is contained in:
Davide P. Cervone 2015-08-26 08:47:42 -04:00
parent f886216f2c
commit d0e4e1b8f5

View File

@ -205,9 +205,9 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
// Get total width minus column spacing // Get total width minus column spacing
WW = SVG.length2em(values.width,mu); WW = SVG.length2em(values.width,mu);
for (i = 0, m = Math.min(J+1,CSPACE.length); i < m; i++) {WW -= CSPACE[i]} for (i = 0, m = Math.min(J,CSPACE.length); i < m; i++) {WW -= CSPACE[i]}
// Determine individual column widths // Determine individual column widths
WW /= J+1; WW /= J;
for (i = 0, m = Math.min(J+1,CWIDTH.length); i < m; i++) {W[i] = WW} for (i = 0, m = Math.min(J+1,CWIDTH.length); i < m; i++) {W[i] = WW}
} else { } else {
// //
@ -227,7 +227,7 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
if (WP > .98) {Wf = Wp/(Wt+Wp); WW = Wt + Wp} else {WW = Wt / (1-WP)} if (WP > .98) {Wf = Wp/(Wt+Wp); WW = Wt + Wp} else {WW = Wt / (1-WP)}
} else { } else {
WW = SVG.length2em(values.width,mu); WW = SVG.length2em(values.width,mu);
for (i = 0, m = Math.min(J+1,CSPACE.length); i < m; i++) {WW -= CSPACE[i]} for (i = 0, m = Math.min(J,CSPACE.length); i < m; i++) {WW -= CSPACE[i]}
} }
// Determine the relative column widths // Determine the relative column widths
for (i = 0, m = P.length; i < m; i++) { for (i = 0, m = P.length; i < m; i++) {