LilyPond is not a LaTeX package, but a standalone program for typesetting music. To combine LilyPond and LaTeX output into the same document, you have several possibilities:

1) lilypond-book:

This is a pre-processor script which comes packaged with LilyPond. It scans your document, identifies and extracts the LilyPond content, runs lilypond to generate images of that content, and then generates a new TeX document in which the LilyPond content has been replaced by `\includegraphics` commands which point to those images. The script is also capable of generating other formats (like html) as it is designed to work with the texinfo system in which LilyPond's own documentation is written.

2) lyluatex:

This package uses the Lua scripting capabilities of LuaTeX to execute lilypond from within a TeX document. This streamlines your workflow over lilypond-book because now there is just one compilation step: the compilation of the TeX document. Its behavior is otherwise very similar to lilypond-book as it is intended to be a complete drop-in replacement for it. Development is ongoing and the package has just reached the point where it should be able to reproduce all of lilypond-book's non-texinfo capabilities. There are also a couple of additional features which are either in the works or have already been implemented which are designed to make the output look nicer automatically.

3) manual score inclusion

You can also use LilyPond to create images (or whole pdf pages) which can be manually included in your LaTeX document just like any other images (or pdf pages). This option will give you the finest level of control, but you'll have to do everything for yourself, which makes it a much longer process.

My personal choice is #2, but I might be slightly biased as I help out on that project.
Br. Samuel, OSB
St. Anselm’s Abbey
Washington, DC
(R. Padraic Springuel)


lilypond-user mailing list

Reply via email to