Node:Invoking lilypond-book, Previous:Music fragment options, Up:lilypond-book manual



Invoking lilypond-book

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
Specify the document type to process: 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
Set the music font size to use if no fontsize is given as option.
--force-music-fontsize=szpt
Force all music to use this fontsize, overriding options given to \begin{lilypond}.
-I dir, --include=dir
Add DIR to the include path.
-M, --dependencies
Write dependencies to filename.dep.
--dep-prefix=pref
Prepend pref before each -M dependency.
-n, --no-lily
Generate the .ly files, but do not process them.
--no-music
Strip all music from the input file.
--no-pictures
Do not generate pictures when processing Texinfo.
--outname=file
The name of LaTeX file to output. If this option is not given, the output name is derived from the input name.
--outdir=dir
Place generated files in dir.
--version
Print version information.
--help
Print a short help message.

Bugs

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).

Report errors to <bug-lilypond@gnu.org>.