3.2.2 Multiple scores in a book

A document may contain multiple pieces of music and text. Examples of these are an etude book, or an orchestral part with multiple movements. Each movement is entered with a \score block,

\score {
  …music…
}

and texts are entered with a \markup block,

\markup {
  …text…
}

All the movements and texts which appear in the same ‘.ly’ file will normally be typeset in the form of a single output file.

\score {
  
}
\markup {
  
}
\score {
  
}

One important exception is within lilypond-book documents, where you explicitly have to add a \book block, otherwise only the first \score or \markup will appear in the output.

The header for each piece of music can be put inside the \score block. The piece name from the header will be printed before each movement. The title for the entire book can be put inside the \book, but if it is not present, the \header which is at the top of the file is inserted.

\header {
  title = "Eight miniatures"
  composer = "Igor Stravinsky"
}
\score {
  \header { piece = "Romanze" }
  …
}
\markup {
   …text of second verse…
}
\markup {
   …text of third verse…
}
\score {
  \header { piece = "Menuetto" }
  …
}

Pieces of music may be grouped into book parts using \bookpart blocks. Book parts are separated by a page break, and can start with a title, like the book itself, by specifying a \header block.

\bookpart {
  \header {
    title = "Book title"
    subtitle = "First part"
  }
  \score { … }
  …
}
\bookpart {
  \header {
    subtitle = "Second part"
  }
  \score { … }
  …
}

LilyPond — Notation Reference v2.23.82 (development-branch).