I'm using ntheorem and cleveref to make my life easier. The problem is that the produced references look like:
- If I use
\cref: ?? [theorem][22][4]4.22 - If I use
\autoref, butcleverefis loaded : ?? [theorem][22][4]4.22 - If I use
\autoref, butcleverefis not loaded : Theorem 4.22 (correct)
I also follow the instructions in the manual for cleveref and load it last. Below is a minimal example that reproduces this behavior
\documentclass[11pt,a4paper,titlepage]{memoir}
\usepackage[]{ntheorem}
\newtheorem{theorem}{Theorem}
\theoremstyle{nonumberplain}
\theorembodyfont{\normalfont}
\theoremsymbol{\ensuremath{\square}}
\newtheorem{proof}{Proof}
\usepackage{cleveref}
\title{Debugging}
\author{Somebody}
\begin{document}
\begin{theorem}
\label{thm-foo}
Foo.
\end{theorem}
Please see \cref{thm-foo}
\end{document}
The list of files
*File List*
memoir.cls 2009/09/21 v1.61803398b configurable book, report, article document class
ifpdf.sty 2009/04/10 v2.0 Provides the ifpdf switch (HO)
ifxetex.sty 2009/01/23 v0.5 Provides ifxetex conditional
ifluatex.sty 2009/04/17 v1.2 Provides the ifluatex switch (HO)
etex.sty 1998/03/26 v2.0 eTeX basic definition package (PEB)
mem11.clo 2008/01/30 v0.3 memoir class 11pt size option
mempatch.sty 2009/07/24 v6.0f Patches for memoir class v1.6180339
ntheorem.sty 2005/07/07 1.25
cleveref.sty 2009/09/22 v0.14.2 Intelligent cross-referencing
***********
Does anyone know what might be causing this?
\autorefis ahyperrefcommand, my guess is that you overlooked the fact thatcleverefmust be loaded afterhyperref. See also tex.stackexchange.com/questions/53191/… – lockstep Dec 13 '12 at 15:05cleverefis the latest included package. Thanks for noting that - I added it to the question. – user182 Dec 13 '12 at 15:13hyperrefand using\autorefalong with\cref. – egreg Dec 13 '12 at 15:35