[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

Integrating LaTeX and music

You specify LilyPond code like this:

     \begin[options, go, here]{lilypond}
       YOUR LILYPOND CODE
     \end{lilypond}
     
     \lilypondfile[options, go,here]{filename}
     

or

     \lilypond{ YOUR LILYPOND CODE }
     

Then you run lilypond-book on it, and the result is a file you can process with LaTeX. We show some examples here.

     \begin[26pt]{lilypond}
       c' d' e' f' g'2 g'2
     \end{lilypond}
     

produces this music:

[picture of music]

Then the short version:

     \lilypond[11pt]{<<c' e' g'>>}
     

and its music:

[picture of music]

You can use whatever commands you like in the document preamble, the part of the document before \begin{document}. lilypond-book will send it to LaTeX to find out how wide the text is and adjust the linewidth variable in the paper definition of your music according to that.

After \begin{document} you must be a little more careful when you use commands that change the width of the text and how many columns there are. lilypond-book knows about the \onecolumn and \twocolumn commands and the multicols environment from the multicol package.

The music will be surrounded by \preLilypondExample and \postLilypondExample. The variables are defined to nothing by default, and the user can redefine them to whatever he wants.

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.