3.2.3 Multiple output files from one input file

LilyPond creates one output file for each \book block. If there is no explicit \book block in the input file, LilyPond implicitly treats the whole file as a single \book block, see section File structure.

By default, LilyPond names the output file using the input file name and, if necessary, suffixes it with an increasing number – i.e., if an output file with the same name has already been created during the run. The default behavior is to append a version number suffix for each name that may clash, so

\book {
  \score { … }
  \paper { … }
}
\book {
  \score { … }
  \paper { … }
}
\book {
  \score { … }
  \paper { … }
}

in source file eightminiatures.ly produces

eightminiatures.pdf
eightminiatures-1.pdf
eightminiatures-2.pdf

as output files.

LilyPond Notation Reference v2.25.14 (development-branch).