A brief search didn't turn out a dupe, but recently I have found that the spoiler-markup >!
doesn't work well with multilined MathJax, especially displaystyle:
>! $$\begin{pmatrix}1&2\\
3&4\end{pmatrix}$$
! $$\begin{pmatrix}1&2\\ 3&4\end{pmatrix}$$
>! $$\begin{pmatrix}1&2\\
>! 3&4\end{pmatrix}$$
! $$\begin{pmatrix}1&2\\ >! 3&4\end{pmatrix}$$
How can this be fixed other than putting all the MathJax in a single line wich can be very bad for long code? Also note that the centering of $$...$$
isn't working in spoilers either during preview.
>! $$\begin{pmatrix}1&2\\3&4\end{pmatrix}$$
$$\begin{pmatrix}1&2\\3&4\end{pmatrix}$$
\pmatrix{...}
wich will improve readability at least a little when in one line. $\endgroup$