MathJax icon indicating copy to clipboard operation
MathJax copied to clipboard

Square brackets not shown in aligned environment

Open abnerlee opened this issue 3 years ago • 1 comments

Replace the text below with the details of the issue you are facing.
DO NOT simply erase the form and type a free-form response.

Issue Summary

Square brackets not shown in aligned environment

Steps to Reproduce:

Try

$$
\begin{aligned}
[a]
\end{aligned}
$$

$$
\begin{aligned}
a[a]
\end{aligned}
$$

in https://www.mathjax.org/#demo

The first [a] is not rendered.

Technical details:

  • MathJax Version: 3.2.2
  • Client OS: (Mac OS X 12.4)
  • Browser: (Chrome 100)

Supporting information:

Based on https://tex.stackexchange.com/a/281943

Update Jan. 2021. The current version of the amsmath package, 2020/09/23 v2.17i, no longer generates the problem described in the OP's query. Hence, taking "precautions" such as inserting a \relax or {} element before a [ element at the start of a line is no longer necessary.

Maybe the newer / correct spec is to render the first [a] ?

abnerlee avatar Jun 23 '22 10:06 abnerlee

Thanks for the report. Apparently this is a recent change in behavior for LaTeX. We will look into updating that TeX input jax to correspond.

In addition to the other suggestions from the TeX StackExchange post that you cite, you could also use

$$
\begin{aligned}[]
[a]
\end{aligned}
$$

to get the desired output.

dpvc avatar Jun 26 '22 21:06 dpvc