On Sat, 2026-06-27 at 13:07 +0200, Thomas Morley wrote: > Am Sa., 27. Juni 2026 um 12:50 Uhr schrieb Richard Shann > <[email protected]>: > > > > When typesetting music where line breaks are allowed at half bars > > the > > every-nth-bar-number-visible set to 1 and the break-visibility set > > to > > #begin-of-line-visible gives the bar numbers at the start of each > > line > > with the bar number in parenthesis if the line starts half way > > through > > the bar. This is good, but has the unfortunate consequence that it > > prints the bar number 1 at the start of the music. > > Can someone suggest how to avoid that? I can see that it would be > > possible to augment translations-functions.scm file in the Lily > > sources > > to include something like > > > > (define-public ((every-nth-bar-number-visible-except-first n) > > barnum > > mp) > > (and (> n 0) (= 0 (modulo barnum n)))) > > > > but I can't figure out how to do this from a LilyPond score. > > > > Here's a MWE that shows the problem > > > > \version "2.24" > > > > \layout {\context {\Score > > barNumberVisibility = #(every-nth-bar-number-visible 1) > > \override Score.BarNumber.break-visibility = #begin-of-line- > > visible }} > > { > > \repeat unfold 200 {c''d'' \bar "" e'' f'' } > > } > > > > Richard Shann > > > > > > > > Below works here: > > > #(define-public ((every-nth-bar-number-visible-except-first n) barnum > mp) > (and (> barnum 1) (= 0 (modulo barnum n)))) > > \layout { > \context { > \Score > barNumberVisibility = #(every-nth-bar-number-visible-except-first > 1) > } > } > { \repeat unfold 200 { c''d'' \bar "" e'' f'' } }
Thank you so much, that works perfectly, I must have blundered trying stuff out, perhaps it's the heat. Richard > > Cheers, > Harm
