6

The following is a (fairly) minimal example:

\documentclass{book}

\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{thmtools}

\declaretheoremstyle[
spaceabove=6pt, spacebelow=6pt,
headfont=\normalfont\bfseries,
notefont=\itshape, notebraces={(}{)},
bodyfont=\itshape,
postheadspace=1em
]{mystyle}

\declaretheorem[name=Theorem, parent=section, style=mystyle,
refname={Theorem,Theorems},
Refname={Theorem,Theorems}]{theorem}

\declaretheorem[name=Proposition, sibling=theorem, style=mystyle,
refname={Proposition,Propositions},
Refname={Proposition,Propositions}]{prop}

\usepackage{hyperref}
\hypersetup{%
colorlinks = true,
linkcolor = blue,
urlcolor = magenta,
citecolor = red,
pdfpagemode = UseNone,
pdfpagelayout = SinglePage,
pdfdisplaydoctitle = true,
plainpages = false}

\usepackage[capitalize]{cleveref}

\crefname{prop}{Proposition}{Propositions}

\begin{document}

\begin{prop}\label[prop]{prop:112}

Testing this out!
\end{prop}

\begin{prop}\label[prop]{prop:113}
Still Testing!
\end{prop}

\cref{prop:112} and \cref{prop:113}

\end{document}

The problem is that both links point to the first proposition. I also get the error

destination with the same identifier (name{prop.\\theHprop\040}) has been already used, duplicate ignored.

Does anyone know what steps I need to take to resolve this problem (I thought I had already done enough!). Perhaps it is pertinent, but I also get the error

Package thmtools warning: Your version of cleveref is too old!

but I just updated both packages!

2
  • 1
    Do you actually need cleverref? I mean, does hyperref's autoref not work for you?
    – Seamus
    Commented Sep 30, 2010 at 10:39
  • you might have to do something like \newcommand{\propositionautorefname}{proposition} to make it work (I can't remember exactly how hyperref's autoref works...
    – Seamus
    Commented Sep 30, 2010 at 13:00

1 Answer 1

2

Your example works properly for me. (No log file messages from thmtools). Package versions

hyperref.sty    2010/09/13 v6.81n Hypertext links for LaTeX
cleveref.sty    2010/09/04 v0.17.4 Intelligent cross-referencing
thmtools.sty    2010/08/09 v50
8
  • the links both link to the appropriate proposition?
    – Steve D
    Commented Sep 30, 2010 at 5:17
  • @Steve D: Yes, see drop.io/6tlpvro
    – Lev Bishop
    Commented Sep 30, 2010 at 6:04
  • @Lev Bishop: OK, I am no longer getting the thmtools warning. But I am still getting the duplicate warning, and the links are still not working. I am relatively new at this. Do you know what could be wrong?
    – Steve D
    Commented Sep 30, 2010 at 6:24
  • Maybe a very silly thing. But have you tried removing all .aux files before compiling again? Commented Sep 30, 2010 at 12:16
  • @Juan: Thanks for the suggestion, I tried that, still getting the duplicate error. Is there a way I can get version numbers, etc., for all the packages I'm using, if that would be helpful?
    – Steve D
    Commented Oct 1, 2010 at 1:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .