In a beamer presentation, I would like to state a theorem in such a way that the citation appears next to the 'Theorem'. It should look something like
Theorem [AB, Theorem 1]
This is a theorem.
Instead, I only manage to produce either:
Theorem ([AB])
This is a theorem.
using
\begin{theorem}[\cite{voidref}]
This is a theorem.
\end{theorem}
But whenever I try to include the precise numbering of the theorem using
\begin{theorem}[\cite[Theorem~1]{voidref}]
This is a theorem.
\end{theorem}
I get an error. The only thing I managed to do so far is something like
Theorem
[AB, Theorem 1]This is a theorem.
using the following.
\begin{theorem}\cite[Theorem~1]{voidref}
This is a theorem.
\end{theorem}
A sample code is written below.
\documentclass{beamer}
\usepackage{graphicx} % Required for inserting images
\title{This is a test}
\begin{document}
\begin{frame}{Introduction}
This is a frame. It contains a theorem.
\begin{theorem}[\cite{voidref}]
This is a theorem.
\end{theorem}
\end{frame}
\begin{frame}
\frametitle{References}
\bibliographystyle{alpha}
\bibliography{refs}
\end{frame}
\end{document}
where the refs.bib
file contains the single entry
@article {voidref,
AUTHOR = {Alpha Beta},
TITLE = {An unknown reference},
JOURNAL = {An unknown journal},
}