Next: , Previous: Music fragment options, Up: Integrating text and music



9.6 Invoking lilypond-book

Running lilypond-book generates lots of small files that LilyPond will process. To avoid all that garbage in the source directory use the --output command line option, and change to that directory before running LaTeX or makeinfo:

lilypond-book --output=out yourfile.lytex
cd out

This will produce a .tex or .texi file. To produce pdf output from the .tex file, you should do

latex yourfile.tex
dvips -Ppdf -u+ec-mftrace.map -u+lilypond.map yourfile.dvi
ps2pdf yourfile.ps

To produce a texinfo document (in any output format), follow the normal procedures for texinfo.

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

-F filter, --filter=filter
Pipe snippets through filter.

For example:

       lilypond-book --filter='convert-ly --from=2.0.0' my-book.tely

--help
Print a short help message.
-I dir, --include=dir
Add DIR to the include path.
-o dir, --output=dir
Place generated files in dir.
-P process, --process=COMMAND
Process lilypond snippets using command. The default command is lilypond.
--verbose
Be verbose.
--version
Print version information.

For LaTeX input, the file to give to LaTeX has extension .latex. Texinfo input will be written to a file with extension .texi.

Bugs

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.

This page is for LilyPond-2.4.5 (stable-branch).

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

Other languages: English.
Using automatic language selection.