[ << General input and output ] | [Top][Contents][Index][ ? ] | [ Spacing issues >> ] | ||
[ < Custom layout for headers and footers ] | [ Up : Titles and headers ] | [ Footnotes overview > ] |
3.2.3 Creating footnotes
There are two types of footnotes that can be created; automatic footnotes and manual footnotes.
Footnotes overview | ||
Automatic footnotes | ||
Manual footnotes |
[ << General input and output ] | [Top][Contents][Index][ ? ] | [ Spacing issues >> ] | ||
[ < Creating footnotes ] | [ Up : Creating footnotes ] | [ Automatic footnotes > ] |
Footnotes overview
Automatic footnotes create incrementing numerical indicators and manual
footnotes allow a custom indicator to be created instead. Footnotes are
normally applied like \tweak
and consequently can be placed
directly on grobs (graphical objects) created by most music elements and
post-events. In cases where this does not work (like with bar lines and
meter changes, where the grobs are produced as a consequence of property
changes), footnotes can also be specified as a standalone music event
affecting all grobs of a given type at a particular time step.
The full form of a footnote command is
\footnote mark offset grob-name footnote music
The elements are as follows:
- mark
is a markup or string specifying the footnote mark which is used for both marking the reference point as well as the footnote itself at the bottom of the page. It can be omitted (or equivalently replaced with
\default
) in which case a number in sequence will be generated.- offset
is a number pair such as ‘#(2 . 1)’ specifying the X and Y offset from the reference point where the mark will be placed.
- grob-name
specifies a type of grob to mark (like ‘#'Flag’). If it is given, the respective grob will be used as a reference point even in case that its ‘cause’ is not the referenced music itself but a grob created from it. It can be omitted (or replaced with
\default
), and then only a directly created grob will be annotated.- footnote
This markup or string specifies the footnote text to use at the bottom of the page.
- music
This is the item, a music event or chord constituent or post-event, that is being annotated. While it cannot be omitted, it can be replaced by
\default
in which case the footnote is not attached to a music expression in particular, but rather to a moment of time. It is mandatory in this case to use the grob-name argument for selecting an affected grob type, like ‘#'TimeSignature’.
Like with \tweak
, if your \footnote
is applied to a
post-event or articulation, it will itself have to be preceded with
-
to make the parser attach the result to the preceding note or
rest.
[ << General input and output ] | [Top][Contents][Index][ ? ] | [ Spacing issues >> ] | ||
[ < Footnotes overview ] | [ Up : Creating footnotes ] | [ Manual footnotes > ] |
Automatic footnotes
Automatic footnotes take four arguments: the ‘(x . y)’ position of the indicator, the optional grob-name specifying the layout object to be annotated, the footnote markup itself that will appear at the bottom of the page, and of course the music to attach the footnote to.
\book { \header { tagline = ##f } \relative c' { \footnote #'(0.5 . -2) \markup { The first note } a'4 b8 \footnote #'(0.5 . 1) #'Flag \markup { The third note } e\noBeam c4 d4 } }
Chorded notes pose no particular difficulty:
\book { \header { tagline = ##f } \relative c' { < \footnote #'(1 . -1.25) "Here is a C" c \footnote #'(2 . -0.25) \markup { \italic "An E-flat" } es \footnote #'(2 . 3) \markup { \bold "This is a G" } g >1 } }
Note: When footnotes have the same vertical position, the footnotes are printed in order of descendancy; the higher the footnote, the higher up in the list.
Here are some more examples of footnoted grobs, also showing the relative position of the footnotes to the tagline and copyright.
\book { \header { copyright = \markup { "Copyright 1970" } } \relative c' { a'4-\footnote #'(-3 . 0) \markup { \bold Forte } \f -\footnote #'(0 . 1.5) \markup { A slur } ( b8)-\footnote #'(0 . -2) \markup { Beam } [ e] \footnote #'(1 . -1) #'Stem \markup { \teeny { This is a stem } } c4 \footnote #'(0 . 0.5) #'AccidentalCautionary \markup \italic { A cautionary accidental } \footnote #'(1 . 1) "The note itself" dis?4-\footnote #'(0.5 . -0.5) \markup \italic { Slow Down } _"rit." } }
For top-level \markup
, the \auto-footnote
command is
required:
\book { \header { tagline = ##f } \markup { \auto-footnote "A simple tune" \italic "By me" } \relative c' { a'4 b8 e c4 d } }
[ << General input and output ] | [Top][Contents][Index][ ? ] | [ Spacing issues >> ] | ||
[ < Automatic footnotes ] | [ Up : Creating footnotes ] | [ Reference to page numbers > ] |
Manual footnotes
Manually marked footnotes take an additional first markup argument mark for making the reference mark. In contrast to automatically generated footnote marks, they will not appear before the footnote markup at the bottom of the page: establishing the visual connection is left to the user. LilyPond will only make sure that the corresponding markup appears on the bottom of the same page.
Other than that, the use is identical to that of automatically numbered footnotes.
\book { \header { tagline = ##f } \relative c' { \footnote "1" #'(0.5 . -2) \markup { \italic "1. The first note" } a'4 b8 \footnote \markup { \bold "2" } #'(0.5 . 1) "2. The second note" e c4 d-\footnote "3" #'(0.5 . -1) "3. Piano" \p } }
To annotate chorded notes with manual footnotes:
\book { \header { tagline = ##f } \relative c' { < \footnote "1" #'(1 . -1.25) "1. C" c \footnote \markup { \bold "b" } #'(2 . -0.25) "b. E-flat" es \footnote "3" #'(2 . 3) \markup { \italic "iii. G" } g >1 } }
Note: When footnotes have the same vertical position, the footnotes are printed in order of descendancy; the higher the footnote, the higher up in the list.
Here are some examples of manually footnoted grobs, also showing the relative position of the footnotes to the tagline and copyright
\book { \header { tagline = ##f } \relative c' { a'4-\footnote \markup { \teeny 1 } #'(-3 . 0) \markup { 1. \bold Forte } \f -\footnote \markup { \teeny b } #'(0 . 1.5) \markup { b. A slur } ( b8)-\footnote \markup { \teeny 3 } #'(0 . -2) \markup { 3. Beam } [ e] \footnote \markup { 4 } #'(1 . -1) #'Stem \markup { \bold 4. { This is a stem } } c4 \footnote \markup \concat \teeny { "sharp (v)" } #'(0 . 0.5) #'AccidentalCautionary \markup \italic { v. A cautionary accidental } dis?4-\footnote \markup \concat \teeny { "a" } #'(0.5 . -0.5) \markup \italic { a. Slow Down } _"rit." \footnote \markup { \teeny \musicglyph #"rests.4" } #'(1.5 . -0.25) \markup { \null } \breathe } }
To manually footnote a top-level \markup
:
\book { \header { tagline = ##f } \markup { "A simple tune" \footnote "*" \italic "* By me" } \relative c' { a'4 b8 e c4 d4 } }
See also
Learning Manual: Objects and interfaces.
Notation Reference: Balloon help, Page layout, Text marks, Text scripts, Titles and headers.
Internals Reference: FootnoteEvent, FootnoteItem, FootnoteSpanner, Footnote_engraver.
Known issues and warnings
Multiple footnotes for the same page can only be stacked, one on top of
the other, and cannot be printed on the same line. Footnotes cannot be
attached to MultiMeasureRests
and may collide with Staff
,
\markup
objects and other footnote
annotations. When
using any manual footnote
command a \paper
block
containing footnote-auto-number = ##f
is required.
[ << General input and output ] | [Top][Contents][Index][ ? ] | [ Spacing issues >> ] | ||
[ < Automatic footnotes ] | [ Up : Creating footnotes ] | [ Reference to page numbers > ] |
Jiné jazyky: deutsch, español, français, italiano, 日本語.
About automatic language selection.