> On 18 Nov 2023, at 13:56, Hans Aikema <hans.aik...@aikebah.net> wrote:
> 
> 
> 
>> On 18 Nov 2023, at 13:30, Peter Mayes <pe...@petermayes.org> wrote:
>> 
>> The score I am trying to emulate has an initial repeated section, a 
>> non-repeated section, and another repeated section. The non-repeated section 
>> ends with a double bar line, but when I add this (as in bar 7 below), it 
>> suppresses the opening repeat in the following section (in bar 8). I want 
>> both the double bar, AND the opening repeat. How to achieve this?
>> 
>> Thanks in advance!
> Peter,
> 
> You can get what you desire with a dedicated custom-defined barline
> 
> I modified your example to get the desired carline behaviour in-between 
> measure 2 and 3

I should’ve checked first after recreating the bars from your example (to 
ensure similarity and change only minimally, as I had been trying various 
variations)…. In reproducing the working code starting from your example I 
missed some syntax requirements and (just like when I first trialled swapped 
the bars around in the wrong sequence… the fixed code is (the changes are in 
the defineBarLine statement):

> 
> \version "2.25.4"
> 
> \paper { ragged-right = ##t }
> % See also 
> https://lilypond.org/doc/v2.24/Documentation/notation/bars#bar-lines
> \defineBarLine "||.|:" #'("||" ".|:" #f)
> 
> music = \relative c'' {
>   \key c \major
>   \time 4/4
>   \repeat volta 2 {
>     c1
>   } \break
>   c1  \bar "||.|:"
>   \break
>   \repeat volta 2 {
>     c1
>   } \break
>     \repeat volta 2 {
>     c1
>   } \break
>   c1 \bar "||"
>   \break
>   \repeat volta 2 {
>     c1
>   }
> }
> \score {
>   \new Staff {
>     \music
>   }
>   \layout {}
> }
>> -- 
>> 
>> Best wishes -- Peter
>> --
>> Peter Mayes
> 

Reply via email to