]> git.donarmstrong.com Git - lilypond.git/commitdiff
Doc: NR improve example of \accepts
authorJames Lowe <pkx166h@gmail.com>
Fri, 20 Dec 2013 00:03:22 +0000 (00:03 +0000)
committerDavid Kastrup <dak@gnu.org>
Fri, 14 Mar 2014 17:42:27 +0000 (18:42 +0100)
Issue 3641

Improve example given in NR 5.1.7

(cherry picked from commit f083dbe9c8743e3a1fc4ce1aea085b114e263d6d)

Documentation/notation/changing-defaults.itely

index cb8edf2c033a272ccf7aff8124f6a4080e76e343..39928b6061692c0bd164cb56bede2f4891342522 100644 (file)
@@ -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"
     }
   }
 }