[ << Changing defaults ] | [Top][Contents][Index] | [ Notation manual tables >> ] |
[ < Changing context default settings ] | [ Up : Changing context default settings ] | [ Changing just one specific context > ] |
Changing all contexts of the same type
The default context settings which are to be used for typesetting
in Score
, Staff
, Voice
, and other contexts
may be specified in a \context
block within any
\layout
block.
Settings for MIDI output as opposed to typesetting has to be
separately specified in \midi
blocks (see Output definitions – blueprints for contexts).
The \layout
block should be placed within the \score
block to which it is to apply, after the music.
\layout { \context { \Voice [context settings for all Voice contexts] } \context { \Staff [context settings for all Staff contexts] } }
The following types of settings may be specified:
- An
\override
command, but with the context name omitted.\score { \relative { a'4^"Thicker stems" a a a a4 a a\ff a } \layout { \context { \Staff \override Stem.thickness = 4.0 } } }
- Directly setting a context property.
\score { \relative { a'4^"Smaller font" a a a a4 a a\ff a } \layout { \context { \Staff fontSize = -4 } } }
- A predefined command such as
\dynamicUp
or a music expression like\accidentalStyle dodecaphonic
.\score { \relative { a'4^"Dynamics above" a a a a4 a a\ff a } \layout { \context { \Voice \dynamicUp } \context { \Staff \accidentalStyle dodecaphonic } } }
- A user-defined variable containing a
\with
block; for details of the\with
block, see Changing just one specific context.StaffDefaults = \with { fontSize = -4 } \score { \new Staff { \relative { a'4^"Smaller font" a a a a4 a a a } } \layout { \context { \Staff \StaffDefaults } } }
Property-setting commands can be placed in a \layout
block
without being enclosed in a \context
block. Such settings
are equivalent to including the same property-setting commands at
the start of every context of the type specified. If no context
is specified every bottom-level context is affected
(see Bottom-level contexts – voices). The syntax of a
property-setting command in a \layout
block is the same as
the same command written in the music stream.
\score { \new Staff { \relative { a'4^"Smaller font" a a a a4 a a a } } \layout { \accidentalStyle dodecaphonic \set fontSize = -4 \override Voice.Stem.thickness = 4.0 } }
[ << Changing defaults ] | [Top][Contents][Index] | [ Notation manual tables >> ] |
[ < Changing context default settings ] | [ Up : Changing context default settings ] | [ Changing just one specific context > ] |