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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just have a text divided in two parts. I used the bookmark package, and in the pdf file the bookmarks are shown. Since I consider the \part bookmark nonsense, I wanted shown just the bookmarks of the lower levels (\chapter, \section, etc. ...). How can I do this? P:S: I also used the hyperref package, maybe is in conflict with that?

share|improve this question
    
Untested: \usepackage[level=chapter]{bookmark} – Arash Esbati Feb 13 at 20:59
    
It doesn't work... – Francesco Feb 13 at 21:06
up vote 4 down vote accepted

If the toclevel@part is shifted downwards to some value not normally used by bookmarks, it won't be shown at all.

However, the chapter bookmarks are nevertheless shown indented in the tree. This can be prevented using \bookmarksetup{level=part}

\documentclass{book}

\usepackage{hyperref}
\usepackage{bookmark}


\makeatletter
\renewcommand{\toclevel@part}{10}
\makeatother
\bookmarksetup{level=part}
\begin{document}
\tableofcontents
\part{One}
\chapter{foo}

\chapter{Two}

\part{Second}


\end{document}
share|improve this answer

Ok I solved, bookmarks package automatic disable option of hyperref package regarding bookmarks. The option are differents according which package you're using. If you use bookmark package you should write the option

\usepackage[open, openlevel=0]{bookmarks}

To show just the \part and the \chapter bookmarks at the opening. If the level is set to 1 it would show also show all the \section. Bookmarks not removed at all, but it's however useful. According to Chris's answer, you can cancel from "makeatletter" to "\bookmarksetup{level=part}" and insert my option, it's the same (I tried kind randomised, but it worked!)

share|improve this answer

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.