The formatting system consists of two parts: a binary executable
(lilypond-bin), which is responsible for the formatting
functionality, and support scripts, which post-process the resulting
output. Normally, the support scripts are called, which in turn invoke
the lilypond-bin binary. However, lilypond-bin may be
called directly as follows.
lilypond-bin [option]... file...
When invoked with a filename that has no extension, the .ly
extension is tried first. To read input from stdin, use a
dash - for file.
When filename.ly is processed it will produce
filename.tex as output (or filename.ps for PostScript
output). If filename.ly contains more than one \score
block, then the rest of the scores will be output in numbered files,
starting with filename-1.tex. Several files can be specified;
they will each be processed independently. 1
We strongly advise against making LilyPond formatting available through a web server. That is, processing input from untrusted users, and returning the resulting PDF file. LilyPond is a big and complex program. It was not written with security in mind. Making it available to the outside world is a huge risk; consider the security implications of
#(system "rm -rf /")
\score {
c4^#(ly:export (ly:gulp-file "/etc/passwd"))
}
The following options are supported:
-e,--evaluate=expr-e options may be given, they will be evaluated
sequentially. The function ly:set-option allows for access to
some internal variables. Use -e '(ly:option-usage)' for more
information.
-f,--format=formattex (for TeX
output, to be processed with plain TeX, or through lilypond),
pdftex for PDFTeX input, ps (for PostScript),
scm (for a Scheme dump), sk (for Sketch) and as
(for ASCII-art).
This option is only for developers. Only the TeX output of these is usable for real work.
-h,--help--include, -I=directory-i,--init=file-m,--no-paper\midi definition MIDI output
will be generated.
-M,--dependencies-o,--output=FILE-v,--version-V,--verbose-w,--warrantyFor processing both the TeX and the PostScript output, the appropriate environment variables must be set. The following scripts do this:
They should normally be sourced as part of the login process. If these scripts are not run from the system wide login process, then you must run it yourself.
If you use sh, bash, or a similar shell, then add the following to your .profile:
. /the/path/to/lilypond-profile
If you use csh, tcsh or a similar shell, then add the following to your ~/.login:
source /the/path/to/lilypond-login
Of course, in both cases, you should substitute the proper location of either script.
These scripts set the following variables:
TEXMFTEXMF to point to the lilypond data
file tree. A typical setting would be
{/usr/share/lilypond/1.6.0,{!!/usr/share/texmf}}
GS_LIB-f ps) with Ghostscript you have to set GS_LIB to
point to the directory containing library PS files.
GS_FONTPATH-f ps) with Ghostscript you have to set GS_FONTPATH to
point to the directory containing PFA files.
When you print direct PS output, remember to send the PFA files to the printer as well.
The binary itself recognizes the following environment variables:
LILYPONDPREFIXLANG[1] The status of GUILE is not reset across invocations, so be careful not to change any system defaults from within Scheme.
|
Read comments on this page, or
add one.
This page is for LilyPond-2.2.2 (stable-branch). |