Skip to content

Commit

Permalink
Merge pull request #1000 from mathjax/issue3091
Browse files Browse the repository at this point in the history
Propery handle placement of scripts on \vcenter, \vbox, and \vtop (mathjax/MathJax#3091)
  • Loading branch information
dpvc committed Sep 15, 2023
2 parents f2ff031 + 608e680 commit f30ee10
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ts/output/common/Wrappers/scriptbase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -462,12 +462,13 @@ export function CommonScriptbaseMixin<
*/
public getBaseCore(): WW {
let core = this.getSemanticBase() || this.childNodes[0];
let node = core?.node;
while (core &&
((core.childNodes.length === 1 &&
(core.node.isKind('mrow') || core.node.isKind('TeXAtom') ||
core.node.isKind('mstyle') || core.node.isKind('mpadded') ||
core.node.isKind('mphantom') || core.node.isKind('semantics'))) ||
(core.node.isKind('munderover') &&
(node.isKind('mrow') || node.isKind('TeXAtom') ||
node.isKind('mstyle') || (node.isKind('mpadded') && !node.getProperty('vbox')) ||
node.isKind('mphantom') || node.isKind('semantics'))) ||
(node.isKind('munderover') &&
(core as any as CommonMunderover<N, T, D, JX, WW, WF, WC, CC, VV, DD, FD, FC>).isMathAccent))) {
this.setBaseAccentsFor(core);
core = core.childNodes[0];
Expand Down

0 comments on commit f30ee10

Please sign in to comment.