Previous: Multiple movements, Up: Global layout



7.5.11 Creating titles

Titles are created for each \score block, and over a \book.

The contents of the titles are taken from the \header blocks. The header block for a book supports the following

title
The title of the music. Centered on top of the first page.
subtitle
Subtitle, centered below the title.
subsubtitle
Subsubtitle, centered below the subtitle.
poet
Name of the poet, flush-left below the subtitle.
composer
Name of the composer, flush-right below the subtitle.
meter
Meter string, flush-left below the poet.
opus
Name of the opus, flush-right below the composer.
arranger
Name of the arranger, flush-right below the opus.
instrument
Name of the instrument, centered below the arranger.
dedication
To whom the piece is dedicated.
piece
Name of the piece, flush-left below the instrument.


breakbefore
This forces the title to start on a new page.

Here is a demonstration of the fields available,

     \paper {
       linewidth = 9.0\cm
       vsize = 10.0\cm
     }
     
     \book {
       \header {
         title = "Title,"
         subtitle = "the subtitle,"
         subsubtitle = "and the sub sub title"
         poet = "Poet"
         composer = "Composer"
         texttranslator = "Text Translator"
         meter = "Meter"
         arranger = "Arranger"
         instrument = "Instrument"
         piece = "Piece"
       }
     
       \score {
         \header {
           piece = "piece1"
           opus = "opus1"
         }
         { c'1 }
       }
       \score {
         \header {
           piece = "piece2"
           opus = "opus2"
         }
         { c'1 }
       }
     }

[image of music]

Different fonts may be selected for each element by using \markup, e.g.,

\header {
  title = \markup { \italic { The italic title } }
}

A more advanced option is to change the definitions of the following variables in the \paper block. The init file ly/titling-init.ly lists the default layout.

bookTitleMarkup
This is the title put over an entire \book block. Typically, it has the composer and the title of the piece
scoreTitleMarkup
This is the title put over a \score block within a \book. Typically, it has the name of the movement (piece field).
oddHeaderMarkup
This is the page header for odd-numbered pages.
evenHeaderMarkup
This is the page header for even-numbered pages. If unspecified, the odd header is used instead.

By default, headers are defined such that the page number is on the outside edge, and the instrument is centered.

oddFooterMarkup
This is the page footer for odd-numbered pages.
evenFooterMarkup
This is the page footer for even-numbered pages. If unspecified, the odd header is used instead.

By default, the footer has the copyright notice on the first, and the tagline on the last page.

The following definition will put the title flush left, and the composer flush right on a single line.

\paper {
  bookTitleMarkup = \markup {
   \fill-line @{
     \fromproperty #'header:title
     \fromproperty #'header:composer
   @}
  }
}
Read comments on this page, or add one.

This page is for LilyPond-2.5.11 (development-branch).

Report errors to <bug-lilypond@gnu.org>.

Other languages: English.
Using automatic language selection.