### 6.5 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 && latex yourfile.tex

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

### 6.6 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`.

Read comments on this page, or add one. This page is for LilyPond-2.2.2 (stable-branch).