]> git.donarmstrong.com Git - lilypond.git/commitdiff
Doc: NR - 1.2.5 - Bar Numbers - added snippet
authorJames Lowe <pkx166h@gmail.com>
Sat, 18 Jul 2015 04:26:16 +0000 (05:26 +0100)
committerJames Lowe <pkx166h@gmail.com>
Sat, 18 Jul 2015 04:26:16 +0000 (05:26 +0100)
Issue 3351
Added snippet showing
set-bar-number-visibility
context setting being used.

Minor line length formatting
as per the CG.

Documentation/notation/rhythms.itely
Documentation/snippets/new/printing-bar-numbers-with-changing-regular-intervals.ly [new file with mode: 0644]

index da24f57b49a26e1a4c2d8b94c1707d82a72a9e0a..78e0433690fbe15c5a67b2c31300312518494dd0 100644 (file)
@@ -3080,16 +3080,16 @@ automatically for every measure.  It may also be set manually:
 @funindex barNumberVisibility
 @funindex BarNumber
 
-Bar numbers can be typeset at regular intervals instead of just at
-the beginning of every line.  To do this the default behavior
-must be overridden to permit bar numbers to be printed at places
-other than the start of a line.  This is controlled by the
-@code{break-visibility} property of @code{BarNumber}.  This takes
-three values which may be set to @code{#t} or @code{#f} to specify
-whether the corresponding bar number is visible or not.  The order
-of the three values is @code{end of line visible}, @code{middle of
-line visible}, @code{beginning of line visible}.  In the following
-example bar numbers are printed at all possible places:
+Bar numbers can be typeset at regular intervals instead of just at the
+beginning of every line.  To do this the default behavior must be
+overridden to permit bar numbers to be printed at places other than the
+start of a line.  This is controlled by the @code{break-visibility}
+property of @code{BarNumber}.  This takes three values which may be set
+to @code{#t} or @code{#f} to specify whether the corresponding bar
+number is visible or not.  The order of the three values is
+@code{end of line visible}, @code{middle of line visible},
+@code{beginning of line visible}.  In the following example bar numbers
+are printed at all possible places:
 
 @lilypond[verbatim,quote]
 \relative c' {
@@ -3110,6 +3110,9 @@ example bar numbers are printed at all possible places:
 @lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
 {printing-bar-numbers-at-regular-intervals.ly}
 
+@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
+{printing-bar-numbers-with-changing-regular-intervals.ly}
+
 @cindex measure number, format
 @cindex bar number, format
 
diff --git a/Documentation/snippets/new/printing-bar-numbers-with-changing-regular-intervals.ly b/Documentation/snippets/new/printing-bar-numbers-with-changing-regular-intervals.ly
new file mode 100644 (file)
index 0000000..e15ba70
--- /dev/null
@@ -0,0 +1,21 @@
+\version "2.18.0"
+
+\header {
+  lsrtags = "rhythms, text"
+
+  texidoc = "
+The bar number interval can be changed by changing the context function
+@code{set-bar-number-visibility}.
+
+"
+  doctitle = "Printing bar numbers with changing, regular intervals"
+} % begin verbatim
+
+
+\relative c' {
+  \override Score.BarNumber.break-visibility = #end-of-line-invisible
+  \context Score \applyContext #(set-bar-number-visibility 4)
+  \repeat unfold 10 c''1
+  \context Score \applyContext #(set-bar-number-visibility 2)
+  \repeat unfold 10 c''
+}