lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Show (and increment) bar numbers only after a double bar


From: Thomas Morley
Subject: Re: Show (and increment) bar numbers only after a double bar
Date: Sat, 3 Nov 2012 18:58:03 +0100

2012/11/3 Olivier Biot <address@hidden>:
[...}
> Now I only need to devise a way to emulate the double bar at the start
> of each score line.

After an idea of Mats Bengtsson:

\version "2.17.5"

doubledSystemStartBar =
\override Score.SystemStartBar #'stencil =
  #(lambda (grob)
    (ly:grob-set-property! grob 'collapse-height 1)
    (let* ((stil (ly:system-start-delimiter::print grob))
           (staff-space (ly:staff-symbol-staff-space grob))
           (staff-line-thickness (ly:staff-symbol-line-thickness grob))
           (pddng (* 0.3 staff-space))
           (new-stil (ly:stencil-combine-at-edge
                        stil
                        X
                        RIGHT
                        stil
                        pddng)))

          (ly:grob-set-property! grob 'padding (* -1 (+ pddng (* 2
staff-line-thickness))))
          new-stil))

Use it in the voice or

  \layout {
     \context {
             \Score
             \doubledSystemStartBar
     }
  }


Cheers,
  Harm



reply via email to

[Prev in Thread] Current Thread [Next in Thread]