Jump to content

Printing the bar number for the first measure: Difference between revisions

From LilyPond wiki
Import snippet from LSR
 
m Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series
Line 1: Line 1:
By default, the first bar number in a score is suppressed if it is less than or equal to 1. By setting <code>barNumberVisibility</code> to <code>all-bar-numbers-visible</code>, any bar number can be printed for the first measure and all subsequent measures.
By default, the first bar number in a score is suppressed if it is less than or equal to 1. By setting <code>barNumberVisibility</code> to <code>all-bar-numbers-visible</code>, any bar number can be printed for the first measure and all subsequent measures.


<lilypond version="2.24.0">
<lilypond version="2.24">
\layout {
\layout {
   indent = 0
   indent = 0

Revision as of 18:54, 16 November 2025

By default, the first bar number in a score is suppressed if it is less than or equal to 1. By setting barNumberVisibility to all-bar-numbers-visible, any bar number can be printed for the first measure and all subsequent measures.

\version "2.24"

\layout {
  indent = 0
  ragged-right = ##t
}

\relative c' {
  \set Score.barNumberVisibility = #all-bar-numbers-visible
  c1 | d | e | f \break
  g1 | e | d | c
}