4

My document consists of three parts. Parts 1 and 3 contain chapters and sections. Part 2 however is a bound in research paper, and as such only contains sections and subsections, however no chapters. I use the hyperref package, and in the Table of Contents everything is displayed fine. However the PDF reader interprets the first section, "Introduction and motivation", as chapter and all following sections as subsections thereof:

table of content, PDF reader

How can I sort this out?

The document class used is amsbook.

  • In what way does the PDF reader consider the sections as chapters? By means of the location within the bookmarks? – Werner Sep 10 '12 at 18:18
6

If a section level is skipped, hyperref is not happy:

Package hyperref Warning: Difference (2) between bookmark levels is greater 
(hyperref)                than one, level fixed on input line 12.

Package bookmark implements a better algorithm that deals with this case and support other features (different actions, formatting of the bookmark, fewer LaTeX runs, …):

\documentclass{amsbook}
\usepackage{hyperref}
\usepackage{bookmark}
\bookmarksetup{
  numbered,
  open
}
\begin{document}
\tableofcontents

\part{First part}
\chapter{Chapter in first part}
\section{Section in first part}

\part{Second part}
\setcounter{section}{0}
\section{Section in second part}
\section{Second section in second part}

\part{Third part}
\chapter{Chapter in third part}
\end{document}

Bookmarks

  • It was as easy as that! Thanks for your great help! :) Maybe you can also help me out here: link – Britzel Sep 15 '12 at 12:04

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.