I have theorem
environments that have the same theoremstyle which I define through amsthm
. I want them all to share the same counter. This way, a lemma that follows theorem 1.2.6 will have the number 1.2.7. I would like to use cleveref
to refer to this environments. I use the memoir
documentclass.
However, the output does not correctly reference the environment name. Does this have to do with the fact that I use the optional [theorem]
in the \newtheorem{lemma}
definition?
MWE
\documentclass{memoir}
\usepackage{amsthm}
% Defining a theorem style that has bold head and italic body
\newtheoremstyle{italic}{5pt}{5pt}{\itshape}{}{}{}{.5em}
{\bfseries{\thmname{#1}~\thmnumber{#2}.}\thmnote{~\textnormal{(#3)}}}
\theoremstyle{italic}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\usepackage[capitalise]{cleveref}
\begin{document}
\begin{theorem}\label{thm1}
This is a theorem.
\end{theorem}
\begin{lemma}\label{lem1}
This is a lemma.
\end{lemma}
\cref{thm1} \cref{lem1}
\end{document}
Output
Desired output