[icon]

GNU LilyPond

-- --

What is LilyPond
Home
Examples
Templates
Download
GNU/Linux binaries
Windows binaries
Source code
Documentation
Tutorial
Manual
Glossary
Index

Support
Mailing lists
Search
WikiWiki

External sites
lilypond.org/stable
lilypond.org/development
savannah.gnu.org
ftp.lilypond.org
Mutopia
Other music online

Output details

LilyPond's default output format is TeX. Using the option -f (or --format) other output formats can be selected also, but currently none of them reliably work.

At the beginning of the output file, various global parameters are defined. It also contains a large \special call to define PostScript routines to draw items not representable with TeX, mainly slurs and ties. A DVI driver must be able to understand such embedded PostScript, or the output will be rendered incompletely.

Then the file lilyponddefs.tex is loaded to define the macros used in the code which follows. lilyponddefs.tex includes various other files, partially depending on the global parameters.

Now the music is output system by system (a `system' consists of all staves belonging together). From TeX's point of view, a system is an \hbox which contains a lowered \vbox so that it is centered vertically on the baseline of the text. Between systems, \interscoreline is inserted vertically to have stretchable space. The horizontal dimension of the \hbox is given by the linewidth parameter from LilyPond's \paper block (using the natural line width if its value is -1).

After the last system LilyPond emits a stronger variant of \interscoreline only if the macro \lilypondpaperlastpagefill is not defined (flushing the systems to the top of the page). You can avoid that manually by saying

     \def\lilypondpaperlastpagefill{1}
     

or by setting the variable lastpagefill in LilyPond's \paper block.

It is possible to fine-tune the vertical offset further by defining the macro \lilypondscoreshift. Example:

     \def\lilypondscoreshift{0.25\baselineskip}
     

\baselineskip is the distance from one text line to the next.

The code produced by LilyPond can be used by both TeX and LaTeX.

Here an example how to embed a small LilyPond file foo.ly into running LaTeX text without using the lilypond-book script (see Integrating text and music with lilypond-book).

     \documentclass{article}
     
     \def\lilypondpaperlastpagefill{}
     \lineskip 5pt
     \def\lilypondscoreshift{0.25\baselineskip}
     
     \begin{document}
     This is running text which includes an example music file
     \input{foo.tex}
     right here.
     \end{document}
     

The file foo.tex has been simply produced with

     lilypond foo.ly
     

It is important to set the indent parameter to zero in the \paper block of foo.ly.

The call to \lineskip assures that there is enough vertical space between the LilyPond box and the surrounding text lines.

Go back to index of LilyPond.

Please send GNU LilyPond questions and comments to lilypond-user@gnu.org.

Please send comments on these web pages to (address unknown)

Copyright (c) 1997--2002 Han-Wen Nienhuys and Jan Nieuwenhuizen.

Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.


This page was built from LilyPond-1.7.14 (development-branch) by

Buchan Milne <(address unknown)>, Thu Mar 6 21:11:35 2003 CET.