As it says in the cleveref documentation hyperref must be loaded before cleveref. But at me I have to load at least one package between them and I would really like to know why.
The not working minimal example is
\documentclass{scrartcl}
\usepackage{amsthm}
\usepackage{hyperref}
\usepackage{cleveref}
\theoremstyle{definition}
\newtheorem{Def}{Definition}
\newtheorem{Lemma}[Def]{Lemma}
\begin{document}
a
\begin{Lemma}
\label{Lem:fastdis}
\[ a+b=c? \]
\end{Lemma}
\end{document}
This just gives an error and doesn't compile, but switching amsthm and hyperref like this
\documentclass{scrartcl}
\usepackage{hyperref}
\usepackage{amsthm}
\usepackage{cleveref}
\theoremstyle{definition}
\newtheorem{Def}{Definition}
\newtheorem{Lemma}[Def]{Lemma}
\begin{document}
a
\begin{Lemma}
\label{Lem:fastdis}
\[ a+b=c? \]
\end{Lemma}
\end{document}
it compiles without even a warning. Why do i need to load a package between them?
amsthmbetweenhyperrefandcleverefseems to solve the issue. – egreg May 10 '13 at 15:37