X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Documentation%2Fnotation%2Fchanging-defaults.itely;h=39928b6061692c0bd164cb56bede2f4891342522;hb=a39e6a5eade9e61bf4edf6f21f60dee82ee08fb0;hp=cb8edf2c033a272ccf7aff8124f6a4080e76e343;hpb=8848da24e00c75d7de626b2ecc409fb45e87ce4a;p=lilypond.git diff --git a/Documentation/notation/changing-defaults.itely b/Documentation/notation/changing-defaults.itely index cb8edf2c03..39928b6061 100644 --- a/Documentation/notation/changing-defaults.itely +++ b/Documentation/notation/changing-defaults.itely @@ -1342,33 +1342,42 @@ list will be repositioned below the outer context rather than nested within it. The @qq{accepts} list of a context can be changed with the -@code{\accepts} and @code{\denies} commands. @code{\accepts} adds a +@code{\accepts} or @code{\denies} commands. @code{\accepts} adds a context to the @qq{accepts} list and @code{\denies} removes a context -from the list. For example, it would not normally be desirable for -chord names to be nested within a @code{Staff} context, so the -@code{ChordNames} context is not included by default in the @qq{accepts} -list of the @code{Staff} context, but if this were to be required it can -be done: +from the list. + +For example, a square-braced staff group is not usually found within a +curved-braced staff with connecting staff bars, and a @code{GrandStaff} +does not accept a @code{StaffGroup} inside it by default. @lilypond[verbatim,quote] \score { - \new Staff { - c' d' e' f' - \chords { d1:m7 b1:min7.5- } - } + \new GrandStaff << + \new StaffGroup << + \new Staff { c'1 } + \new Staff { d'1 } + >> + \new Staff { \set Staff.instrumentName = bottom f'1 } + >> } @end lilypond +However, by using the @code{\accepts} command, @code{StaffGroup} can be +added to the @code{GrandStaff} context: + @lilypond[verbatim,quote] \score { - \new Staff { - c' d' e' f' - \chords { d1:m7 b1:min7.5- } - } + \new GrandStaff << + \new StaffGroup << + \new Staff { c'1 } + \new Staff { d'1 } + >> + \new Staff { \set Staff.instrumentName = bottom f'1 } + >> \layout { \context { - \Staff - \accepts "ChordNames" + \GrandStaff + \accepts "StaffGroup" } } }