Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
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
add comment

1 Answer 1

up vote 5 down vote accepted

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

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.