Skip to content

Commit

Permalink
Mark mo as not accent if used in \overset and friends. (mathjax/MathJ…
Browse files Browse the repository at this point in the history
  • Loading branch information
dpvc committed Jan 25, 2022
1 parent 6b38558 commit 7dc7d0a
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions ts/input/tex/base/BaseMethods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,9 @@ BaseMethods.Overset = function(parser: TexParser, name: string) {
const top = parser.ParseArg(name);
const base = parser.ParseArg(name);
ParseUtil.checkMovableLimits(base);
if (top.isKind('mo')) {
NodeUtil.setAttribute(top, 'accent', false);
}
const node = parser.create('node', 'mover', [base, top]);
parser.Push(node);
};
Expand All @@ -641,7 +644,10 @@ BaseMethods.Underset = function(parser: TexParser, name: string) {
const bot = parser.ParseArg(name);
const base = parser.ParseArg(name);
ParseUtil.checkMovableLimits(base);
const node = parser.create('node', 'munder', [base, bot]);
if (bot.isKind('mo')) {
NodeUtil.setAttribute(bot, 'accent', false);
}
const node = parser.create('node', 'munder', [base, bot], {underaccent: false});
parser.Push(node);
};

Expand All @@ -656,7 +662,13 @@ BaseMethods.Overunderset = function(parser: TexParser, name: string) {
const bot = parser.ParseArg(name);
const base = parser.ParseArg(name);
ParseUtil.checkMovableLimits(base);
const node = parser.create('node', 'munderover', [base, bot, top]);
if (top.isKind('mo')) {
NodeUtil.setAttribute(top, 'accent', false);
}
if (bot.isKind('mo')) {
NodeUtil.setAttribute(bot, 'accent', false);
}
const node = parser.create('node', 'munderover', [base, bot, top], {accent: false, underaccent: false});
parser.Push(node);
};

Expand Down

0 comments on commit 7dc7d0a

Please sign in to comment.