The problem

Hi. I'm currently writing my thesis and have my equations numbered within sections. I also use subequations from amsmath. When I use amsmath, hyperref and cleveref together, however, I get 2 warnings about destinations with the same identifier. The result is that \cref{eq:2a} gets the correct number in the pdf but the hyperlink points to eq:1a.





This is a test.

\section{Section 1}


\section{An error}



The aux

Sure enough,

\newlabel{eq:1}{{0.1.1}{1}{Section 1\relax }{equation.}{}}
\newlabel{eq:1a}{{0.1.1a}{1}{Section 1\relax }{equation.0.0.1a}{}}
\@writefile{toc}{\contentsline {section}{\numberline {0.2}An error}{1}{section.0.2}}
\newlabel{eq:2}{{0.2.1}{1}{An error\relax }{equation.}{}}
\newlabel{eq:2a}{{0.2.1a}{1}{An error\relax }{equation.0.0.1a}{}}


pdfTeX warning (ext4): destination with the same identifier (name{equation.0.0.1a}) has been already used, duplicate ignored
pdfTeX warning (ext4): destination with the same identifier (name{equation.}) has been already used, duplicate ignored

What to do?

All packages have been updated too. So I've tried a few things that can get this to work without any warnings but none is an ideal solution from my point of view.

  1. Remove all subequations
  2. Remove line \numberwithin{equation}{section}
  3. Remove package cleveref
  4. Remove package hyperref

This in no doubt related to Hyperref jumps to the wrong equation if the equation has a \tag and cleveref is used and also Cross-references linking to wrong equations using `hyperref` but I can't manage to use those Q&As to help me here.

I'd really appreciate it if anybody could shed some light on this issue or suggest a workaround.

Thanks in advance!

  • Welcome to TeX.SE, and many thanks for posting such a clear and simple MWE. I can reproduce the warning messages you've come across. Do note that they are warning rather than error messages. AFAICT, all cross-references one can generate with \ref, \autoref, and \cref are correct. Thus, the warning messages may be of no importance. I suspect they have something to do with what the subequations environment has to set up in order to get its job done; note that the label(s) set up by the subequations environment don't seem to be used directly by either hyperref or cleveref.
    – Mico
    Aug 5, 2012 at 12:39
  • Thanks very much for the prompt reply. You are right that the \cref command works, correctly referencing the equations. However, I have noticed that the hyperlinks in the pdf point to the wrong equation. In this example, a link generated by \cref{eq:2a} points to eq:1a even though it is correctly labelled in the pdf. It seems as though the labels are used by hyperref but not cleveref. I'm quite keen to know if anybody has any ideas on getting the hyperlinks working correctly.
    – J-P
    Aug 5, 2012 at 15:02
  • The parent equation is the same. Aug 5, 2012 at 15:13
  • OK, I see what you mean now -- and I can reproduce the problem, i.e., a cross-reference to equation 2.1a gets the correct number but is hyperlinked to equation 1.1a. I've never encountered this problem before. Maybe it has something to do with a couple of recent updates applied to the hyperref package.
    – Mico
    Aug 5, 2012 at 16:02

1 Answer 1


So I found the following solution by playing around with when packages and lines are called and it turns out that if the \numberwithin{}{} line is called before \cleveref, there are no warnings and hyperlinks work as expected, i.e.




I have no idea what's going on beneath the hood of these packages so I'd be curious to know why this works. It seems (to me at least) that this is quite strange behaviour between hyperref and cleveref but perhaps this is to be expected.

In the mean time, thanks to all those who had a look at this problem for me!

  • Saved my day! Just sharing: Other solutions proposed hypertexnames=false option for hyperref-package. But doing so apparently has the downside of destroying the index (cf here and there). This solution works well without such negative side effects.
    – m8mble
    Dec 13, 2018 at 14:00
  • Sheer genius, 30 warnings gone in a flash.
    – encore
    Nov 19, 2019 at 17:07
  • Saved my day also. BTW I do not use cleveref , but still I was putting \numberwithin{equation}{subsection} before hyperref, and this was damaging PDF identifiers
    – am70
    Oct 12, 2023 at 10:55

You must log in to answer this question.

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