# Taking LilyPond to a whole new level

This snippet is actually a set of advanced macros that provide some useful predefined commands. You can just copy the whole code, paste it in a separate file, named, for instance, 'book-titling.ily'; then just include it in your score and use the provided macros (see the end of the snippet description if you want an example of an actual score source file).

# Using LilyPond to produce a whole book

This snippet allows you to create:

• a nice title page
• some fancy page headers (with book and chapter titles)
The following commands are provided (in addition to LilyPond standard syntax)::
• \bookTitle `string`

defines the book title, as it should appear in even page header

• \chapter `string`

adds a page break and a big title, and a title in the TOC set the odd page header

• \section `string`

adds a section title, and a title in the TOC

• \piece `markup`

adds a piece title in the TOC

• \titledPiece `markup`

adds a piece title in book body and in the TOC

• \useRehearsalNumbers `boolean`

if set to 'true', adds rehearsal number before pieces

In this snippet, you will find the ready-to-use stylesheet (you may save it as a separate file named "book-titling.ily", and then include it in your scores), and at the bottom of the source code, a short example demonstrating some of these abilities.