Flatten ParseNodes: "supsub" and related ("accent", "accentUnder", "horizBrace", "xarrow", "op"). (#1542)

This commit is contained in:
Ashish Myles
2018-08-03 01:06:02 -04:00
committed by ylemkimon
parent c7145f0ff0
commit fd6690b988
16 changed files with 215 additions and 278 deletions

View File

@@ -101,25 +101,19 @@ defineFunction({
const baseOp = {
type: "op",
mode: baseArg.mode,
value: {
type: "op",
limits: true,
alwaysHandleSupSub: true,
symbol: false,
suppressBaseShift: funcName !== "\\stackrel",
value: ordargument(baseArg),
},
limits: true,
alwaysHandleSupSub: true,
symbol: false,
suppressBaseShift: funcName !== "\\stackrel",
value: ordargument(baseArg),
};
const supsub = {
type: "supsub",
mode: shiftedArg.mode,
value: {
type: "supsub",
base: baseOp,
sup: funcName === "\\underset" ? null : shiftedArg,
sub: funcName === "\\underset" ? shiftedArg : null,
},
base: baseOp,
sup: funcName === "\\underset" ? null : shiftedArg,
sub: funcName === "\\underset" ? shiftedArg : null,
};
return {