Skip to content

Commit

Permalink
Merge pull request #771 from mathjax/issue2828
Browse files Browse the repository at this point in the history
Make sure math-in-text forms an ORD atom with textmacros. (mathjax/MathJax#2828)
  • Loading branch information
dpvc authored Feb 22, 2022
2 parents 1f80015 + f89b180 commit 902b1d2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ts/input/tex/textmacros/TextParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ export class TextParser extends TexParser {
*/
public PushMath(mml: MmlNode) {
const env = this.stack.env;
if (!mml.isKind('TeXAtom')) {
mml = this.create('node', 'TeXAtom', [mml]); // make sure the math is an ORD
}
for (const name of ['mathsize', 'mathcolor']) {
if (env[name] && !mml.attributes.getExplicit(name)) {
if (!mml.isToken && !mml.isKind('mstyle')) {
Expand Down

0 comments on commit 902b1d2

Please sign in to comment.