Next: Invoking lilypond-book, Previous: Integrating music and text, Up: LilyPond-book
In the following, a ‘LilyPond command’ refers to any command described in the previous sections which is handled by lilypond-book to produce a music snippet. For simplicity, LilyPond commands are only shown in LaTeX syntax.
Note that the option string is parsed from left to right; if an option occurs multiple times, the last one is taken.
The following options are available for LilyPond commands:
staffsize=
htragged-right
ragged-right = ##t
is added to the LilyPond snippet. This is the
default for the \lilypond{}
command if no line-width
option is present. It is also the default for the lilypond
environment if the fragment
option is set, and no line width is
explicitly specified.
noragged-right
ragged-right = ##f
is
added to the LilyPond snippet.
packed
packed = ##t
is added
to the LilyPond snippet.
line-width
line-width=
size\
unitcm
, mm
, in
, or
pt
. This option affects LilyPond output (this is, the staff
length of the music snippet), not the text layout.
If used without an argument, set line width to a default value (as computed with a heuristic algorithm).
If no line-width
option is given, lilypond-book tries to
guess a default for lilypond
environments which don't use the
ragged-right
option.
notime
fragment
c'4
without \layout
, \score
, etc.
nofragment
nofragment
is redundant normally.
indent=
size\
unitcm
, mm
, in
, or pt
. This option affects
LilyPond, not the text layout.
noindent
noindent
is redundant normally.
quote
exampleindent
option.
exampleindent
quote
option indents a music snippet.
relative
relative=
n1
is middle C.
relative
option only works when fragment
option is set,
so fragment
is automatically implied by relative
,
regardless of the presence of any (no)fragment
option in the
source.
LilyPond also uses lilypond-book to produce its own documentation. To do that, some more obscure music fragment options are available.
verbatim
intertext
option (not implemented yet); then the actual music is
displayed. This option does not work well with \lilypond{}
if
it is part of a paragraph.
If verbatim
is used in a lilypondfile
command, it is
possible to enclose verbatim only a part of the source file. If the
source file contain a comment containing ‘begin verbatim’ (without
quotes), quoting the source in the verbatim block will start after the
last occurrence of such a comment; similarly, quoting the source verbatim
will stop just before the first occurrence of a comment containing
‘end verbatim’, it there is any. In the following source file
example, the music will be interpreted in relative mode, but the
verbatim quote will not show the relative
block, i.e.
\relative c' { % begin verbatim c4 e2 g4 f2 e % end verbatim }
will be printed with a verbatim block like
c4 e2 g4 f2 e
addversion
\version
@w{"@version{}"}
to verbatim
output.
texidoc
texidoc
field in the \header
. The texidoc
option makes lilypond-book include such files, adding its
contents as a documentation block right before the music snippet.
Assuming the file foo.ly contains
\header { texidoc = "This file demonstrates a single note." } { c'4 }
and we have this in our Texinfo document test.texinfo
@lilypondfile[texidoc]{foo.ly}
the following command line gives the expected result
lilypond-book --process="lilypond --format=tex --tex \ --header=texidoc test.texinfo
Most LilyPond test documents (in the input directory of the distribution) are small .ly files which look exactly like this.
For localization purpose, if the Texinfo document contains
@documentlanguage
LANG and foo.ly header
contains a texidoc
LANG field, and if lilypond
is called with --header=texidocLANG, then
foo.texidocLANG will be included instead of
foo.texidoc.
lilyquote
verbatim
option) is put into a quotation block. This option is
useful if you want to quote
the music snippet but not the
texidoc
documentation block.
doctitle
texidoc
option: if lilypond is called with the
--header=doctitle option, and the file to be processed is
called foo.ly and contains a doctitle
field in the
\header
, it creates a file foo.doctitle. When
doctitle
option is used, the contents of foo.doctitle,
which should be a single line of text, is inserted in the
Texinfo document as @lydoctitle
text.
@lydoctitle
should be a macro defined in the Texinfo document.
The same remark about texidoc
processing with localized
languages also applies to doctitle
.
printfilename
\lilypondfile
, print
the file name right before the music snippet. For HTML output, this
is a link. Only the base name of the file is printed, i.e. the
directory part of the file path is stripped.
fontload
Cette page documente LilyPond-2.11.58 (branche de développement).
Rapportez toute anomalie en français à lilypond-user-fr@gnu.org ou en anglais à http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs
Vos suggestions à propos de la documentation sont les bienvenues.