I am trying to obtain an output such as
Theorem 4 (see [1, Theorem 12]). Statement of the theorem.
Separately, the commands \begin{Theorem}[comments]... and \cite[comments]{refname} work fine, assuming the comments of the Theorem contain nothing crazy, and assuming that \cite is outside the comment environment of the Theorem. But together, such as in the following minimal code
\documentclass{article}
\usepackage{amsmath, amssymb, amsthm}
\newtheorem{Theorem}{Theorem}
\begin{document}
\begin{Theorem}[see \cite[Theorem 12]{refname1}]
\end{Theorem}
\bibliographystyle{plain} \bibliography{b}
\end{document}
I get the error
! Argument of \@citex has an extra }.
Note that it happens already before Bibtex is run, that is when the compiler hasn't read what refname1 refers to. And running Bibtex doesn't change anything.
Any idea where this could come from or how to fix it?