2

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?

1
  • Is your MWE complete? Memoir does not add bookmarks by default – people usually get them with packages such as hyperref or bookmark.
    – ienissei
    Commented Mar 20, 2012 at 19:34

1 Answer 1

2

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

1
  • That does it! Thank you. Note that Bookmark fixes things, regardless if Hyperref is used or not. Commented Mar 20, 2012 at 23:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .