]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4584: Add OneStaff context type
authorDavid Kastrup <dak@gnu.org>
Wed, 26 Aug 2015 11:50:33 +0000 (13:50 +0200)
committerDavid Kastrup <dak@gnu.org>
Sat, 5 Sep 2015 07:17:28 +0000 (09:17 +0200)
input/regression/one-staff.ly [new file with mode: 0644]
ly/engraver-init.ly
ly/performer-init.ly

diff --git a/input/regression/one-staff.ly b/input/regression/one-staff.ly
new file mode 100644 (file)
index 0000000..45ed449
--- /dev/null
@@ -0,0 +1,25 @@
+\version "2.19.26"
+
+\header {
+  texidoc = "@code{OneStaff} contexts can be used for letting several
+contexts use the same vertical position.  This example shows chords being
+placed in a staff and immediately following it."
+}
+
+\layout {
+  ragged-right = ##t
+}
+
+\new OneStaff
+{
+  << % First element in <<>> so that it is not kept alive spuriously
+    \new Staff
+    {
+      c'4 d' e' f'
+      \chords \with { \override ChordName.Y-offset = -1 }
+      { d1:m7 b1:min7.5- }
+    }
+  >>
+  \chords \with { \override ChordName.Y-offset = -1 }
+  { d1:m7 b1:min7.5- }
+}
index 1842de28a2f5b54598709a91ae11a28cf41d4a76..62559ca40fb6df178f3ab3b9d18954e6ad50769f 100644 (file)
   \accepts "FiguredBass"
   \accepts "GrandStaff"
   \accepts "Lyrics"
+  \accepts "OneStaff"
   \accepts "PianoStaff"
   \accepts "RhythmicStaff"
   \accepts "Staff"
@@ -385,6 +386,7 @@ together, never separately."
   \accepts "FretBoards"
   \accepts "GrandStaff"
   \accepts "Lyrics"
+  \accepts "OneStaff"
   \accepts "PianoStaff"
   \accepts "RhythmicStaff"
   \accepts "Staff"
@@ -397,6 +399,35 @@ staves are connected vertically.  @code{StaffGroup} only consists of
 a collection of staves, with a bracket in front and spanning bar lines."
 }
 
+\context {
+  \type "Engraver_group"
+  \name "OneStaff"
+  \accepts "ChordNames"
+  \accepts "DrumStaff"
+  \accepts "Dynamics"
+  \accepts "FiguredBass"
+  \accepts "FretBoards"
+  \accepts "GregorianTranscriptionStaff"
+  \accepts "KievanStaff"
+  \accepts "Lyrics"
+  \accepts "MensuralStaff"
+  \accepts "NoteNames"
+  \accepts "PetrucciStaff"
+  \accepts "RhythmicStaff"
+  \accepts "Staff"
+  \accepts "TabStaff"
+  \accepts "VaticanaStaff"
+  \defaultchild "Staff"
+  \consists "Axis_group_engraver"
+
+  \description "Provides a common axis for the contained staves,
+making all of them appear in the same vertical space.  This can be
+useful for typesetting staves of different types in immediate succession
+or for temporarily changing the character of one staff or overlaying
+it with a different one.  Often used with @code{\\stopStaff} and
+@code{\\startStaff} for best results."
+}
+
 \context {
   \type "Engraver_group"
   \name "Dynamics"
@@ -580,6 +611,7 @@ automatically when an output definition (a @code{\\score} or
   \accepts "Lyrics"
   \accepts "MensuralStaff"
   \accepts "NoteNames"
+  \accepts "OneStaff"
   \accepts "PetrucciStaff"
   \accepts "PianoStaff"
   \accepts "RhythmicStaff"
index cccfc1d6979eda9b4a162cfe74bc1c1cf8ddd7ad..00c4bdf3dabcd3b64b4b07ac369acc627cbf78b5 100644 (file)
   \accepts MensuralStaff
   \accepts NoteNames
   \accepts NullVoice
+  \accepts OneStaff
   \accepts PetrucciStaff
   \accepts PianoStaff
   \accepts RhythmicStaff
   \accepts DrumStaff
   \accepts GrandStaff
   \accepts Lyrics
+  \accepts OneStaff
   \accepts PianoStaff
   \accepts RhythmicStaff
   \accepts Staff
   \accepts FretBoards
   \accepts GrandStaff
   \accepts Lyrics
+  \accepts OneStaff
   \accepts PianoStaff
   \accepts RhythmicStaff
   \accepts Staff
   \defaultchild Staff
 }
 
+\context {
+  \type "Performer_group"
+  \name "OneStaff"
+  \accepts "ChordNames"
+  \accepts "DrumStaff"
+  \accepts "Dynamics"
+  \accepts "FiguredBass"
+  \accepts "FretBoards"
+  \accepts "GregorianTranscriptionStaff"
+  \accepts "KievanStaff"
+  \accepts "Lyrics"
+  \accepts "MensuralStaff"
+  \accepts "NoteNames"
+  \accepts "PetrucciStaff"
+  \accepts "RhythmicStaff"
+  \accepts "Staff"
+  \accepts "TabStaff"
+  \accepts "VaticanaStaff"
+  \defaultchild "Staff"
+}
+
 \context {
   \Staff
   \name RhythmicStaff