From b28d44a1cea8120501e648bb8626064a94cd4036 Mon Sep 17 00:00:00 2001 From: James Lowe Date: Sat, 18 Jul 2015 05:26:16 +0100 Subject: [PATCH] Doc: NR - 1.2.5 - Bar Numbers - added snippet 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 | 23 +++++++++++-------- ...numbers-with-changing-regular-intervals.ly | 21 +++++++++++++++++ 2 files changed, 34 insertions(+), 10 deletions(-) create mode 100644 Documentation/snippets/new/printing-bar-numbers-with-changing-regular-intervals.ly diff --git a/Documentation/notation/rhythms.itely b/Documentation/notation/rhythms.itely index da24f57b49..78e0433690 100644 --- a/Documentation/notation/rhythms.itely +++ b/Documentation/notation/rhythms.itely @@ -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 index 0000000000..e15ba70f11 --- /dev/null +++ b/Documentation/snippets/new/printing-bar-numbers-with-changing-regular-intervals.ly @@ -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'' +} -- 2.39.2