What is wrong with my MathJax square bracket syntax?

Viewed 109

This mathjax expression (in an asciidoctor document in a VS Code preview using asciidoctor-vscode) fails to render correctly:

stem:[  = x_l = x_( ([m]+1) /2)   ]

The ] after the m acts like a ) for the _, and ends it early. How can I force the parser to understand my brackets please?

2 Answers

If the inline stem equation contains a right square bracket, you must escape this character using a backslash.

Found in Equations and Formulas (STEM), see example 4. What you want to write is:

stem:[  = x_l = x_( ([m\]+1) /2)   ]

MathJax is rubbish, rather use latexmath:[ = x_l = x_{\frac{[m\]+1}{2}} ]

Related