Node:Integrating LaTeX and music, Next:Integrating HTML and music, Previous:Integrating Texinfo and music, Up:lilypond-book manual
For LaTeX, music is entered using
\begin[options, go, here]{lilypond} YOUR LILYPOND CODE \end{lilypond}
\lilypondfile[options, go,here]{filename}
or
\lilypond{ YOUR LILYPOND CODE }
Running lilypond-book yields a file that can be processed with LaTeX. We show some examples here:
\begin[26pt]{lilypond} c' d' e' f' g'2 g'2 \end{lilypond}
produces
Then the short version:
\lilypond[11pt]{<c' e' g'>}
produces
The linewidth of the music will be adjust by examining the commands in
the document preamble, the part of the document before
\begin{document}
: lilypond-book
sends these to
LaTeX to find out how wide the text is. The line width variable for
the music fragments are adjusted to the text width.
After \begin{document}
, the column changing commands
\onecolumn
, \twocolumn
commands and the
multicols
environment from the multicol package are also
interpreted.
The titling from the \header
section of the fragments can be
imported by adding the following to the top of the LaTeX file:
\input titledefs.tex \def\preLilyPondExample{\def\mustmakelilypondtitle{}}
The music will be surrounded by \preLilyPondExample
and
\postLilyPondExample
, which are defined to be empty by default.
This page is for LilyPond-2.0.0 (stable-branch).