Fix \mathop to produce <mi> rather than <mo> and add &ApplyFunction; when needed. This also handles \operatorname.

This commit is contained in:
Davide P. Cervone 2011-04-24 11:10:45 -04:00
parent 3a8c20b372
commit eb79363766
8 changed files with 9 additions and 14 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

@ -1237,13 +1237,8 @@
var arg = this.GetArgument(name);
var match = arg.match(/^\s*\\rm\s+([a-zA-Z0-9 ]+)$/);
if (match) {
mml = this.mmlToken(MML.mo(match[1]).With({
movablelimits: TRUE, movesupsub: TRUE,
mathvariant: MML.VARIANT.NORMAL,
form: MML.FORM.PREFIX,
texClass: MML.TEXCLASS.OP
}));
mml.useMMLspacing &= ~mml.SPACE_ATTR.form; // don't count this explicit form setting
def.mathvariant = MML.VARIANT.NORMAL;
mml = STACKITEM.fn(this.mmlToken(MML.mi(match[1]).With(def)));
} else {mml = MML.TeXAtom(TEX.Parse(arg,this.stack.env).mml()).With(def)}
} else {mml = MML.TeXAtom(this.ParseArg(name)).With(def)}
this.Push(mml);