]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/usage/running.itely
Doc-ja: fix xref.
[lilypond.git] / Documentation / usage / running.itely
index faeb8146663a534a7314fce35e6b4d52d4c42935..82d804c839f48019cf0898e0f9580df16975ec94 100644 (file)
@@ -8,7 +8,7 @@
     Guide, node Updating translation committishes..
 @end ignore
 
-@c \version "2.13.36"
+@c \version "2.15.18"
 
 
 @node Running lilypond
@@ -133,36 +133,6 @@ The following options are supported:
 
 @table @code
 
-@item -e,--evaluate=@var{expr}
-Evaluate the Scheme @var{expr} before parsing any @file{.ly} files.
-Multiple @code{-e} options may be given, they will be evaluated
-sequentially.
-
-The expression will be evaluated in the @code{guile-user} module, so
-if you want to use definitions in @var{expr}, use
-
-@example
-lilypond -e '(define-public a 42)'
-@end example
-
-@noindent
-on the command-line, and include
-
-@example
-#(use-modules (guile-user))
-@end example
-
-@noindent
-at the top of the @code{.ly} file.
-
-@item -f,--format=@var{format}
-which formats should be written.  Choices for @code{format} are
-@code{ps}, @code{pdf}, and @code{png}.
-
-Example: @code{lilypond -fpng @var{filename}.ly}
-
-
-
 @item -d,--define-default=@var{var}=@var{val}
 This sets the internal program option @var{var} to the Scheme value
 @var{val}.  If @var{val} is not supplied, then @var{#t} is used.  To
@@ -177,16 +147,17 @@ switch off an option, @code{no-} may be prefixed to @var{var}, e.g.
 @noindent
 is the same as
 @example
--dpoint-and-click='#f'
+-dpoint-and-click=#f
 @end example
 
-Here are a few interesting options.
+The following options are supported:
 
 @cindex help, command line
 
-@table @samp
+@table @code
+
 @item help
-Running @code{lilypond -dhelp} will print all of the @code{-d} options
+Running @code{lilypond -dhelp} will print all of the @option{-d} options
 available.
 
 @cindex paper-size, command line
@@ -207,20 +178,20 @@ Note that the string must be enclosed in escaped quotes ( @code{\"} ).
 Do not trust the @code{.ly} input.
 
 When LilyPond formatting is available through a web server, either the
-@code{--safe} or the @code{--jail} option @b{MUST} be passed.  The
-@code{--safe} option will prevent inline Scheme code from wreaking
+@option{--safe} or the @option{--jail} option @b{MUST} be passed.  The
+@option{--safe} option will prevent inline Scheme code from wreaking
 havoc, for example
 
 @quotation
 @verbatim
 #(system "rm -rf /")
 {
-  c4^#(ly:export (ly:gulp-file "/etc/passwd"))
+  c4^$(ly:gulp-file "/etc/passwd")
 }
 @end verbatim
 @end quotation
 
-The @code{-dsafe} option works by evaluating in-line Scheme
+The @option{-dsafe} option works by evaluating in-line Scheme
 expressions in a special safe module.  This safe module is derived from
 GUILE @file{safe-r5rs} module, but adds a number of functions of the
 LilyPond API.  These functions are listed in @file{scm/safe-lily.scm}.
@@ -228,39 +199,44 @@ LilyPond API.  These functions are listed in @file{scm/safe-lily.scm}.
 In addition, safe mode disallows @code{\include} directives and
 disables the use of backslashes in @TeX{} strings.
 
-In safe mode, it is not possible to import LilyPond variables
-into Scheme.
+In safe mode, it is not possible to import LilyPond variables into
+Scheme.
 
-@code{-dsafe} does @emph{not} detect resource overuse.  It is still possible to
-make the program hang indefinitely, for example by feeding cyclic data
-structures into the backend.  Therefore, if using LilyPond on a
-publicly accessible webserver, the process should be limited in both
-CPU and memory usage.
+@option{-dsafe} does @emph{not} detect resource overuse.  It is still
+possible to make the program hang indefinitely, for example by feeding
+cyclic data structures into the backend.  Therefore, if using LilyPond
+on a publicly accessible webserver, the process should be limited in
+both CPU and memory usage.
 
-The safe mode will prevent many useful LilyPond snippets from being
-compiled.  The @code{--jail} is a more secure alternative, but
+Safe mode will prevent many useful LilyPond snippets from being
+compiled.  The @option{--jail} is a more secure alternative, but
 requires more work to set up.
 
 @cindex output format, setting
+
 @item backend
-the output format to use for the back-end.  Choices for @code{format} are
+the output format to use for the backend.  Choices for @code{format}
+are:
+
 @table @code
 @item ps
+
 @cindex PostScript output
- for PostScript.
 
-  Postscript files include TTF, Type1 and OTF fonts.  No subsetting of
-  these fonts is done.  When using oriental character sets, this can
-  lead to huge files.
+for PostScript.
+
+Postscript files include TTF, Type1 and OTF fonts.  No subsetting of
+these fonts is done.  When using oriental character sets, this can lead
+to huge files.
 
 @item eps
 
 @cindex Postscript, encapsulated
 @cindex EPS (Encapsulated PostScript)
 
- for encapsulated PostScript.  This dumps every page (system) as a separate
-@file{EPS} file, without fonts, and as one collated @file{EPS} file with
-all pages (systems) including fonts.
+for encapsulated PostScript.  This dumps every page (system) as a
+separate @file{EPS} file, without fonts, and as one collated @file{EPS}
+file with all pages (systems) including fonts.
 
 This mode is used by default by @command{lilypond-book}.
 
@@ -268,115 +244,139 @@ This mode is used by default by @command{lilypond-book}.
 
 @cindex SVG (Scalable Vector Graphics)
 
- for SVG (Scalable Vector Graphics).
+for SVG (Scalable Vector Graphics).
 
- This creates a single SVG file, without embedded fonts, for every
- page of output.  It is recommended to install the Century
- Schoolbook fonts, included with your LilyPond installation, for
- optimal rendering.  Under UNIX, simply copy these fonts from the
- LilyPond directory (typically
- @file{/usr/share/lilypond/VERSION/fonts/otf/}) to
- @file{~/.fonts/}.  The SVG output should be compatible with any
- SVG editor or user agent.
+This creates a single SVG file, without embedded fonts, for every page
+of output.  It is recommended to install the Century Schoolbook fonts,
+included with your LilyPond installation, for optimal rendering.  Under
+UNIX, simply copy these fonts from the LilyPond directory (typically
+@file{/usr/share/lilypond/VERSION/fonts/otf/}) to @file{~/.fonts/}.  The
+SVG output should be compatible with any SVG editor or user agent.
 
 @item scm
 
 @cindex Scheme dump
+@cindex output, Scheme dump
 
- for a dump of the raw, internal Scheme-based drawing commands.
+for a dump of the raw, internal Scheme-based drawing commands.
 
 @item null
- do not output a printed score; has the same effect as @code{-dno-print-pages}.
+do not output a printed score; has the same effect as
+@option{-dno-print-pages}.
+
 @end table
 
 Example: @code{lilypond -dbackend=svg @var{filename}.ly}
 
 @item preview
+
 @cindex preview, command line
-Generate an output file containing the titles and the first system
-of music.  If @code{\bookpart} blocks are used, the titles and
-first system of every @code{\bookpart} will appear in the output.
-The @code{ps}, @code{eps}, and @code{svg} backends support this
-option.
+
+This option is supported by all backends; @code{pdf}, @code{png},
+@code{ps}, @code{eps} and @code{svg}, but not @code{scm} and generates
+an output file containing the titles and the first system of music.  If
+@code{\bookpart} blocks are used, the titles and first system of every
+@code{\bookpart} will appear in the output.
+
+An additional file in the form @code{myFile.preview.extension} is
+generated, to avoid this use the additional @option{-dprint-pages} or
+@option{-dno-print-pages} options according to your requirements.
+
+@item gui
+Runs silently and redirect all output to a log file.
+
+Note to Windows users: By default @code{lilypond.exe} outputs all
+progress information to the command window, @code{lilypond-windows.exe}
+does not and returns a prompt, with no progress information, immediately
+at the command line.  The @option{-dgui} option can be used in this case
+to redirect output to a log file.
 
 @item print-pages
-Generate the full pages, the default.  @code{-dno-print-pages} is
-useful in combination with @code{-dpreview}.
+Generate the full pages, the default.  @option{-dno-print-pages} is
+useful in combination with @option{-dpreview}.
 
 @end table
 
+@cindex Scheme, expression evaluation
+@cindex expression evaluation, Scheme
 
+@item -e,--evaluate=@var{expr}
+Evaluate the Scheme @var{expr} before parsing any @file{.ly} files.
+Multiple @option{-e} options may be given, they will be evaluated
+sequentially.
 
-@item -h,--help
-Show a summary of usage.
+The expression will be evaluated in the @code{guile-user} module, so
+if you want to use definitions in @var{expr}, use
 
-@item -H,--header=@var{FIELD}
-Dump a header field to file @file{BASENAME.@var{FIELD}}.
+@example
+lilypond -e '(define-public a 42)'
+@end example
 
-@cindex file searching
-@cindex search path
-@item --include, -I=@var{directory}
-Add @var{directory} to the search path for input files.
+@noindent
+on the command-line, and include
 
-Multiple -I options may be given.  The search will start in the
-first defined directory, and if the file to be included is not
-found the search will continue in subsequent directories.
+@example
+#(use-modules (guile-user))
+@end example
 
-@item -i,--init=@var{file}
-Set init file to @var{file} (default: @file{init.ly}).
+@noindent
+at the top of the @code{.ly} file.
 
-@cindex folder, directing output to
-@cindex output filename, setting
+@warning{Windows users must use double quotes instead of single quotes.}
 
-@item -o,--output=@var{FILE} or @var{FOLDER}
-Set the default output file to @var{FILE} or, if a folder with
-that name exists, direct the output to @var{FOLDER}, taking the
-file name from the input file.  The appropriate suffix will be
-added (e.g. @code{.pdf} for pdf) in both cases.
+@cindex output, format
+@cindex format, output
 
+@item -f,--format=@var{format}
+which formats should be written.  Choices for @code{format} are
+@code{ps}, @code{pdf}, and @code{png}.
 
-@cindex PostScript output
+Example: @code{lilypond -fpng @var{filename}.ly}
 
-@item --ps
-Generate PostScript.
+@item -h,--help
+Show a summary of usage.
 
-@cindex Portable Network Graphics (PNG) output
+@item -H,--header=@var{FIELD}
+Dump a header field to file @file{BASENAME.@var{FIELD}}.
 
-@item --png
-Generate pictures of each page, in PNG format.  This implies
-@code{--ps}.  The resolution in DPI of the image may be set with
-@example
--dresolution=110
-@end example
+@item -i,--init=@var{file}
+Set init file to @var{file} (default: @file{init.ly}).
 
-@cindex Portable Document Format (PDF) output
+@cindex file searching
+@cindex search path
 
-@item --pdf
-Generate PDF.  This implies @code{--ps}.
+@item -I, --include=@var{directory}
+Add @var{directory} to the search path for input files.
 
+Multiple -I options may be given.  The search will start in the first
+defined directory, and if the file to be included is not found the
+search will continue in subsequent directories.
 
+@cindex chroot jail, running inside
 
 @item -j,--jail=@var{user},@var{group},@var{jail},@var{dir}
 Run @command{lilypond} in a chroot jail.
 
-The @code{--jail} option provides a more flexible alternative to
-@code{--safe} when LilyPond formatting is available through a web
+The @option{--jail} option provides a more flexible alternative to
+@option{--safe} when LilyPond formatting is available through a web
 server or whenever LilyPond executes externally provided
 sources.
 
-The @code{--jail} option works by changing the root of @command{lilypond} to
-@var{jail} just before starting the actual compilation process.  The user
-and group are then changed to match those provided, and the current
-directory is changed to @var{dir}.  This setup guarantees that it is not
-possible (at least in theory) to escape from the jail.  Note that for
-@code{--jail} to work @command{lilypond} must be run as root, which is usually
-accomplished in a safe way using @command{sudo}.
+The @option{--jail} option works by changing the root of
+@command{lilypond} to @var{jail} just before starting the actual
+compilation process.  The user and group are then changed to match those
+provided, and the current directory is changed to @var{dir}.  This setup
+guarantees that it is not possible (at least in theory) to escape from
+the jail.  Note that for @option{--jail} to work @command{lilypond} must
+be run as root, which is usually accomplished in a safe way using
+@command{sudo}.
 
 Setting up a jail is a slightly delicate matter, as we must be sure that
 LilyPond is able to find whatever it needs to compile the source
 @emph{inside the jail}.  A typical setup comprises the following items:
 
 @table @asis
+
 @item Setting up a separate filesystem
 A separate filesystem should be created for LilyPond, so that it can be
 mounted with safe options such as @code{noexec}, @code{nodev}, and
@@ -396,24 +396,88 @@ be a single directory writable by this user, which should be passed in
 LilyPond needs to read a number of files while running.  All these files
 are to be copied into the jail, under the same path they appear in the
 real root filesystem.  The entire content of the LilyPond installation
-(e.g., @file{/usr/share/lilypond})
-should be copied.
+(e.g., @file{/usr/share/lilypond}) should be copied.
 
 If problems arise, the simplest way to trace them down is to run
 LilyPond using @command{strace}, which will allow you to determine which
 files are missing.
 
 @item Running LilyPond
-In a jail mounted with @code{noexec} it is impossible to execute any external
-program.  Therefore LilyPond must be run with a backend that does not
-require any such program.  As we already mentioned, it must be also run
-with superuser privileges (which, of course, it will lose immediately),
-possibly using @command{sudo}.  It is a good idea to limit the number of
-seconds of CPU time LilyPond can use (e.g., using @command{ulimit
--t}), and, if your operating system supports it, the amount of memory
-that can be allocated.
+In a jail mounted with @code{noexec} it is impossible to execute any
+external program.  Therefore LilyPond must be run with a backend that
+does not require any such program.  As we already mentioned, it must be
+also run with superuser privileges (which, of course, it will lose
+immediately), possibly using @command{sudo}.  It is a good idea to limit
+the number of seconds of CPU time LilyPond can use (e.g., using
+@command{ulimit@tie{}-t}), and, if your operating system supports it,
+the amount of memory that can be allocated.
+
 @end table
 
+@cindex loglevel
+@cindex output, verbosity
+
+@item -l,--loglevel=@var{LEVEL}
+Set the verbosity of the console output to @var{LEVEL}. Possible values
+are:
+
+@table @code
+
+@item NONE
+No output at all, not even error messages.
+
+@item ERROR
+Only error messages, no warnings or progress messages.
+
+@item WARN
+Warnings and error messages, no progress.
+
+@item BASIC_PROGRESS
+Basic progress messages (success), warnings and errors.
+
+@item PROGRESS
+All progress messages, warnings and errors.
+
+@item INFO (default)
+Progress messages, warnings, errors and further execution information.
+
+@item DEBUG
+All possible messages, including verbose debug output.
+
+@end table
+
+@cindex directory, redirect output
+@cindex output, setting filename
+@cindex output, directory
+
+@item -o,--output=@var{FILE} or @var{FOLDER}
+Set the default output file to @var{FILE} or, if a folder with that name
+exists, direct the output to @var{FOLDER}, taking the file name from the
+input file.  The appropriate suffix will be added (e.g. @code{.pdf} for
+pdf) in both cases.
+
+@cindex PS (Postscript), output
+@cindex Postscript (PS), output
+@cindex output, PS (Postscript)
+
+@item --ps
+Generate PostScript.
+
+@cindex PNG (Portable Network Graphics), output
+@cindex output, PNG (Portable Network Graphics)
+
+@item --png
+Generate pictures of each page, in PNG format.  This implies
+@option{--ps}.  The resolution in DPI of the image may be set with
+@example
+-dresolution=110
+@end example
+
+@cindex PDF (Portable Document Format), output
+@cindex output, PDF (Portable Document Format)
+
+@item --pdf
+Generate PDF.  This implies @option{--ps}.
 
 @item -v,--version
 Show version information.
@@ -425,6 +489,7 @@ information.
 @item -w,--warranty
 Show the warranty with which GNU LilyPond comes.  (It comes with
 @strong{NO WARRANTY}!)
+
 @end table
 
 
@@ -445,11 +510,15 @@ subdirectories called @file{ly/}, @file{ps/}, @file{tex/}, etc.
 @item LANG
 This selects the language for the warning messages.
 
+@item LILYPOND_LOGLEVEL
+The default loglevel. If LilyPond is called without an explicit loglevel (i.e.
+no @option{--loglevel} command line option), this value is used.
+
 @item LILYPOND_GC_YIELD
-With this variable the memory footprint and performance can be
-adjusted.  It is a percentage tunes memory management behavior.  With
-higher values, the program uses more memory, with smaller values, it
-uses more CPU time.  The default value is @code{70}.
+A variable, as a percentage, that tunes memory management
+behavior.  A higher values means the program uses more memory, a
+smaller value means more CPU time is used.  The default value is
+@code{70}.
 
 @end table
 
@@ -472,8 +541,8 @@ adduser lily
 @end example
 
 @noindent
-This will create a new group for the @code{lily} user as well, and a home folder,
-@code{/home/lily}
+This will create a new group for the @code{lily} user as well, and a
+home folder, @code{/home/lily}
 
 @item In the home folder of the @code{lily} user create a file to use as a
 separate filesystem:
@@ -602,8 +671,8 @@ happens rarely.  The most usual cause is misinstalled fonts.
 @cindex call trace
 @cindex Scheme error
 Errors that occur while executing Scheme code are caught by the Scheme
-interpreter.  If running with the verbose option (@code{-V} or
-@code{--verbose}) then a call trace of the offending
+interpreter.  If running with the verbose option (@option{-V} or
+@option{--verbose}) then a call trace of the offending
 function call is printed.
 
 @item Programming error
@@ -621,9 +690,8 @@ send a bug-report.
 @end table
 
 @cindex errors, message format
-If warnings and errors can
-be linked to some part of the input file, then error messages have the
-following form
+If warnings and errors can be linked to some part of the input file,
+then error messages have the following form
 
 @example
 @var{filename}:@var{lineno}:@var{columnno}: @var{message}
@@ -780,7 +848,7 @@ mismatched quote will usually be on the line one or two above.
 @unnumberedsubsec Error message Unbound variable %
 
 This error message will appear at the bottom of the console
-output or log file together with a @qq{GUILE signalled an error ...}
+output or log file together with a @qq{GUILE signalled an error @dots{}}
 message every time a Scheme routine is called which (invalidly)
 contains a @emph{LilyPond} rather than a @emph{Scheme} comment.