Skip to content

Commit

Permalink
Merge pull request #1059 from mathjax/issue3183
Browse files Browse the repository at this point in the history
Make stretchy paried delimiters not be class INNER.  (mathjax/MathJax#3183)
  • Loading branch information
dpvc authored Mar 8, 2024
2 parents c0071b9 + 74daf8e commit 6847148
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ts/input/tex/mathtools/MathtoolsMethods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,8 @@ export const MathtoolsMethods: Record<string, ParseMethod> = {
pre: string = '', post: string = '') {
const star = parser.GetStar();
const size = (star ? '' : parser.GetBrackets(name));
const [left, right] = (star ? ['\\left', '\\right'] : size ? [size + 'l' , size + 'r'] : ['', '']);
const [left, right, after] = (star ? ['\\mathopen{\\left', '\\right', '}\\mathclose{}'] :
size ? [size + 'l' , size + 'r', ''] : ['', '', '']);
const delim = (star ? '\\middle' : size || '');
if (n) {
const args: string[] = [];
Expand All @@ -498,7 +499,7 @@ export const MathtoolsMethods: Record<string, ParseMethod> = {
post = ParseUtil.substituteArgs(parser, args, post);
}
body = body.replace(/\\delimsize/g, delim);
parser.string = [pre, left, open, body, right, close, post, parser.string.substring(parser.i)]
parser.string = [pre, left, open, body, right, close, after, post, parser.string.substring(parser.i)]
.reduce((s, part) => ParseUtil.addArgs(parser, s, part), '');
parser.i = 0;
ParseUtil.checkMaxMacros(parser);
Expand Down

0 comments on commit 6847148

Please sign in to comment.