Fixed limit controls in textstyle

This commit is contained in:
Jeff Everett
2015-07-27 14:15:30 -06:00
parent 4be3931cb5
commit 9b0f42ea50
5 changed files with 5 additions and 3 deletions

View File

@@ -261,8 +261,9 @@ Parser.prototype.parseAtom = function(pos, mode) {
this.lexer, currPos);
}
else {
var limits = lex.text == "\\limits";
var limits = lex.text === "\\limits";
base.result.value.limits = limits;
base.result.value.alwaysHandleSupSub = true;
currPos = lex.position;
}
} else if (lex.text === "^") {

View File

@@ -104,7 +104,8 @@ var shouldHandleSupSub = function(group, options) {
} else if (group.type === "op") {
// Operators handle supsubs differently when they have limits
// (e.g. `\displaystyle\sum_2^3`)
return group.value.limits && options.style.size === Style.DISPLAY.size;
return group.value.limits &&
(options.style.size === Style.DISPLAY.size || group.value.alwaysHandleSupSub);
} else if (group.type === "accent") {
return isCharacterBox(group.value.base);
} else {