3.2.4 Output file names

It is possible to override both the output file name and the suffix appended to the basic file name in \paper blocks.

\paper {
  output-filename = "my_special_output"
}

\book {
  \paper {
    output-suffix = "menuetto"
  }
  ...
}
\book {
  \paper {
    output-suffix = "scherzo"
  }
  ...
}

The result are two output files named my_special_output-menuetto.pdf and my_special_output-scherzo.pdf. Be careful to select values for output-filename and output-suffix that are valid for file names on your operating system!

If this output file name already exists (this can happen, for example, if both output-filename and output-suffix are set in the global \paper block and not in any \book blocks), LilyPond appends an additional suffix with an increasing number.

Note that predefined \paper variables (see section The \paper block) must be placed before the output-filename and output-suffix assignments, for example

bigMargin = \paper { top-margin = 10\cm }

\book {
  \paper {
    \bigMargin % must come first
    output-filename = "foo"
  }
}

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