This question is related to an attempt to fix the following warning in my case.

pdfTeX warning (ext4): destination with the same identifier (...) has been already used, duplicate ignored

I have a counter, say named thm. If I use it, and then reset it, and then use it (by use, I mean \refstepcounter), I would get the error above.

In my situation, I have other variables that helps differentiating between different these different instants. So I would like to be able to use these extra information to create new names for these destinations.

So, the short question: is it possible to define some replacement for \refstepcounter so I can set the name manually?

Thank you.

  • It is coming from hyperref package. Do you have empty chapters?
    – percusse
    Apr 10, 2014 at 21:31
  • Yes, I know that it's from hyperref. And I would like to be able to change the name manually. Is it possible?
    – brian
    Apr 10, 2014 at 21:32
  • It's not something that you did with the counters. There was a duplicate of it somehwere
    – percusse
    Apr 10, 2014 at 21:33
  • Whether it is something about the counter depends on how you view it. But if you could manually change the name of the destination, the problem will be fixed. Thanks.
    – brian
    Apr 10, 2014 at 21:38
  • Instead you can aavoid referring to different objects with the same counter or turn off the warning. This really looks like an XY problem so maybe you can include your use case to get a better directed answer by others too
    – percusse
    Apr 10, 2014 at 21:53

1 Answer 1


hyperref introduces \theH<counter>. If it exists it is used for the destination name instead of \the<counter>.

If the values of \the<counter> are not unique, define \theH<counter> with unique values using your other variables, e.g.:

\renewcommand*{\theH<counter>}{<other variable>.\the<counter>}

Pseudo code, the angle bracketed expressions need to be replaced, e.g.:


You must log in to answer this question.

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