Make sure embelished large ops are type OP not ORD to get spacing right

This commit is contained in:
Davide P. Cervone 2011-04-20 20:59:58 -04:00
parent 2860efd523
commit edd14c6258
8 changed files with 14 additions and 10 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

View File

@ -277,10 +277,14 @@
STACKITEM.mml = STACKITEM.Subclass({ STACKITEM.mml = STACKITEM.Subclass({
type: "mml", isNotStack: TRUE, type: "mml", isNotStack: TRUE,
Push: function () { Push: function () {
// embellished are type ORD in TeX (but not MML) so wrap them in TeXAtom // Embellished are type ORD in TeX (but not MML) so wrap them in TeXAtom.
// Make sure large ops are type OP.
for (var i = 0, m = arguments.length; i < m; i++) { for (var i = 0, m = arguments.length; i < m; i++) {
if (arguments[i].type !== "mo" && arguments[i].isEmbellished()) if (arguments[i].type !== "mo" && arguments[i].isEmbellished()) {
{arguments[i] = MML.TeXAtom(arguments[i]).With({isEmbellishedWrapper: TRUE})} arguments[i] = MML.TeXAtom(arguments[i]).With({isEmbellishedWrapper: TRUE});
if (arguments[i].data[0].CoreMO().texClass === MML.TEXCLASS.OP)
{arguments[i].texClass = MML.TEXCLASS.OP}
}
} }
this.data.push.apply(this.data,arguments); this.data.push.apply(this.data,arguments);
}, },