lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Add RemoveEmptyStavesAll command (issue 283050043 by address@hidden)


From: simon . albrecht
Subject: Add RemoveEmptyStavesAll command (issue 283050043 by address@hidden)
Date: Thu, 14 Jan 2016 15:11:14 +0000

Reviewers: ,

Description:
Add RemoveEmptyStavesAll command

It has been noted several times that we should have a companion
for RemoveEmptyStaves to also set remove-first to ##t.  I’ve
made an attempt at providing it – please review.  A doc snippet,
removing-the-first-empty-line.ly, has become obsolete with these
changes. Should I do something about that?

Contains commits:


Add missing word in changes.tely


Add changes entry for RemoveEmptyStavesAll


Use RemoveEmptyStavesAll for ossia example in NR


Document RemoveEmptyStavesAll

This rewrites documentation for RemoveEmptyStaves and
adds information on the newly added RemoveEmptyStavesAll.

Add RemoveEmptyStavesAll command

Introduce a new context modification identifier,
RemoveEmptyStavesAll, to complement RemoveEmptyStaves.
It sets both the remove-empty _and_ remove-first properties
of VerticalAxisGroup to ##t.

Please review this at https://codereview.appspot.com/283050043/

Affected files (+35, -37 lines):
  M Documentation/changes.tely
  M Documentation/notation/staff.itely
  M ly/context-mods-init.ly


Index: Documentation/changes.tely
diff --git a/Documentation/changes.tely b/Documentation/changes.tely
index 24e973e4fd4c89d5ac438acf377c8376593eb5c0..6fa4c427bdc36230ee0de9c481e42cb4653c70f8 100644
--- a/Documentation/changes.tely
+++ b/Documentation/changes.tely
@@ -62,8 +62,13 @@ which scares away people.
 @end ignore

 @item
+A new command, @code{\RemoveEmptyStavesAll}, has been made available, which
+acts exactly like @code{\RemoveEmptyStaves}, except for also removing empty
+staves on the first system in a score.
+
address@hidden
Markup-commands @code{\undertie} and @code{\overtie} are now available, as well
-the generic markup-command @code{\tie}.
+as the generic markup-command @code{\tie}.
 @lilypond[quote,verbatim]
 \markup {
   \undertie "undertied"
Index: Documentation/notation/staff.itely
diff --git a/Documentation/notation/staff.itely b/Documentation/notation/staff.itely index db5d5ebab8fe0508986554f4d553e4af4bdb0818..009f273b1d523b7ef53316d19cbf47b464c78cd2 100644
--- a/Documentation/notation/staff.itely
+++ b/Documentation/notation/staff.itely
@@ -669,11 +669,11 @@ example.
 @end lilypond


-Using the @code{\Staff \RemoveEmptyStaves} command to create ossia
+Using the @code{\RemoveEmptyStavesAll} command to create ossia
 staves may be used as an alternative.  This method is most
 convenient when ossia staves occur immediately following a line
 break.  For more information about
address@hidden \RemoveEmptyStaves}, see @ref{Hiding staves}.
address@hidden, see @ref{Hiding staves}.

 @lilypond[verbatim,quote,ragged-right]
 <<
@@ -681,6 +681,7 @@ break.  For more information about
     \remove "Time_signature_engraver"
     \hide Clef
     \magnifyStaff #2/3
+    \RemoveEmptyStavesAll
   } \relative {
     R1*3
     c''4 e8 d c2
@@ -694,13 +695,6 @@ break.  For more information about
     e4 d c2
   }
 >>
-
-\layout {
-  \context {
-    \Staff \RemoveEmptyStaves
-    \override VerticalAxisGroup.remove-first = ##t
-  }
-}
 @end lilypond


@@ -737,10 +731,14 @@ Internals Reference:
 @cindex Frenched staff
 @cindex staff, hiding
 @cindex staff, empty
address@hidden hiding of staves
address@hidden hiding staves
address@hidden hiding ancient staves
address@hidden hiding rhythmic staves
address@hidden hiding vaticana staves
 @cindex empty staves

 @funindex \RemoveEmptyStaves
address@hidden \RemoveEmptyStavesAll
 @funindex Staff_symbol_engraver
 @funindex \stopStaff
 @funindex stopStaff
@@ -758,11 +756,14 @@ alternative, @code{\stopStaff} may be used.
 @end lilypond


-Empty staves can be hidden by setting the
address@hidden \RemoveEmptyStaves} command in the @code{\layout}
-block.  In orchestral scores, this style is known as @q{Frenched
-Score}.  By default, this command hides and removes all empty
-staves in a score except for those in the first system.
+Empty staves can be hidden (for a so-called @q{Frenched Score})
+by applying the @code{\RemoveEmptyStaves} command on a context, which
+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
address@hidden  Supported contexts are @code{Staff},
address@hidden and @code{VaticanaStaff}.

 @warning{A staff is considered empty when it contains only
 multi-measure rests, rests, skips, spacer rests, or a combination of these
@@ -771,7 +772,8 @@ elements.}
 @lilypond[verbatim,quote,ragged-right]
 \layout {
   \context {
-    \Staff \RemoveEmptyStaves
+    \Staff
+    \RemoveEmptyStaves
   }
 }

@@ -792,32 +794,15 @@ elements.}
 @cindex ossia

 @noindent
address@hidden \RemoveEmptyStaves} can also be used to create ossia
address@hidden can also be used to create ossia
 sections for a staff.  For details, see @ref{Ossia staves}.

address@hidden hiding ancient staves
address@hidden hiding rhythmic staves
-
address@hidden \RemoveEmptyStaves
-
-The @code{\VaticanaStaff \RemoveEmptyStaves} command may be used to
-hide empty staves in ancient music contexts.  Similarly,
address@hidden \RemoveEmptyStaves} may be used to hide empty
address@hidden contexts.
-

 @predefined
address@hidden \RemoveEmptyStaves},
address@hidden \RemoveEmptyStaves},
address@hidden \RemoveEmptyStaves}.
address@hidden,
address@hidden
 @endpredefined

-
address@hidden
-
address@hidden,quote,texidoc,doctitle]
-{removing-the-first-empty-line.ly}
-
 @seealso
 Music Glossary:
 @rglos{Frenched staff}.
Index: ly/context-mods-init.ly
diff --git a/ly/context-mods-init.ly b/ly/context-mods-init.ly
index 24b8ce055845e3d730475b64da9c94e6a9e46b46..488c04fb5a73f1a7fd76769a48c7b72ae6cac9f4 100644
--- a/ly/context-mods-init.ly
+++ b/ly/context-mods-init.ly
@@ -24,6 +24,14 @@ RemoveEmptyStaves = \with {
 to the list of interfaces set by @code{keepAliveInterfaces}."
 }

+RemoveEmptyStavesAll = \with {
+  \override VerticalAxisGroup.remove-empty = ##t
+  \override VerticalAxisGroup.remove-first = ##t
+  \description "Remove staves which are considered to be empty according
+to the list of interfaces set by @code{keepAliveInterfaces}, including those
+in the first system."
+}
+
 inherit-acceptability =
 #(define-void-function (to from)
    (symbol? symbol?)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]