Richard
Richard

Reputation: 16812

What is wrong with my MathJax square bracket syntax?

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?

Upvotes: 1

Views: 699

Answers (2)

Kiroul
Kiroul

Reputation: 535

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)   ]

Upvotes: 1

Richard
Richard

Reputation: 16812

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

Upvotes: -1

Related Questions