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!

Steve D
  • 712
  • 1
    Do you actually need cleverref? I mean, does hyperref's autoref not work for you? – Seamus Sep 30 '10 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 Sep 30 '10 at 13:00

1 Answers1

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
Lev Bishop
  • 45,462
  • the links both link to the appropriate proposition? – Steve D Sep 30 '10 at 05:17
  • @Steve D: Yes, see http://drop.io/6tlpvro – Lev Bishop Sep 30 '10 at 06: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 Sep 30 '10 at 06:24
  • Maybe a very silly thing. But have you tried removing all .aux files before compiling again? – Juan A. Navarro Sep 30 '10 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 Oct 01 '10 at 01:19
  • You can get version numbers by putting \listfiles as the first line of your document. The version numbers are listed in the log file. – Lev Bishop Oct 01 '10 at 02:06
  • OK I got a hyperref version of 2008/11/18 v6.78m, but I just installed the newest version? – Steve D Oct 01 '10 at 02:46
  • Alright, well after fighting this for a while, I finally just switched to TeXLive 2010, and it works like a charm. Thanks for everyone who helped out! – Steve D Oct 01 '10 at 05:55