]> git.donarmstrong.com Git - lilypond.git/commitdiff
Docs: Add new procedure for barNumberVisibility
authorPatrick McCarty <pnorcks@gmail.com>
Wed, 7 Jan 2009 00:26:22 +0000 (16:26 -0800)
committerCarl Sorensen <c_sorensen@byu.edu>
Sat, 10 Jan 2009 22:54:14 +0000 (15:54 -0700)
* 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 <pnorcks@gmail.com>
Documentation/user/rhythms.itely
input/new/printing-the-bar-number-for-the-first-measure.ly [new file with mode: 0644]
scm/output-lib.scm

index 3b13b80fe845cd9d9a95e10977f41797fc3afb63..210a3b76f1dfdf1ca2455eca7befbac0c90158a0 100644 (file)
@@ -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 (file)
index 0000000..86cc793
--- /dev/null
@@ -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
+}
index c33aff028d8ed8ff7e98f06ce7ce1a0b3f097ec1..53a5773d0f738e570b855b8a68e402c793fd23c5 100644 (file)
@@ -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