2

If I set the counter of corollaries to follow theorem, cleveref incorrectly uses the label theorem in the text, rather than corollary. How can I correct this?

Minimum working example:

\documentclass{article}

\usepackage{amsthm}
\newtheorem{theorem}{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
% \newtheorem{corollary}{Corollary}    % This works

\usepackage{cleveref}


\begin{document}

\begin{theorem}  \label{thm1}
    Theorem level result.
\end{theorem}

\begin{corollary}  \label{cor1}
    Corollary of \cref{thm1}.
\end{corollary}

Reference to \cref{cor1}.

\end{document}

1 Answer 1

5

You need to load the cleveref package right before issuing the \newtheorem directives.

This is discussed in section 14.1 of the user guide of the cleveref package [highlighting added]:

enter image description here

1
  • 1
    One of the reasons why I always recommend loading packages first and then do settings.
    – egreg
    Jan 24 at 10:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.