TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a document with two sets of tables. The first set, numbered 1 to 5, are in the main body of the text. The second, numbered 1 to 3, are in an appendix.

When I use \ref to link to one of the tables in the appendix, the hyperlink in the PDF file links to the corresponding table in the main section (so a link to appendix table 1 links to main table 1). This warning message is provided:

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

Clearly this is a counter problem: when I reset the table counter in the appendix, there are two tables with a counter of 1 and hyperref just points to the first one.

Related problems have been discussed on this forum, and a number of discussions can be found online, but I haven't been able to figure out a solution to this particular problem. (It seems more straightforward to fix the problem for page numbers.) Also, I get the sense that the aliascnt package could work here, but I can't figure out how to make it work.

share|improve this question
What documentclass are you using, book? – Werner Aug 25 '11 at 1:46
No, just article class. – itzy Aug 25 '11 at 13:44
up vote 7 down vote accepted

Indeed, the problem comes from link anchors not having unique names. To provide those unique names, you can appropriately redefine \theHtable to guarantee that it will expand to a unique value (despite the counter resetting); for example:



  \centering Test

  \centering Test

  \centering Test



  \centering Test

  \centering Test


share|improve this answer
Great, thanks so much! – itzy Aug 25 '11 at 13:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.