]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/invoking.itexi
patch::: 1.3.140.jcn6
[lilypond.git] / Documentation / user / invoking.itexi
1 @node Invoking LilyPond
2
3 @chapter Invoking LilyPond
4 @cindex Invoking LilyPond
5 @cindex command line options
6 @cindex options, command line
7 @cindex switches
8
9
10 @example
11         lilypond [OPTION]... [FILE]...
12 @end example
13
14 @unnumberedsec Options
15
16 @table @code
17
18 @item -e,--evaluate=@var{code}
19   Evaluates the Scheme @var{code} before parsing @file{.ly}
20 files. Multiple @code{-e} options may be given. They will be evaluated
21 sequentially.
22
23 @item -f,--format=@var{format}
24 Output format for sheet music. Choices are tex (for @TeX{}
25 output), ps (for PostScript) and scm (for a Scheme
26 dump).
27
28 For processing both the @TeX{} and the PostScript output, you must
29 have appropriate environment variables set.  For @TeX{}, you have to
30 set @code{MFINPUTS} and @code{TEXINPUTS} to point to the directory
31 containing LilyPond metafont and .tex files.  For processing the
32 PostScript with Ghostscript, you have to set @code{GS_FONTPATH} to
33 point to the directory containing LilyPond @file{pfa} files.
34
35 Scripts to do this are included in
36 @file{buildscripts/out/lilypond-profile} (for sh shells) and
37 @file{buildscripts/out/lilypond-login} (for C-shells), and should
38 normally be run as part of your login process.
39
40
41 @item -h,--help
42 Show a summary of usage.
43 @item --include, -I=DIRECTORY
44 Add @file{DIRECTORY} to the search path for input files.
45 @cindex file searching
46 @cindex search path
47 @item -i,--init=FILE
48 Set init file to @file{FILE} (default: @file{init.ly}).
49 @item -m,--no-paper
50 @cindex MIDI
51 Disable @TeX{} output. If you have a @code{\midi} definition, it will do the
52 midi output only.
53 @item -M,--dependencies
54 Output rules to be included in Makefile.
55 @item -o,--output=FILE
56 Set the default output file to @file{FILE}.
57 @item -s,--safe
58 Disallow untrusted @code{\include} directives, in-line
59 Scheme evaluation, backslashes in @TeX{}, code.
60
61 @strong{WARNING}: the @code{--safe} option has not been reviewed for a
62 long time; do not rely on it for automatic invocation (e.g. over the
63 web). Volunteers are welcome to do a new audit.
64
65 @item -v,--version
66 Show version information 
67 @item -V,--verbose
68 Be verbose
69 @item -w,--warranty
70 Show the warranty with which GNU LilyPond comes. (It comes with 
71 @strong{NO WARRANTY}!)
72 @end table
73
74
75 When invoked with a filename that has no extension, LilyPond will try
76 adding `@file{.ly}' as an extension first.
77
78 When LilyPond processes @file{filename.ly} it will produce
79 @file{filename.tex} as output (or @file{filename.ps} for PostScript
80 output).  If @file{filename.ly} contains more than one @code{\score}
81 block, then LilyPond will output the rest in numbered files, starting
82 with @file{filename-1.tex}.  Several files can be specified; they will
83 each be processed independently.  @footnote{The status of GUILE is not
84 reset across invocations, so be careful not to change any default
85 settings from within Scheme .}
86
87 @section Environment variables
88
89 @table @code
90 @item LILYINCLUDE
91 additional directories for finding lilypond data.  The
92 format is like the format of @file{PATH}.
93 @item LILYPONDPREFIX
94 This specifies a directory where locale messages and
95 data files will be looked up by default. The directory should contain
96 subdirectories called @file{ly/}, @file{ps/}, @file{tex/}, etc.
97
98 @item LANG
99 selects the language for the warning messages of LilyPond.
100 @end table
101
102