Next: , Previous: Layout tunings within contexts, Up: Interpretation contexts



7.1.5 Changing context default settings

The adjustments of the previous subsections (Changing context properties on the fly, Modifying context plug-ins and Layout tunings within contexts) can also be entered separate from the music, in the \layout block,

\layout {
  ...
  \context {
    \Staff

    \set fontSize = #-2
    \override Stem #'thickness = #4.0
    \remove "Time_signature_engraver"
  }
}

Here

\Staff

takes the existing definition for context Staff from the identifier \Staff.

The statements

\set fontSize = #-2
\override Stem #'thickness = #4.0
\remove "Time_signature_engraver"

affect all staves in the score.

Other contexts can be modified analogously.

The \set keyword is optional within the \layout block, so

\context {
  ...
  fontSize = #-2
}

will also work.

Bugs

It is not possible to collect context changes in a variable, and apply them to one \context definition by referring to that variable.

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

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

Other languages: English.
Using automatic language selection.