\version "2.19.15" #(define (use-measure-numbers grob) (let* ((orig (ly:grob-original grob)) (siblings (if (ly:grob? orig) (ly:spanner-broken-into orig) '()))) (let loop ((sibs siblings)) (if (pair? sibs) (begin (let* ((bound (ly:spanner-bound (car sibs) LEFT)) (location (ly:grob-property bound 'rhythmic-location)) (measure (car location))) (set! (ly:grob-property (car sibs) 'text) (number->string measure)) (loop (cdr sibs)))))))) music = { \partial 2 c4 d \repeat unfold 20 { c4 d e f } } \score { \new PianoStaff \with { shortInstrumentName = "foo" } << \new Staff { \relative c'' { \music } } \new Staff { \clef bass \music } >> \layout { \context { \Score \override InstrumentName.after-line-breaking = #use-measure-numbers %\omit BarNumber } } } music = { \partial 2 c4 d \repeat unfold 20 { c4 d e f } \break \partial 2 c4 d \break c d e f } \score { \new PianoStaff \with { shortInstrumentName = "foo" } << \new Staff { \relative c'' { \music } } \new Staff { \clef bass \music } >> \layout { \context { \Score \override InstrumentName.after-line-breaking = #use-measure-numbers %\omit BarNumber } } }