tags:

views:

330

answers:

2

I have a LaTeX document which contains the following:

\tableofcontents
\chapter{Chapter One}
\part{Part One}
...
\part{Final Part}
\chapter{Final Part Chapters}
\chapter{Chapter not Part of Part}

When I compile this to a PDF with hyperref, the last chapter is included as part of the final part in my bookmarks. (I'm including hyperref as shown below.)

\usepackage[xetex,breaklinks,a4paper]{hyperref}

What I would like to know is how to explicitly end the part before the final chapter, so that hyperref promotes this bookmark to top level when the PDF is created.

Any help would be appreciated.

+3  A: 

Heiko Oberdiek's bookmark package (an improvement on his work in hyperref) allows you do to this with its \bookmarksetup command.

\documentclass{book}
\usepackage{bookmark,hyperref}
\begin{document}
\tableofcontents
\chapter{Chapter One}
\part{Part One}
\part{Final Part}
\chapter{Final Part Chapters}

\bookmarksetup{startatroot}% this is it
\addtocontents{toc}{\bigskip}% perhaps as well

\chapter{Chapter not Part of Part}
\end{document}

The \bigskip parts adds a little space in the printed table of contents to visually separate the final chapter from the preceding "part".

Will Robertson
I was unaware the bookmark package exists. Its a pity that the tex-live distribution with Ubuntu does not include it, but the solution works perfectly. Thanks.
Barns
A: 

Just guessing:

\part{Final Part}
\chapter{Final Part Chapters}
\part*{}
\chapter{Chapter not Part of Part}
dmckee