|
|
GNU LilyPondWelcome to the home of the GNU Music Typesetter |
||||||||||
|
Node:lilypond-book, Next:Internals, Previous:Conversion tools, Up:Top lilypond-book
More precisely, if a LaTeX file contains
\begin{lilypond}
CONTENTS
\end{lilypond}
or
\lilypond{CONTENTS}
then LilyPond is run on CONTENTS. lilypond-book puts the
result back into the latex file. When you run the result through latex,
you get a document that mixes text and music. lilypond-book will insert
line width and font size definitions before CONTENTS, so the
music samples will match the layout of your document.
Very often, if you mix music and text, the music is only a few
notes or at most a few bars. This music should be as short as possible
and not stretched to be aligned to the right margin. lilypond-book does
this automatically if you don't use a You can also use \lilypondfile{foo.ly}
All three forms can take several options. They are specified in brackets
as follows:
\lilypondfile[options, go, here]{ .. }
\begin[options, go, here]{lilypond} .. \end{lilypond}
\lilypond[options, go,here]{ .. }
In the texinfo version, bitmaps of the music are also generated, so you can make a HTML document with embedded music. TeXinfo referenceYou specify the lilypond code like this:
@lilypond[options, go, here]
YOUR LILYPOND CODE
@end lilypond
@lilypond[option, go, here]{ YOUR LILYPOND CODE }
@lilypondfile[options, go,here]{filename}
@pagesizes are not yet supported.
ExamplesTwo simple examples. First a complete block:
@lilypond[26pt] c' d' e' f' g'2 g' @end lilypond produces this music: Then the short version:
@lilypond[11pt]{<c' e' g'>}
and its music: LaTeX referenceYou specify the lilypond code like this:
\begin[option, go, here]{lilypond}
YOUR LILYPOND CODE
\end{lilypond}
\lilypondfile[options, go,here]{filename}
or
\lilypond{ YOUR LILYPOND CODE }
Lilypond-book know about the The music will be surrounded by Examples
produces this music: Then the short version:
\lilypond[11pt]{<c' e' g'>}
and its music: Options
eps
\includegraphics command. It works in
LaTeX only.
This enables you to place music examples in the running text (and not in
a separate paragraph). To avoid that LaTeX places the music on a line
of its own, there should be no empty lines between the normal text and
the lilypond environment. For inline music, you probably also need a
smaller music font size (eg. 11 pt or 13 pt)
verbatim
intertext option, then
the actual music is displayed. This option does not work with
the short version of the lilypond blocks:
intertext="text"
verbatim option: this puts
text between the code and the music.
filename=FILENAME
singleline
multiline
singleline: justify and break lines.
fragment
nofragment
lilypond-book auto detection of what type of code is in the
lilypond block, voice contents or complete code.
printfilename
\lilypondfile.
relative, relative N
When you run
For latex input, the file to give to latex has extension If you use If you want to add titling from the \input titledefs.tex
\def\preLilypondExample{\def\mustmakelilypondtitle{}}
Command line options
latex or texi.
lilypond-book usually figure this out automatically.
--default-music-fontsize=szpt
--force-music-fontsize=szpt
\begin{lilypond}
-I DIR, --include=DIR
-M, --dependencies
filename.dep
--dep-prefix=
PREF before each -M dependency
-n, --no-lily
.ly files
--no-pictures
--read-lys
lilypond-book file.tely convert-ly lilypond-book --read-lys [TODO not a useful option unless you can undump the input file]
--outname=FILE
--outdir=DIR
--version
--help
BugsThe LaTeX \includeonly{...} command is ignored. The TeXinfo command Almost all LaTeX commands that change margins and line widths are ignored. Since there is no finder's fee which doubles every year, there is no need to wait for the prize money to grow. So send a bug report today if you need this one of these options. Authors Han-Wen Nienhuys, http://www.cs.uu.nl/~hanwen Tom Cato Amundsen |
||||||||||
|
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 lilypond@packages.debian.org Copyright (c) 1997--2001 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.4.12 (stable-branch) by