From 003df73d815e9c7f980698678f5b8c1cc436113c Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Tue, 10 Oct 2017 07:15:05 -0400 Subject: [PATCH 1/2] Fix issues reported by Volker --- mathjax3-ts/output/chtml/Wrappers/mtable.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mathjax3-ts/output/chtml/Wrappers/mtable.ts b/mathjax3-ts/output/chtml/Wrappers/mtable.ts index ef3d23c6a..574610c1a 100644 --- a/mathjax3-ts/output/chtml/Wrappers/mtable.ts +++ b/mathjax3-ts/output/chtml/Wrappers/mtable.ts @@ -88,7 +88,7 @@ export class CHTMLmtable extends CHTMLWrapper { const attributes = this.node.attributes; const frame = attributes.get('frame') !== 'none'; const lines = frame || attributes.get('columnlines') !== 'none' || attributes.get('rowlines') !== 'none'; - const fspacing = (lines ? this.convertLengths(this.getAttributeArray('framespacing')) : ['0', '0']); + const fspacing = (lines ? this.convertLengths(this.getAttributeArray('framespacing')) : []); // // Pad the rows of the table, if needed // Then set the column and row attributes for alignment, spacing, and lines @@ -96,10 +96,10 @@ export class CHTMLmtable extends CHTMLWrapper { // this.padRows(); this.handleColumnAlign(); - this.handleColumnSpacing(lines, fspacing[0]); + this.handleColumnSpacing(lines, fspacing[0] || '0'); this.handleColumnLines(); this.handleRowAlign(); - this.handleRowSpacing(lines, fspacing[1]); + this.handleRowSpacing(lines, fspacing[1] || '0'); this.handleRowLines(); this.handleFrame(frame); } @@ -129,16 +129,16 @@ export class CHTMLmtable extends CHTMLWrapper { const cSpace = this.convertLengths(this.getColumnAttributes('columnspacing')).slice(0, cMax); const rSpace = this.convertLengths(this.getRowAttributes('rowspacing')).slice(0, rMax); const frame = this.node.attributes.get('frame') !== 'none'; - const fSpace = (frame ? this.convertLengths(this.getAttributeArray('framespacing')) : ['0', '0']); + const fSpace = (frame ? this.convertLengths(this.getAttributeArray('framespacing')) : []); const cLines = this.getColumnAttributes('columnlines').slice(0, cMax).map(x => (x === 'none' ? 0 : .07)); const rLines = this.getColumnAttributes('rowlines').slice(0, cMax).map(x => (x === 'none' ? 0 : .07)); const a = this.font.params.axis_height; const h = H.concat(D, rLines).reduce((a, b) => a + b) + (frame ? .14 : 0) + - rSpace.map(x => parseFloat(x)).reduce((a, b) => a + b) + 2 * parseFloat(fSpace[1]); + rSpace.map(x => parseFloat(x)).reduce((a, b) => a + b) + 2 * parseFloat(fSpace[1] || '0'); this.bbox.h = h / 2 + a; this.bbox.d = h / 2 - a; this.bbox.w = W.concat(cLines).reduce((a, b) => a + b) + - cSpace.map(x => parseFloat(x)).reduce((a, b) => a + b) + 2 * parseFloat(fSpace[1]); + cSpace.map(x => parseFloat(x)).reduce((a, b) => a + b) + 2 * parseFloat(fSpace[1] || '0'); return this.bbox; } @@ -156,7 +156,7 @@ export class CHTMLmtable extends CHTMLWrapper { } /* - * Set the cell aligmentsbased on the table, row, or cell columnalign attributes + * Set the cell aligments based on the table, row, or cell columnalign attributes */ protected handleColumnAlign() { const colAlign = this.getColumnAttributes('columnalign') || []; @@ -319,7 +319,7 @@ export class CHTMLmtable extends CHTMLWrapper { } /* - * Add a frame to the mjx-itable, if needed + * Add a frame to the mtable, if needed */ protected handleFrame(frame: boolean) { if (frame) { From 3a3f1df48aacb4f8f33e72797d9e7d7e8f9363e6 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Sat, 28 Oct 2017 18:09:55 -0400 Subject: [PATCH 2/2] Add fnOP as per Volker's request --- mathjax2/legacy/jax/element/MmlNode.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mathjax2/legacy/jax/element/MmlNode.js b/mathjax2/legacy/jax/element/MmlNode.js index e68286d5c..2674677ce 100644 --- a/mathjax2/legacy/jax/element/MmlNode.js +++ b/mathjax2/legacy/jax/element/MmlNode.js @@ -13,7 +13,8 @@ 'isError', 'multiline', 'variantForm', - 'autoOP' + 'autoOP', + 'fnOP' ]; var RENAME = { texWithDelims: 'withDelims'