Merge branch 'issue1279' into develop. Issue #1279.

This commit is contained in:
Davide P. Cervone 2015-10-14 09:09:35 -04:00
commit b679e7e4df
2 changed files with 9 additions and 6 deletions

View File

@ -52,6 +52,8 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () {
"columnwidth","equalcolumns","equalrows",
"columnlines","rowlines","frame","framespacing",
"align","width","side","minlabelspacing","useHeight");
var t = CHTML.TEX.min_rule_thickness/CHTML.em;
state.t = CHTML.Px(t*this.CHTML.scale,1);
//
// Create the table
//
@ -63,7 +65,7 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () {
state.DD = Math.max.apply(Math,state.D);
}
this.CHTMLadjustCells(values,state);
if (values.frame) table.style.border = "1px "+values.frame;
if (values.frame) table.style.border = state.t+" "+values.frame;
this.CHTMLalignV(values,state,node);
this.CHTMLcolumnWidths(values,state,node);
this.CHTMLstretchCells(values,state);
@ -196,7 +198,7 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () {
//
B = RSPACE[i]/2; border = null; L = "0";
if (RLINES[i] !== MML.LINES.NONE) {
border = "1px "+RLINES[i];
border = state.t+" "+RLINES[i];
B -= 1/CHTML.em/2;
}
B = CHTML.Em(Math.max(0,B));
@ -215,7 +217,7 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () {
//
R = CSPACE[j]/2;
if (CLINES[j] !== MML.LINES.NONE) {
cell.borderRight = "1px "+CLINES[j];
cell.borderRight = state.t+" "+CLINES[j];
R -= 1/CHTML.em/2;
}
R = CHTML.Em(Math.max(0,R));

View File

@ -1204,8 +1204,9 @@
unEm: function (m) {
return parseFloat(m);
},
Px: function (m) {
Px: function (m,M) {
m *= this.em;
if (M && m < M) m = M;
if (Math.abs(m) < .1) return "0";
return m.toFixed(1).replace(/\.0$/,"")+"px";
},
@ -2409,7 +2410,7 @@
q = (u - nbox.d*nscale) - (a + t/2); if (q < p) u += (p - q);
q = (a - t/2) - (dbox.h*dscale - v); if (q < p) v += (p - q);
frac.style.verticalAlign = CHTML.Em(t/2-v);
num.style.borderBottom = CHTML.Px(t/nscale*nbox.scale)+" solid";
num.style.borderBottom = CHTML.Px(t/nscale*nbox.scale,1)+" solid";
num.className += " MJXc-fpad"; nbox.L = nbox.R = .1;
denom.className += " MJXc-fpad"; dbox.L = dbox.R = .1;
}
@ -2460,7 +2461,7 @@
H = bbox.h + q + t;
var x = this.CHTMLaddRoot(node,sbox,sbox.h+sbox.d-H);
base.style.paddingTop = CHTML.Em(q);
base.style.borderTop = CHTML.Px(T*bbox.scale)+" solid";
base.style.borderTop = CHTML.Px(T*bbox.scale,1)+" solid";
sqrt.style.paddingTop = CHTML.Em(2*t-T); // use wider line, but don't affect height
bbox.h += q + 2*t;
BBOX.combine(sbox,x,H-sbox.h);