When I try to use a command like \begin{theorem}[Something $x[y]$ something], I get an "extra } or forgotten $ error message". It seems like the ] in the equation is closing the optional argument even though the equation hasn't been ended!
What can I do about this?
{$x[y]$}the braces hide the inner[]– David Carlisle Jul 18 '19 at 20:22