I want to number all theorems and corollaries on the same (section) counter. But when I do this, cleveref names them both 'theorem'. Here is a minimal example:
\documentclass{amsart}
\usepackage{amsthm, cleveref}
%\crefname{theorem}{theorem}{theorems}
%\crefname{corollary}{corollary}{corollaries}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{corollary}[theorem]{Corollary}
\begin{document}
\section{Section title}
\begin{theorem}\label{thm:test}
Here is the theorem.
\end{theorem}
\begin{corollary}\label{cor:test}
Here is the corollary.
\end{corollary}
The theorem reference is given by \cref{thm:test} and the corollary reference is given by \cref{cor:test}.
\end{document}
Here, the corollary reference is 'theorem 1.2'. This problem persists even when explicitly stating the crefname.
Any suggestions?
amsthm
must be loaded beforecleveref
. Furthermore, it appears that the\newtheorem
commands must appear aftercleveref
is loaded. – Theft