2014-11-16 0:13 GMT+01:00 Thomas Morley
<address@hidden>:
2014-11-15 23:36 GMT+01:00 Peter Crighton <address@hidden>:
> Hello,
>
> I need to offset a repeat bar line at the beginning of a system without
> moving the bar line at the end of the system above before the line break. Is
> that possible? Something like \alterBreak, but for non-spanners would help …
>
> \version "2.19.13"
> \relative c' {
> c1 \break
> \once \override Score.BarLine.extra-offset = #'(-1 . 0)
> \repeat volta 2 {
> c \break
> }
> }
>
> This code has the desired output in the second system (well, it looks ugly
> in this case, but it’s correct in the non-minimal code I’m working on), but
> also moves the bar line in the first system, which is not desired.
>
> Does anybody know a solution?
>
> Thanks,
> Peter
Hi Peter,
try:
\relative c' {
c1 \break
\override Score.BarLine.after-line-breaking =
#(lambda (grob)
(if (= (ly:item-break-dir grob) RIGHT)
(ly:grob-set-property! grob 'extra-offset '(-1 . 0))))
\repeat volta 2 {
c \break
}
}
Thanks, that’s exactly what I was looking for!
Though, maybe better to override Clef.space-alist instead:
\override Score.Clef.space-alist.staff-bar = #'(extra-space . 0.0)
That might be better, but in my case I don’t have any clefs (I’m working on chord sheets – didn’t incorporate that into my example), so the first approach is perfect. Thank you!