2

When using fncychap, some of the bookmarks pointing to an appendix is linked to a random chapter. If I avoid using the package, which I am hoping not to, the bookmarks are all fine. I am using report.

The parts of the appendix marked as chapter, actually gets bookmarked to actual chapters, so Appendix A and Appendix B gets linked to Chapter 1 and Chapter 2

EDIT: Forgot to mention that I use LyX, and here is a file bookmarks_error.lyx Also, I use \usepackage[Bjarne]{fncychap}

chwi
  • 378
  • 4
    Please, make a minimal example showing the problem. In my test (some chapters and two appendices) I have none. – egreg Sep 21 '12 at 13:45
  • I updated the text. Only appendix content marked chapter (appendix A, B...) is broken. – chwi Sep 21 '12 at 13:49
  • 4
    Not in my experiment. Please, without some code exhibiting the problem, it's impossible to help. – egreg Sep 21 '12 at 14:00

2 Answers2

1

You need two fixes:

  • If you use \addcontentsline before a \chapter, make sure to end the page before, i.e. insert a page break (\cleardoublepage, \clearpage, you will find it in LyX in the Insert/ Formatting menu). And set an anchor using \phantomsection as TeX code.

page break and anchor

  • The numbering of chapters restarts in the appendix, which can generate the same internal link names (chapter.1 for Chapter 1, chapter.1 for Chapter A). Use the hyperref option called naturalnames to avoid this, because then you would get the internal link name chapter.A. You will find it in Document Settings/ PDF Properties/ Hyperlinks:

hyperlink options

Stefan Kottwitz
  • 231,401
0

You can resolve a problem by taking the \fncychap before \hyperref:

\usepackage{fncychap}
\usepackage[]{hyperref}
Stefan Pinnow
  • 29,535
Rejzi
  • 1