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