@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
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
--- /dev/null
+\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
+}
(define-public (first-bar-number-invisible barnum) (> barnum 1))
+(define-public (all-bar-numbers-visible barnum) #t)
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; percent repeat counters