3.2.1 Invoking lilypond

The lilypond executable may be called as follows from the command line.

lilypond [option]… file

When invoked with a filename that has no extension, the ‘.ly’ extension is tried first. To read input from stdin, use a dash (-) for file.

When ‘filename.ly’ is processed it will produce ‘filename.ps’ and ‘filename.pdf’ as output. Several files can be specified; they will each be processed independently. 1

If ‘filename.ly’ contains more than one \score block, then the rest of the scores will be output in numbered files, starting with ‘filename-1.pdf’. In addition, the value of output-suffix will be inserted between the basename and the number. An input file containing

#(define output-suffix "violin")
\book { … }
#(define output-suffix "cello")
\book { … }

will output base-violin.pdf’ and base-cello-1.pdf’.


[1] The status of GUILE is not reset after processing a .ly file, so be careful not to change any system defaults from within Scheme.

Other languages: espaƱol, deutsch.

Application Usage