|
Invoking LilyPond
Usage:
lilypond [option]... file...
When invoked with a filename that has no extension, LilyPond will try
to add .ly as an extension first. To have LilyPond read from
stdin, use a dash - for file.
When LilyPond processes filename.ly it will produce
filename.tex as output (or filename.ps for PostScript
output). If filename.ly contains more than one \score
block, then LilyPond will output the rest in numbered files, starting
with filename-1.tex . Several files can be specified; they will
each be processed independently. 1
Command line options
The following options are supported:
-e,--evaluate= expr
- Evaluate the Scheme expr before parsing any
.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
- Output format for sheet music. Choices are
tex (for TeX
output, to be processed with plain TeX, or through ly2dvi),
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. More information can be found at
http://lilypond.org/wiki?OutputFormats.
-h,--help
- Show a summary of usage.
--include, -I= directory
- Add directory to the search path for input files.
-i,--init= file
- Set init file to file (default:
init.ly ).
-m,--no-paper
- Disable TeX output. If you have a
\midi definition midi output
will be generated.
-M,--dependencies
- Output rules to be included in Makefile.
-o,--output= FILE
- Set the default output file to FILE.
-v,--version
- Show version information
-V,--verbose
- Be verbose: show full paths of all files read, and give timing
information.
-w,--warranty
- Show the warranty with which GNU LilyPond comes. (It comes with
NO WARRANTY!)
Environment variables
For processing both the TeX and the PostScript output, you must
have appropriate environment variables 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 your 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
. lilypond-profile
If you use csh, tcsh or a similar shell, then add the following to
your ~/.login
source lilypond-login
These scripts set the following variables
TEXMF
- To make sure that TeX and lilypond find data files (among
others
.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
- For processing PostScript output (obtained with
-f ps ) with Ghostscript you have to set GS_LIB to
point to the directory containing LilyPond PS files.
GS_FONTPATH
- For processing PostScript output (obtained with
-f ps ) with Ghostscript you have to set GS_FONTPATH to
point to the directory containing LilyPond PFA files.
When you print direct PS output, remember to send the PFA files to the
printer as well.
The LilyPond binary itself recognizes the following environment variables
LILYPONDPREFIX
- This specifies a directory where locale messages and
data files will be looked up by default. The directory should contain
subdirectories called
ly/ , ps/ , tex/ , etc.
LANG
- This selects the language for the warning messages of LilyPond.
|