hyperref / cleveref / thmtools 存在问题

hyperref / cleveref / thmtools 存在问题

以下是一个(相当)简单的例子:

\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}

问题是两个链接都指向第一个命题。我还得到了错误

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

有人知道我需要采取什么步骤来解决这个问题吗(我以为我已经做得够多了!)。也许这是相关的,但我也得到了错误

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

但我刚刚更新了两个包!

答案1

您的示例对我来说很有效。(没有来自 thmtools 的日志文件消息)。软件包版本

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

相关内容