I want to have a style of Theorem 1
, and the next one is Theorem 1'
with the help of Amsthm package.
The following code seems alright, but can't be compiled:
\documentclass{beamer}
\newtheorem{mthm}{Theorem}
\newtheorem{thm}{Theorem}
\renewcommand{\themthm}{\ref{thm:1}'}
\begin{document}
\begin{frame}
\begin{thm}\label{thm:1}
test
\end{thm}
\begin{mthm}
test
\end{mthm}
\end{frame}
\end{document}
The err. log is :
! Missing \endcsname inserted.
<to be read again>
\csname\endcsname
l.16 \end{frame}
?
! Emergency stop.
<to be read again>
\csname\endcsname
l.16 \end{frame}
I find the err cased by the \renewcommand{\themthm}{\ref{thm:1}'}
line but how to fix this?
Best Answer
First possibility: non-shared counters
Output
Second possibility: shared counters
amsthm
is not needed, but loading it, it doesn't cause any conflict.