6

I have several chapters and several appendices. I am using the hyperref package, and everything is numbered (all the chapters, appendices, etc...) My appendices also have sections within them and I refer to those sections in the text.

All the links to the appendices or anywhere in them go to the wrong place. For example, my toc links to appendix 1 go to chapter 1, not appendix 1. Links to appendix 2 go to chapter 2, etc... Also, links to sections within an appendix go to a random page in the chapter in the document (not to the appendix).

This is somewhat urgent so any help is greatly appreciated.

If I can't make the links work, is there a way to disable the linking just for appendices? Links work fine all over the document otherwise.

  • 3
    Welcome to TeX.SE. It would be helpful if you composed a fully compilable MWE including \documentclass and the appropriate packages that reproduces the problem. Otherwise we have to guess as to what is going wrong. – Peter Grill May 2 '14 at 18:22
  • 2
    Just before your \appendix, add \renewcommand{\theHchapter}{A\arabic{chapter}}, which should update the way hyperref sees a link to a chapter. These should cascade down to \sections as well (just a guess)... It all depends on your \documentclass and the way you construct your appendices. – Werner May 2 '14 at 18:23
  • Thank you so much! adding that command before \appendix did the trick. – user50989 May 3 '14 at 0:10
1

And use

\renewcommand{\theHsection}{A\arabic{section}}

if you have the same trouble with the article class. For more information, the hyperref manual explains how hyperref modifies important LaTeX counters (sections, chapter, ...) into \theH<counter> for referencing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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