I am using the Legrand Orange Book as a template but for some reason, the links for my appendix are pointing to previous chapters. Here is my preamble:

\definecolor{ocre}{RGB}{243,102,25} highlighting throughout the book

%   Font Settings



% Fonts

%   Bibliography






I wanted to sperate out my Appendix into different chapters so I went with the approach above. Could somebody tell me why my hyperlinks for the Appendix point to previous chapters? For example, when I click on the Appendix A link in the ToC, it takes me to chapter 1. Also, in the structure file related to this template, I have:

\hypersetup{hidelinks,backref=true,pagebackref=true,hyperindex=true,colorlinks=false,breaklinks=true,urlcolor= ocre,bookmarks=true,bookmarksopen=false,pdftitle={Title},pdfauthor={Author}}
  • 2
    You probably receive warnings in your .log about duplicate destinations... yes? – Werner Jun 8 '15 at 17:40
  • well, i'm pretty sure Werner's right that you have duplicate labeling going on, but it's impossible to say without a complete but minimal working example. right now, everything depends on what's actually behind those \include statements. – Sean Allred Jun 8 '15 at 18:56
  • The \appendix stuff resets the chapter number to 1 for the first appendix and the output format to A etc. This must confuse hyperref, unless hypertexnames=false option is used – user31729 Jun 8 '15 at 19:53
  • @Chritian Hupfer, your solution works. If I put the hypertexnames=false, the links point correctly now. Thanks. – Joe Jun 8 '15 at 20:01
  • 1
    @pluton: Answer added – user31729 Jan 5 '16 at 16:30

The MWE by the O.P. isn't compilable (some missing % characters etc., \included files we've no access to etc.)

There's neither hyperref loaded nor a \tableofcontents at all.

I can only guess, but I think that the O.P. uses \setcounter{chapter}{0} and \renewcommand{\thechapter}{\Alph{chapter}} right before the appendix chapter start instead of \appendix

This will confuse hyperref and force to redo the symbolic anchor chapter.1 (being the same for the real Chapter 1 and for Appendix A then)

One cheap solution is to provide \hypersetup{hypertexnames=false} -- this should be the last resort.

The better way is to provide a new anchor name for appendix chapters, say \renewcommand{\theHchapter}{appendixchapter.\arabic{chapter}} (the\theH...` commands provide the anchors!)

The best way is to use \appendix.




\chapter{Foo appendix}



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.