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.

I wish to create a multi-Book Memoir-class document without the need for Part sections. Doing so breaks the bookmarks appearing in the PDF document. E.g., if I have a document such as

\documentclass{memoir}
\begin{document}
\book{Book1}
 %\part{Part1}
  \chapter{Chapter1}
  \chapter{Chapter2}
  \chapter{Chapter3}
\end{document}

the PDF's "chapter" bookmarks are structured like

  • Book1
    • Chapter1
      • Charper2
      • Charper3

instead of the expected

  • Book1
    • Chapter1
    • Charper2
    • Charper3

I noticed that by uncommenting the Part section in the above MWE, the chapter bookmarks are correctly structured:

  • Book1
    • Part1
      • Charper1
      • Charper2
      • Charper3

Is there a way to forgo Parts and still get properly indented "chapter" bookmarks?

share|improve this question
    
Is your MWE complete? Memoir does not add bookmarks by default – people usually get them with packages such as hyperref or bookmark. –  ienissei Mar 20 '12 at 19:34
add comment

1 Answer

up vote 2 down vote accepted

If I add the hyperref package to your MWE, the new bookmark structure is wrong indeed:

\documentclass{memoir}
\usepackage{hyperref}
\begin{document}
\book{Book1}
 %\part{Part1}
  \chapter{Chapter1}
  \chapter{Chapter2}
  \chapter{Chapter3}
\end{document}

enter image description here

The solution is to load the bookmark package:

\documentclass{memoir}
\usepackage{hyperref}
\usepackage{bookmark}
\begin{document}
\book{Book1}
 %\part{Part1}
  \chapter{Chapter1}
  \chapter{Chapter2}
  \chapter{Chapter3}
\end{document}

enter image description here

share|improve this answer
    
That does it! Thank you. Note that Bookmark fixes things, regardless if Hyperref is used or not. –  Olivier Drolet Mar 20 '12 at 23:18
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.