While incorporating this code in another score I came across a layouting
problem: if the tempo name is sufficiently long, then the first measure
number will be rendered _above_ the tempo indicator.

This problem only occurs when \omitParenthesizedBarNumbers is invoked in the
layout block.

Probably it's a problem of prioritizing markup scripts, but I have no clue
yet on how to fix this.

Here's a snippet illustrating this issue:

%%% BEGIN snippet
\version "2.16.0"

omitParenthesizedBarNumbers =
\override Score.BarNumber #'after-line-breaking =
#(lambda (grob)
   (let* ((text (ly:grob-property grob 'text))
          (text-arg (caadr text))
          (nmbr? (string->number text-arg)))
     (if (not nmbr?)
         (ly:grob-suicide! grob)
         #f)))

\score {
  \new Staff {
    \relative c' {
      \key g \major
      \time 3/4
      \tempo "Allegretto"
      \clef "bass"

      \compressFullBarRests
      \override MultiMeasureRest #'expand-limit = #3
      \override Score.BarNumber #'break-visibility = #end-of-line-invisible
      \set Score.barNumberVisibility = #(every-nth-bar-number-visible 1)
      \set Score.alternativeNumberingStyle = #'numbers-with-letters

      \partial 4
      g8.-\upbow-\pp-1 (a16_\markup{\italic con grazia})
      b8.->-3 ( ais16 )     b8.-> ( ais16 )     b8.-> ( ais16 )
      \break
    }
  }

  \layout {
    \context {
      \Score
      \omitParenthesizedBarNumbers
    }
  }
}
%%% END snippet



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/unwanted-barnumber-tp134059p136183.html
Sent from the User mailing list archive at Nabble.com.

_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to