From: Patrick McCarty Date: Wed, 7 Jan 2009 00:26:22 +0000 (-0800) Subject: Docs: Add new procedure for barNumberVisibility X-Git-Tag: release/2.12.2-1~33 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=ba9d8e2f35cd29eefe9e7cca978cdd6f5d44e776;p=lilypond.git Docs: Add new procedure for barNumberVisibility * The default value of barNumberVisibility, the procedure first-bar-number-invisible, hides the first bar number when currentBarNumber is less than or equal to `1'. This new procedure, all-bar-numbers-visible, allows the printing of all bar numbers, given that the value of 'break-visibility permits it. Signed-off-by: Patrick McCarty --- diff --git a/Documentation/user/rhythms.itely b/Documentation/user/rhythms.itely index 3b13b80fe8..210a3b76f1 100644 --- a/Documentation/user/rhythms.itely +++ b/Documentation/user/rhythms.itely @@ -2156,6 +2156,10 @@ c1 c c c @funindex barNumberVisibility +@c Uncomment this after next LSR update. +@c @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle] +@c {printing-the-bar-number-for-the-first-measure.ly} + 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 @@ -2280,19 +2284,6 @@ Bar numbers may collide with the top of the this, the @code{padding} property of @rinternals{BarNumber} can be used to position the number correctly. -Bar numbers may only be printed at bar lines; to print a bar -number at the beginning of a piece, an empty bar line must be -inserted there, and a value other than @code{1} must be placed -in @code{currentBarNumber}: - -@lilypond[verbatim,quote,relative=1] -\set Score.currentBarNumber = #50 -\bar "" -c1 c c c -c1 c c c -\break -@end lilypond - @node Bar and bar number checks diff --git a/input/new/printing-the-bar-number-for-the-first-measure.ly b/input/new/printing-the-bar-number-for-the-first-measure.ly new file mode 100644 index 0000000000..86cc793088 --- /dev/null +++ b/input/new/printing-the-bar-number-for-the-first-measure.ly @@ -0,0 +1,23 @@ +\version "2.12.1" + +\header { + lsrtags = "rhythms" + + texidoc = " +By default, the first bar number in a score is suppressed if it is +less than or equal to `1'. By setting @code{barNumberVisibility} +to @code{all-bar-numbers-visible}, any bar number can be printed +for the first measure and all subsequent measures. Note that an +empty bar line must be inserted before the first note for this to +work. + +" + doctitle = "Printing the bar number for the first measure" +} + +\relative c' { + \set Score.barNumberVisibility = #all-bar-numbers-visible + \bar "" + c1 d e f \break + g1 e d c +} diff --git a/scm/output-lib.scm b/scm/output-lib.scm index c33aff028d..53a5773d0f 100644 --- a/scm/output-lib.scm +++ b/scm/output-lib.scm @@ -202,6 +202,8 @@ centered, X==1 is at the right, X == -1 is at the left." (define-public (first-bar-number-invisible barnum) (> barnum 1)) +(define-public (all-bar-numbers-visible barnum) #t) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; percent repeat counters