3.2.4 Output file names

LilyPond provides facilities to allow you to control what file names are used by the various backends when producing output files.

In the previous section, we saw how LilyPond prevents name clashes when producing several outputs from a single source file. You also have the ability to specify your own suffixes for each \book block, so for example you can produce files called

eightminiatures-Romanze.pdf
eightminiatures-Menuetto.pdf
eightminiatures-Nocturne.pdf

by adding a \bookOutputSuffix declaration inside each \book block.

\book {
  \bookOutputSuffix "Romanze"
  \score { … }
  \paper { … }
}
\book {
  \bookOutputSuffix "Menuetto"
  \score { … }
  \paper { … }
}
\book {
  \bookOutputSuffix "Nocturne"
  \score { … }
  \paper { … }
}

You can also specify a different output filename for book block, by using \bookOutputName declarations

\book {
  \bookOutputName "Romanze"
  \score { … }
  \paper { … }
}
\book {
  \bookOutputName "Menuetto"
  \score { … }
  \paper { … }
}
\book {
  \bookOutputName "Nocturne"
  \score { … }
  \paper { … }
}

The file above produces the following output files.

Romanze.pdf
Menuetto.pdf
Nocturne.pdf

LilyPond — Notation Reference v2.24.4 (stable-branch).