Running lilypond-book
generates lots of small files that
LilyPond will process. To avoid all that garbage in the source
directory, it is advisable to change to a temporary directory first:
cd out && lilypond-book ../yourfile.tex
or to use the --outdir
command line option, and change to
that director before running LaTeX or makeinfo
:
lilypond-book --outdir=out yourfile.tex cd out && latex yourfile.latex
For LaTeX input, the file to give to LaTeX has extension .latex
.
Texinfo input will be written to a file with extension .texi
.
To add titling from the \header
section of the files, add the
following to the top of the LaTeX file:
\input titledefs.tex \def\preLilyPondExample{\def\mustmakelilypondtitle{}}
For printing the LaTeX document, you will need to use dvips. For producing PS with scalable fonts, add the following options to the dvips command line:
-Ppdf -u +lilypond.map
lilypond-book
accepts the following command line options:
-f
format, --format=
format
html
, latex
or
texi
(the default). lilypond-book
usually figures this
out automatically.
The texi
document type produces a texinfo file with music
fragments in the DVI output only. For getting images in the HTML
version, the format
texi-html
must be used.
--default-music-fontsize=
szpt
--force-music-fontsize=
szpt
\begin{lilypond}
.
-I
dir, --include=
dir
-M, --dependencies
filename.dep
.
--dep-prefix=
pref
-M
dependency.
-n, --no-lily
.ly
files, but do not process them.
--no-music
--no-pictures
--outname=
file
--outdir=
dir
--version
--help
The LaTeX \includeonly{...}
command is ignored.
The Texinfo command pagesize
is not interpreted. Almost all
LaTeX commands that change margins and line widths are ignored.
Only the first \score
of a LilyPond block is processed.
The size of a music block is limited to 1.5 kb, due to technical
problems with the Python regular expression engine. For longer files,
use \lilypondfile
. Using \lilypondfile
also makes
upgrading files (through convert-ly, see Invoking convert-ly)
easier.
lilypond-book
processes all music fragments in one big run.
The state of the GUILE interpreter is not reset between fragments;
this means that changes made to global GUILE definitions, e.g. done
with set!
or set-cdr!
, can leak from one fragment into
the next fragment.
This page is for LilyPond-2.0.0 (stable-branch).