Node:Invoking the lilypond binary, Next:Error messages, Previous:Invoking lilypond, Up:Invoking LilyPond
The LilyPond system consists of two parts: a binary executable, which
is responsible for the formatting functionality, and support scripts,
which post-process the resulting output. Normally, the support scripts
are called, which in turn invoke the lilypond-bin
binary. However, lilypond-bin
may be called directly as
follows.
lilypond-bin [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.tex
as output (or filename.ps
for PostScript
output). 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.tex
. Several files can be specified;
they will each be processed independently. 1
The following options are supported:
-e,--evaluate=
expr
.ly
files.
Multiple -e
options may be given, they will be evaluated
sequentially. The function ly:set-option
allows for access to
some internal variables. Use -e '(ly:option-usage')
for more
information.
-f,--format=
format
tex
(for TeX
output, to be processed with plain TeX, or through lilypond
),
pdftex
for PDFTeX input, ps
(for PostScript),
scm
(for a Scheme dump), sk
(for Sketch) and as
(for ASCII-art).
This option is only for developers. Only the TeX output of
these is usable for real work.
-h,--help
--include, -I=
directory
-i,--init=
file
init.ly
).
-m,--no-paper
\midi
definition MIDI output
will be generated.
-M,--dependencies
-o,--output=
FILE
-v,--version
-V,--verbose
-w,--warranty
For processing both the TeX and the PostScript output, the appropriate environment variables must be set. The following scripts do this:
buildscripts/out/lilypond-profile
(for SH shells)
buildscripts/out/lilypond-login
(for C-shells)
They should normally be sourced as part of the login process. If these scripts are not run from the system wide login process, then you must run it yourself.
If you use sh, bash, or a similar shell, then add the following to
your .profile
:
. /the/path/to/lilypond-profile
If you use csh, tcsh or a similar shell, then add the following to
your ~/.login
:
source /the/path/to/lilypond-login
Of course, in both cases, you should substitute the proper location of either script.
These scripts set the following variables:
TEXMF
.tex
, .mf
and .tfm
),
you have to set TEXMF
to point to the lilypond data
file tree. A typical setting would be
{/usr/share/lilypond/1.6.0,{!!/usr/share/texmf}}
GS_LIB
-f ps
) with Ghostscript you have to set GS_LIB
to
point to the directory containing library PS files.
GS_FONTPATH
-f ps
) with Ghostscript you have to set GS_FONTPATH
to
point to the directory containing PFA files.
When you print direct PS output, remember to send the PFA files to the printer as well.
The binary itself recognizes the following environment variables:
LILYPONDPREFIX
ly/
, ps/
, tex/
, etc.
LANG
The status of GUILE is not reset across invocations, so be careful not to change any system defaults from within Scheme.
This page is for LilyPond-2.0.0 (stable-branch).