| [ << General input and output ] | [Top][Contents][Index][ ? ] | [ Spacing issues >> ] | ||
| [ < Structure of a score ] | [ Up : Input structure ] | [ File structure > ] | ||
3.1.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 {
..
}
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" }
}
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 { … }
…
}
| [ << General input and output ] | [Top][Contents][Index][ ? ] | [ Spacing issues >> ] | ||
| [ < Structure of a score ] | [ Up : Input structure ] | [ File structure > ] | ||