MathJax v4 with v2 \color macro (original) (raw)

The MathJax v2 \color macro takes two arguments, the color and the math to be colored, where the v3 version follows the LaTeX approach, where it has one argument (the color) and switches the color for the rest of the expression.

The expression $\color{red}{Red}\ Black$ is rendered:

In v2 In v3/v4
colorviiredRedBlack\colorvii{red}{Red}\ BlackcolorviiredRedBlack colorredRedBlack\color{red}{Red}\ BlackcolorredRedBlack

To get the same effect in v4, use ${\color{red} Red}\ Black$ instead:

colorredRedBlack{\color{red} Red}\ BlackcolorredRedBlack

Or you can use the configuration

before the script that loads MathJax in order to retain the original v2 \color macro.