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