[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Overriding repeat bar line after line break without altering it befo
From: |
Thomas Morley |
Subject: |
Re: Overriding repeat bar line after line break without altering it before line break? |
Date: |
Sun, 16 Nov 2014 00:13:05 +0100 |
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
}
}
Though, maybe better to override Clef.space-alist instead:
\override Score.Clef.space-alist.staff-bar = #'(extra-space . 0.0)
Cheers,
Harm