I have a document with multiple pieces and a Table of Contents. MWE:

\markuplist \table-of-contents

\tocItem "Song 1"
\score {
    \new Staff { c d e }
    \header { piece = "Song 1" }

\tocItem "Song 2"
\score {
    \new Staff { c d e }
    \header { piece = "Song 2" }

This works as expected, except that Lilypond doesn't write a PDF Document Outline (the thing marked in red in the following screenshot, I'm not quite sure how this is called, which is also why I found it difficult search for my problem).

enter image description here

I'd really like to have that in my PDF document. Does anyone know how I can make lilypond create such an outline?


1 Answer 1


I believe this is now supported in LilyPond 2.22, as suggested by this note in the list of changes:

PDF bookmarks are now supported and allow for \tocItem entries to appear in the ‘table of contents’ panel of PDF viewers that support it.

  • I'm using 2.22.2 and PDF bookmarks did not generate for my table of contents.
    – Scott
    Sep 7, 2022 at 6:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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