mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-13 06:58:40 +00:00
Fixed limit controls in textstyle
This commit is contained in:
@@ -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 === "^") {
|
||||
|
@@ -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 {
|
||||
|
Reference in New Issue
Block a user