The following produces (in overleaf) an error:
\documentclass{article}
\begin{document}
$$
s_l = \left\{
\begin{array}{ll}
[a] & \mbox{if } l = j; \\
[a] & b.
\end{array}
\right.
$$
\end{document}
When I do this:
\documentclass{article}
\begin{document}
$$
s_l = \left\{
\begin{array}{ll}
[a] & \mbox{if } l = j; \\
\mbox{[a]} & b.
\end{array}
\right.
$$
\end{document}
it works. That seems strange to me. Is there any comprehensible reason for this?
[]brackets on new line in header – Werner Dec 09 '20 at 17:46\relaxafter the\\should resolve the issue, Also, you should probably use\[...\]instead of$$...$$(the difference is subtle and only shows up in uncommon circumstances, but it's a good habit to build). – Don Hosek Dec 09 '20 at 17:46\relaxor\\{}resolves the issue. – StefanH Dec 09 '20 at 18:08