[ << Changing defaults ] | [Top][Contents][Index][ ? ] | [ Interfaces for programmers >> ] | ||
[ < Defining new contexts ] | [ Up : Interpretation contexts ] | [ Explaining the Internals Reference > ] |
5.1.6 Aligning contexts
New contexts may be aligned above or below existing contexts. This could be useful in setting up a vocal staff ( Vocal ensembles) and in ossia,
Contexts like PianoStaff
can contain other contexts
nested within them. Contexts which are acceptable for nesting
are defined by the “accepts” list of a context. Contexts
which are not in this list are placed below the outer context
in the printed score.
For example, the PianoStaff
context is defined by default
to accept Staff
and FiguredBass
contexts within
it, but not (for example) a Lyrics
context. So in the
following structure the lyrics are placed below the piano staff
rather than between the two staves:
\new PianoStaff << \new Staff { e4 d c2 } \addlyrics { Three blind mice } \new Staff { \clef "bass" { c,1 } } >>
The “accepts” list of a context can be modified to include additional nested contexts, so if we wanted the lyrics to appear between the two staves we could use:
\new PianoStaff \with { \accepts Lyrics } << \new Staff { e4 d c2 } \addlyrics { Three blind mice } \new Staff { \clef "bass" { c,1 } } >>
The opposite of \accepts
is \denies
; this removes a
context from the “accepts” list.
[ << Changing defaults ] | [Top][Contents][Index][ ? ] | [ Interfaces for programmers >> ] | ||
[ < Defining new contexts ] | [ Up : Interpretation contexts ] | [ Explaining the Internals Reference > ] |