Fix some problems with table widths/heights and spacing, and handle spacing of frame via menclose better for HTML-CSS output

This commit is contained in:
Davide P. Cervone 2011-10-25 16:53:12 -04:00
parent 11e11f2ac0
commit 1c4580c2c0
11 changed files with 20 additions and 15 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -242,10 +242,12 @@
var mml = MML.mtable.apply(MML,this.table).With(this.arraydef);
if (this.frame.length === 4) {
mml.frame = (this.frame.dashed ? "dashed" : "solid");
mml.framespacing = ".5em .5ex";
} else if (this.frame.length) {
mml.hasFrame = true;
this.arraydef.rowlines = this.arraydef.rowlines.replace(/none( none)+$/,"none");
mml = MML.menclose(mml).With({notation: this.frame.join(" "), isFrame: true});
if (this.arraydef.columnlines != "none" ||
this.arraydef.rowlines != "none") {mml.padding = 0} // HTML-CSS jax implements this
}
if (this.open || this.close) {
mml = MML.mfenced(mml).With({open: this.open, close: this.close});

View File

@ -354,11 +354,13 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
}
}
}
stack.bbox.d = -fY; stack.bbox.h = fH+fY;
HTMLCSS.setStackWidth(stack,stack.bbox.w + fx);
//
// Add frame
//
fW = stack.bbox.w + fx; var frame;
fW = stack.bbox.w; var frame;
if (values.frame !== "none") {
frame = HTMLCSS.createFrame(stack,fH,0,fW,1.25/HTMLCSS.em,values.frame);
HTMLCSS.addBox(stack,frame); HTMLCSS.placeBox(frame,0,fY,true);
@ -431,6 +433,7 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
HTMLhandleSpace: function (span) {
span.bbox.keepPadding = true; span.bbox.exact = true;
if (!this.hasFrame) {span.style.paddingLeft = span.style.paddingRight = ".1667em"}
this.SUPER(arguments).HTMLhandleSpace.call(this,span);
}
});