Previous: Editor support, Up: Running LilyPond



4.7 Invoking lilypond-latex

Before LilyPond 2.4, the lilypond program only generated music notation. Titles and page layout was done in a separate wrapper program. For compatibility with older files, this wrapper program has been retained as lilypond-latex. It uses the LilyPond program and LaTeX to create a nicely titled piece of sheet music. Use of this program is only necessary if the input file contains special LaTeX options or formatting codes in markup texts.

The lilypond-latex wrapper is invoked from the command-line as follows

lilypond-latex [option]... file...

To have lilypond-latex read from stdin, use a dash (-) for file. The program supports the following options.

-k,--keep
Keep the temporary directory with all output files. The temporary directory is created in the current directory as lilypond.dir.
-h,--help
Print usage help.
-I,--include=dir
Add dir to LilyPond's include path.
-o,--output=file
Generate output to file. The extension of file is ignored.
--png
Also generate pictures of each page, in PNG format.
--preview
Also generate a picture of the first system of the score.


-s,--set=key=val
Add key= val to the settings, overriding those specified in the files. Possible keys: language, latexheaders, latexpackages, latexoptions, papersize, linewidth, orientation, textheight.
-v,--version
Show version information.
-V,--verbose
Be verbose. This prints out commands as they are executed, and more information about the formatting process is printed.
--debug
Print even more information. This is useful when generating bug reports.
-w,--warranty
Show the warranty with which GNU LilyPond comes. (It comes with NO WARRANTY!)

4.7.1 Additional parameters

The lilypond program responds to several parameters specified in a \layout section of the input file. They can be overridden by supplying a --set command line option.

language
Specify LaTeX language: the babel package will be included. Default: unset.

Read from the \header block.

latexheaders
Specify additional LaTeX header files. Normally read from the \header block. Default value: empty.
latexpackages
Specify additional LaTeX package files. This works cumulative, so you can add multiple packages using multiple -s=latexpackages options. Normally read from the \header block. Default value: geometry.
latexoptions
Specify additional options for the LaTeX \documentclass. You can put any valid value here. This was designed to allow lilypond to produce output for double-sided paper, with balanced margins and page numbers on alternating sides. To achieve this specify twoside.
orientation
Set orientation. Choices are portrait or landscape. Is read from the \layout block, if set.
textheight
The vertical extension of the music on the page. It is normally calculated automatically, based on the paper size.
linewidth
The music line width. It is normally read from the \layout block.
papersize
The paper size (as a name, e.g., a4). It is normally read from the \layout block.
fontenc
The font encoding, should be set identical to the font-encoding property in the score.
Read comments on this page, or add one.

This page is for LilyPond-2.5.11 (development-branch).

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

Other languages: English.
Using automatic language selection.