user128166
user128166

Reputation:

Parts in pdflatex Table of Contents

I have a thesis in which I want to group some chapters together, using the \part command.

What I would like is to have the following:

So the last chapter should again be on the same level as the parts. In the table of contents of the text you can't really detect it, because Parts are on the same level anyway. The problem is that in the PDF, the chapter 6 is added under Part II. Does anyone know of a way to change that?

Upvotes: 3

Views: 3614

Answers (2)

Will Robertson
Will Robertson

Reputation: 64640

The bookmark package can do this quite nicely, among other things. It also only uses a single pass to embed PDF bookmarks into the document.

\part{...}
\chapter{...}
\bookmarksetup{startatroot}
\chapter{...}

Upvotes: 1

Martijn
Martijn

Reputation: 5673

The fact that LaTeX does it wrong probably means that something is wrong with the structure of your document: \part is not meant to group chapters, but to devide the document in parts. The difference is that every chapter should be in a part.

Try 'introduction' or 'preliminaries' as a name for the part containing chapter 1.

It might be possible to work around, but you'd have to redefine command throughout the document. It might be worthwhile to use \chapter* for chapters not in a pat, step the chapter-counter manually, and manually call \addcontentsline with the right argument. However, this is IMHO bad use of LaTeX: for well-structured documents, the standard LaTeX commands should suffice.

Upvotes: 1

Related Questions