\boldsymbol in macro fails to render correctly on first appearance
Created by: MichaelAllenWarner
Issue Summary
After the most recent MathJax update, it seems that a macro that has \boldsymbol followed by a symbol (like \boldsymbol \nabla) renders fine except on its first appearance in the page, which instead gets rendered as the literal letters "boldsymbol" followed by the symbol. I'm using the tex-chtml component (https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js), and it happens in every browser I try after yesterday's update.
Steps to Reproduce:
- Have the config like this:
window.MathJax = {
tex: {
macros: {
del: '\\boldsymbol \\nabla'
}
}
};
- Use the tex-chtml component like this:
<script type="text/javascript" id="MathJax-script" defer
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js">
</script>
- Include the
delmacro in equations on the page. - On its first appearance in the page (can be either inline-math or display-math), the macro gets rendered like this:
(and you can see it's rendered fine on the right side of the equation).
I can avoid the problem on my end by using '\\boldsymbol{\\nabla}' instead of '\\boldsymbol \\nabla' in the macro, but this does look like a new bug.
Technical details:
- MathJax Version: 3.1.0
- Client OS: Mac OS X 10.15.5
- Browser: (all browsers)
