Skip to content

Commit 3e25a27

Browse files
committed
merge branch 'ie-stretchy-braces' into alpha
2 parents 8d85193 + a928e3e commit 3e25a27

File tree

5 files changed

+41
-40
lines changed

5 files changed

+41
-40
lines changed

mathjax2/legacy/jax/element/MmlNode.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
'isError',
1414
'multiline',
1515
'variantForm',
16-
'autoOP'
16+
'autoOP',
17+
'fnOP'
1718
];
1819
var RENAME = {
1920
texWithDelims: 'withDelims'

mathjax3-ts/output/chtml/Wrappers/mfrac.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export class CHTMLmfrac extends CHTMLWrapper {
147147
const dbox = this.childNodes[1].getBBox();
148148
const pad = (this.node.getProperty('withDelims') as boolean ? 0 : this.font.params.nulldelimiterspace);
149149
const a = this.font.params.axis_height;
150-
const T = (display ? 3.5 : 1.5) * this.font.params.rule_thickness;;
150+
const T = (display ? 3.5 : 1.5) * this.font.params.rule_thickness;
151151
bbox.combine(nbox, 0, a + T + Math.max(nbox.d * nbox.rscale, display ? .217 : .054));
152152
bbox.combine(dbox, 0, a - T - Math.max(dbox.h * dbox.rscale, display ? .726 : .505));
153153
bbox.w += 2 * pad + .2;

mathjax3-ts/output/chtml/Wrappers/msubsup.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,14 @@ export class CHTMLmsubsup extends CHTMLscriptbase {
113113
/*
114114
* @return{CHTMLWrapper} The wrapper for the subscript
115115
*/
116-
public get sub() {
116+
public get subChild() {
117117
return this.childNodes[(this.node as MmlMsubsup).sub];
118118
}
119119

120120
/*
121121
* @return{CHTMLWrapper} The wrapper for the superscript
122122
*/
123-
public get sup() {
123+
public get supChild() {
124124
return this.childNodes[(this.node as MmlMsubsup).sup];
125125
}
126126

@@ -129,26 +129,26 @@ export class CHTMLmsubsup extends CHTMLscriptbase {
129129
*/
130130
public toCHTML(parent: HTMLElement) {
131131
this.chtml = this.standardCHTMLnode(parent);
132-
const [u, v, q] = this.getUVQ(this.base.getBBox(), this.sub.getBBox(), this.sup.getBBox());
132+
const [u, v, q] = this.getUVQ(this.baseChild.getBBox(), this.subChild.getBBox(), this.supChild.getBBox());
133133
const style = {'vertical-align': this.em(v)};
134-
this.base.toCHTML(this.chtml);
134+
this.baseChild.toCHTML(this.chtml);
135135
const stack = this.chtml.appendChild(this.html('mjx-script', {style}));
136-
this.sup.toCHTML(stack);
136+
this.supChild.toCHTML(stack);
137137
stack.appendChild(this.html('mjx-spacer', {style: {'margin-top': this.em(q)}}));
138-
this.sub.toCHTML(stack);
138+
this.subChild.toCHTML(stack);
139139
const corebox = this.baseCore.bbox;
140140
if (corebox.ic) {
141-
this.sup.chtml.style.marginLeft = this.em((1.2 * corebox.ic + .05) / this.sup.bbox.rscale);
141+
this.supChild.chtml.style.marginLeft = this.em((1.2 * corebox.ic + .05) / this.supChild.bbox.rscale);
142142
}
143143
}
144144

145145
/*
146146
* @override
147147
*/
148148
public computeBBox(bbox: BBox) {
149-
const basebox = this.base.getBBox();
150-
const subbox = this.sub.getBBox();
151-
const supbox = this.sup.getBBox();
149+
const basebox = this.baseChild.getBBox();
150+
const subbox = this.subChild.getBBox();
151+
const supbox = this.supChild.getBBox();
152152
bbox.empty();
153153
bbox.append(basebox);
154154
const w = bbox.w;

mathjax3-ts/output/chtml/Wrappers/munderover.ts

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ export class CHTMLmunder extends CHTMLmsub {
8585
this.chtml = this.standardCHTMLnode(parent);
8686
const base = this.chtml.appendChild(this.html('mjx-row')).appendChild(this.html('mjx-base'));
8787
const under = this.chtml.appendChild(this.html('mjx-row')).appendChild(this.html('mjx-under'));
88-
this.base.toCHTML(base);
88+
this.baseChild.toCHTML(base);
8989
this.script.toCHTML(under);
90-
const basebox = this.base.getBBox();
90+
const basebox = this.baseChild.getBBox();
9191
const underbox = this.script.getBBox();
9292
const [k, v] = this.getUnderKV(basebox, underbox);
9393
const delta = DELTA * this.baseCore.bbox.ic / 2;
@@ -104,7 +104,7 @@ export class CHTMLmunder extends CHTMLmsub {
104104
return;
105105
}
106106
bbox.empty();
107-
const basebox = this.base.getBBox();
107+
const basebox = this.baseChild.getBBox();
108108
const underbox = this.script.getBBox();
109109
const [k, v] = this.getUnderKV(basebox, underbox);
110110
const delta = DELTA * this.baseCore.bbox.ic / 2;
@@ -166,9 +166,9 @@ export class CHTMLmover extends CHTMLmsup {
166166
const over = this.chtml.appendChild(this.html('mjx-over'));
167167
const base = this.chtml.appendChild(this.html('mjx-base'));
168168
this.script.toCHTML(over);
169-
this.base.toCHTML(base);
169+
this.baseChild.toCHTML(base);
170170
const overbox = this.script.getBBox();
171-
const basebox = this.base.getBBox();
171+
const basebox = this.baseChild.getBBox();
172172
const [k, u] = this.getOverKU(basebox, overbox);
173173
const delta = DELTA * this.baseCore.bbox.ic / 2;
174174
over.style.paddingBottom = this.em(k);
@@ -187,7 +187,7 @@ export class CHTMLmover extends CHTMLmsup {
187187
return;
188188
}
189189
bbox.empty();
190-
const basebox = this.base.getBBox();
190+
const basebox = this.baseChild.getBBox();
191191
const overbox = this.script.getBBox();
192192
const [k, u] = this.getOverKU(basebox, overbox);
193193
const delta = DELTA * this.baseCore.bbox.ic / 2;
@@ -222,14 +222,14 @@ export class CHTMLmunderover extends CHTMLmsubsup {
222222
/*
223223
* @return{CHTMLWrapper) The wrapped under node
224224
*/
225-
public get under() {
225+
public get underChild() {
226226
return this.childNodes[(this.node as MmlMunderover).under];
227227
}
228228

229229
/*
230230
* @return{CHTMLWrapper) The wrapped overder node
231231
*/
232-
public get over() {
232+
public get overChild() {
233233
return this.childNodes[(this.node as MmlMunderover).over];
234234
}
235235

@@ -238,17 +238,17 @@ export class CHTMLmunderover extends CHTMLmsubsup {
238238
*
239239
* @override
240240
*/
241-
public get sub() {
242-
return this.under;
241+
public get subChild() {
242+
return this.underChild;
243243
}
244244

245245
/*
246246
* Needed for movablelimits
247247
*
248248
* @override
249249
*/
250-
public get sup() {
251-
return this.over;
250+
public get supChild() {
251+
return this.overChild;
252252
}
253253

254254
/*
@@ -274,12 +274,12 @@ export class CHTMLmunderover extends CHTMLmsubsup {
274274
const table = this.chtml.appendChild(this.html('mjx-box')).appendChild(this.html('mjx-munder'));
275275
const base = table.appendChild(this.html('mjx-row')).appendChild(this.html('mjx-base'));
276276
const under = table.appendChild(this.html('mjx-row')).appendChild(this.html('mjx-under'));
277-
this.over.toCHTML(over);
278-
this.base.toCHTML(base);
279-
this.under.toCHTML(under);
280-
const overbox = this.over.getBBox();
281-
const basebox = this.base.getBBox();
282-
const underbox = this.under.getBBox();
277+
this.overChild.toCHTML(over);
278+
this.baseChild.toCHTML(base);
279+
this.underChild.toCHTML(under);
280+
const overbox = this.overChild.getBBox();
281+
const basebox = this.baseChild.getBBox();
282+
const underbox = this.underChild.getBBox();
283283
const [ok, u] = this.getOverKU(basebox, overbox);
284284
const [uk, v] = this.getUnderKV(basebox, underbox);
285285
const delta = DELTA * this.baseCore.bbox.ic / 2;
@@ -300,9 +300,9 @@ export class CHTMLmunderover extends CHTMLmsubsup {
300300
return;
301301
}
302302
bbox.empty();
303-
const overbox = this.over.getBBox();
304-
const basebox = this.base.getBBox();
305-
const underbox = this.under.getBBox();
303+
const overbox = this.overChild.getBBox();
304+
const basebox = this.baseChild.getBBox();
305+
const underbox = this.underChild.getBBox();
306306
const [ok, u] = this.getOverKU(basebox, overbox);
307307
const [uk, v] = this.getUnderKV(basebox, underbox);
308308
const delta = DELTA * this.baseCore.bbox.ic / 2;

mathjax3-ts/output/chtml/Wrappers/scriptbase.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export class CHTMLscriptbase extends CHTMLWrapper {
5555
/*
5656
* @return{CHTMLWrapper} The base element's wrapper
5757
*/
58-
public get base() {
58+
public get baseChild() {
5959
return this.childNodes[(this.node as MmlMsubsup).base];
6060
}
6161

@@ -98,12 +98,12 @@ export class CHTMLscriptbase extends CHTMLWrapper {
9898
*/
9999
public toCHTML(parent: HTMLElement) {
100100
this.chtml = this.standardCHTMLnode(parent);
101-
const [x, v] = this.getOffset(this.base.getBBox(), this.script.getBBox());
101+
const [x, v] = this.getOffset(this.baseChild.getBBox(), this.script.getBBox());
102102
const style: StyleData = {'vertical-align': this.em(v)};
103103
if (x) {
104104
style['margin-left'] = this.em(x);
105105
}
106-
this.base.toCHTML(this.chtml);
106+
this.baseChild.toCHTML(this.chtml);
107107
this.script.toCHTML(this.chtml.appendChild(this.html('mjx-script', {style})));
108108
}
109109

@@ -114,7 +114,7 @@ export class CHTMLscriptbase extends CHTMLWrapper {
114114
* @override
115115
*/
116116
public computeBBox(bbox: BBox) {
117-
const basebox = this.base.getBBox();
117+
const basebox = this.baseChild.getBBox();
118118
const scriptbox = this.script.getBBox();
119119
const [x, y] = this.getOffset(basebox, scriptbox);
120120
bbox.append(basebox);
@@ -127,7 +127,7 @@ export class CHTMLscriptbase extends CHTMLWrapper {
127127
* @return{boolean} True if the base is an mi, mn, or mo (not a largeop) consisting of a single character
128128
*/
129129
protected isCharBase() {
130-
let base = this.base;
130+
let base = this.baseChild;
131131
if ((base.node.isKind('mstyle') || base.node.isKind('mrow')) && base.childNodes.length === 1) {
132132
base = base.childNodes[0];
133133
}
@@ -200,7 +200,7 @@ export class CHTMLscriptbase extends CHTMLWrapper {
200200
const display = this.node.attributes.get('displaystyle');
201201
return (!display && (this.node.getProperty('movablelimits') ||
202202
this.node.attributes.get('movablelimits') ||
203-
this.base.coreMO().node.attributes.get('movablelimits')));
203+
this.baseChild.coreMO().node.attributes.get('movablelimits')));
204204
}
205205

206206
/*
@@ -218,7 +218,7 @@ export class CHTMLscriptbase extends CHTMLWrapper {
218218
}
219219

220220
/*
221-
* Get the separation and offset for undercripts (TeXBoox Appendix G 13, 13a)
221+
* Get the separation and offset for underscripts (TeXBoox Appendix G 13, 13a)
222222
*
223223
* @param{BBox} basebox The bounding box of the base
224224
* @param{BBox} underbox The bounding box of the underscript

0 commit comments

Comments
 (0)