Next: , Previous: Integrating HTML and music, Up: lilypond-book manual



6.4 Music fragment options

The commands for lilypond-book have room to specify one or more of the following options:

verbatim
contents is copied into the source, enclosed in a verbatim block; followed by any text given with the intertext option; then the actual music is displayed. This option does not work with the short version of the music blocks:

@lilypond{ CONTENTS } and \lilypond{ CONTENTS }

filename=filename
This names the file for the printfilename option. The argument should be unquoted.
staffsize=ht
Sets the staff height to ht, which is measured in points.
raggedright
produces naturally spaced lines (i.e., raggedright = ##t); this works well for small music fragments.
linewidth=size\unit
sets linewidth to size, where unit = cm, mm, in, or pt. This option affects LilyPond output, not the text layout.
notime
prevents printing time signature.
fragment
nofragment
overrides lilypond-book auto detection of what type of code is in the LilyPond block, voice contents, or complete code.
indent=size\unit
sets indentation of the first music system to size, where unit = cm, mm, in, or pt. This option affects LilyPond, not the text layout. For single-line fragments, the default is to use no indentation.

For example

            \begin[indent=5\cm,raggedright]{lilypond}
            ...
            \end{lilypond}
     

noindent
sets indentation of the first music system to zero. This option affects LilyPond, not the text layout.
quote
sets linewidth to the width of a quotation and puts the output in a quotation block.
texidoc
Includes the texidoc field, if defined in the file. This is only for Texinfo output.

In Texinfo, the music fragment is normally preceded by the texidoc field from the \header. The LilyPond test documents are composed from small .ly files in this way:

            \header {
              texidoc = "this file demonstrates a single note"
            }
            \score { \notes { c'4 } }
     

relative, relative=N
uses relative octave mode. By default, notes are specified relative to middle C. The optional integer argument specifies the octave of the
relative, relative=N
uses relative octave mode. By default, notes are specified relative to middle C. The optional integer argument specifies the octave of the starting note, where the default 1 is middle C.

Read comments on this page, or add one.

This page is for LilyPond-2.2.6 (stable-branch).

Report errors to <bug-lilypond@gnu.org>.