Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(231)

Unified Diff: Documentation/notation/staff.itely

Issue 553760043: Add dynamic-interface to keepAliveInterfaces
Patch Set: Adress review comments on the documentation Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ly/engraver-init.ly » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Documentation/notation/staff.itely
diff --git a/Documentation/notation/staff.itely b/Documentation/notation/staff.itely
index 37d98d5ef79a63de0f8514c861cb2e4b13636987..3dc0757ca59549339d5b867829001efb2c297f77 100644
--- a/Documentation/notation/staff.itely
+++ b/Documentation/notation/staff.itely
@@ -772,12 +772,8 @@ can be done globally (in a @code{\layout} block) as well as for
specific staves only (in a @code{\with} block). This command removes
all empty staves in a score except for those in the first system. If
you want those in the first system to be hidden also, use
-@code{\RemoveAllEmptyStaves}. Supported contexts are @code{Staff},
-@code{RhythmicStaff} and @code{VaticanaStaff}.
+@code{\RemoveAllEmptyStaves}.
-@warning{A staff is considered empty when it contains only
-multi-measure rests, rests, skips, spacer rests, or a combination of these
-elements.}
@lilypond[verbatim,quote,ragged-right]
\layout {
@@ -801,6 +797,37 @@ elements.}
>>
@end lilypond
+A staff is considered empty when it contains only multi-measure rests,
+rests, skips, or a combination of these elements. This behavior can be
+changed through the @code{keepAliveInterfaces} property. A staff will be
+removed if none of the graphical objects it contains supports one of the
+interfaces listed in @code{keepAliveInterfaces}. Thus, keeping staves with
+rests or multi-measure rests visible can be achieved through adding the
+@code{rest-interface} to @code{keepAliveInterfaces} -- staves containing
+skips only will still be removed.
+
+@lilypond[verbatim,quote,ragged-right]
+keepRests =
+\applyContext
+ #(lambda (context)
+ (ly:context-set-property! context 'keepAliveInterfaces
+ (append (ly:context-property context 'keepAliveInterfaces)
+ '(rest-interface))))
+
+\layout {
+ \context {
+ \Score
+ \RemoveAllEmptyStaves
+ \keepRests
+ }
+}
+
+<<
+ { c'1 c'1 c'1 }
+ { R1 \break s1 \break R1 }
+>>
+@end lilypond
+
@cindex ossia
@noindent
@@ -837,7 +864,8 @@ Internals Reference:
@rinternals{Lyrics},
@rinternals{Staff},
@rinternals{VerticalAxisGroup},
-@rinternals{Staff_symbol_engraver}.
+@rinternals{Staff_symbol_engraver},
+@rinternals{Axis_group_engraver}.
@knownissues
Removing @code{Staff_symbol_engraver} also hides bar lines. If
« no previous file with comments | « no previous file | ly/engraver-init.ly » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b