Next: , Previous: A single music expression, Up: Input files


10.1.4 Multiple scores in a book

A document may contain multiple pieces of music and texts. 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 {
  ..
}

However, if you want multiple output files from the same .ly file, then you can add multiple \book blocks, where each such \book block will result in a separate output. If you do not specify any \book block in the file, LilyPond will implicitly treat the full file as a single \book block, see File structure. 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" }
}


Next: , Previous: A single music expression, Up: Input files

This page is for LilyPond-2.10.33 (stable-branch).

Report errors to http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs.