Table of contents

Revision as of 07:29, 26 December 2025 by Lemzwerg (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A table of contents is included using \markuplist \table-of-contents; its items are added with the \tocItem command.

\version "2.24"

#(set-default-paper-size "a7" 'landscape)
#(set-global-staff-size 11)

\paper {
  print-all-headers = ##t
}

\book {
  \markuplist \table-of-contents
  \pageBreak

  \tocItem \markup { The first score }
  \score {
    {
      c'1 \pageBreak
      \mark \default \tocItem \markup { Mark A }
      d'1
    }
    \header { title = "First score" }
  }
  \pageBreak

  \tocItem \markup { The second score }
  \score {
    { e'1 }
    \header { title = "Second score" }
  }
}