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