3.1.3 Multiple output files from one input file

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 file. If you do not specify any \book block in the input file, LilyPond will implicitly treat the whole file as a single \book block, see File structure.

When producing multiple files from a single source file, LilyPond ensures that none of the output files from any \book block overwrites the output file produced by a preceding \book from the same input file.

It does this by adding a suffix to the output name for each \book which uses the default output file name derived from the input source file.

The default behaviour is to append a version-number suffix for each name which may clash, so

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

in source file ‘eightminiatures.ly’ will produce


其他语言:català, deutsch, español, français, italiano, 日本語
About automatic language selection.

LilyPond — Notation Reference v2.21.0 (开发分支).