Invoking lilypond-book
When you run lilypond-book it will generate lots of small
files that LilyPond will process. To avoid all the garbage in
your source directory, you should either change to a temporary
directory, or use the --outdir command line options:
cd out && lilypond-book ../yourfile.tex
lilypond-book --outdir=out yourfile.tex
For LaTeX input, the file to give to LaTeX has extension .latex .
Texinfo input will be written to a file with extension .texi .
If you use --outdir , you should also cd to that directory
before running LaTeX or makeinfo . This may seem a little
kludgy, but both LaTeX and makeinfo expect picture files
(the music) to be in the current working directory. Moreover, if you do
this, LaTeX will not clutter your normal working directory with output
files.
If you want to add titling from the \header section of the
files, you should add the following to the top of your LaTeX file:
\input titledefs.tex
\def\preLilypondExample{\def\mustmakelilypondtitle{}}
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.
Note that the texi document type produces a DVI file; to
convert a texinfo document to html , you should use the additional
format texi-html instead of texi to convert lilypond
fragments to PNG images.
--default-music-fontsize= szpt
- Set the fontsize to use for LilyPond if no fontsize is given
as option.
--force-music-fontsize= szpt
- Force all LilyPond code 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
- Don't run LilyPond, but do generate the
.ly files.
--no-music
- Strip all LilyPond blocks from the file.
--no-pictures
- Don't generate pictures when processing Texinfo.
--read-lys
- Don't write ly files. This way you can do
lilypond-book file.tely
convert-ly
lilypond-book --read-lys
--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 on the TODO list for LilyPond
1.8, but changing the linewidth in other ways will not give you a
straight right margin.
Almost all LaTeX commands that change margins and line widths are
ignored.
There is no way to automatically apply convert-ly only to fragments
inside a lilypond-book file.
lilypond-book processes all music fragments in one big run. The
state of the GUILE interpreter is not reset between fragments; this
means that global GUILE definitions, e.g., done with #(define ...)
and #(set! ...) can leak from one fragment into the next fragment.
|