I am trying to use align and equation in standalone, but I get compiler errors even in the most basic of examples. For example,
\documentclass{standalone}
\usepackage{amsmath}
\begin{document}
\begin{align}
a = 1 \\
b=2
\end{align}
\end{document}
Gives
1 a.tex|10 error| Missing \endgroup inserted.
2 a.tex|10 error| Missing } inserted.
3 a.tex|10 warning| Overfull \hbox (23.61913pt too wide) detected at line 10
4 a.tex|10 error| LaTeX Error: \begin{document} ended by \end{align}.
5 a.tex|10 error| Missing $ inserted.
6 a.tex|10 error| Display math should end with $$.
7 a.tex|10 error| Extra \endgroup.
8 a.tex|12 error| Too many }'s.
Similar results with align*, equation, aligned. I as soon as I change the documentclass from standalone to article, it works. I'm sure I am making a silly error here. My platform is Debian, using the TexLive Full package(up to date).
edit: If I move the align block outside the document block, I get no errors(but of course, the pdf is empty)