> On 18 Apr 2022, at 06:56, Mark Probert <[email protected]> wrote: > > > Hi. > > I am confused as to why the following doesn't work as expected. I am > thinking the closing repeat, within the alternative 1, should have > "ears" yet it doesn't. Have I not understood the \defineBarLine > correctly? Or is there something else here? > > (I do note if I put a \break at the end of alternative 1 then the > bar-with-ears appears, but I don't want that all the time.) > > Any help appreciated. > > .. mark. > > --- > > \version "2.22" > > \defineBarLine ".|:" #'("" "[|:" "") > \defineBarLine ":|." #'(":|]" "" "") > > melody = \relative c'' { > \clef treble > \bar ".|:" > \repeat volta 2 { > a4 b c d~ | > } > \alternative { > { d2 r2 | } > { d2.\repeatTie r4 \bar "|." } > } > } > > \score { > \new Staff \melody > } >
Assuming that you want all reapeats with ears see https://lilypond.org/doc/v2.22/Documentation/snippets/repeats The proper way would be overriding the default barlines for repeats in the Score context (and you typically would want to include the double repeat just in case you have to volta repeats back-to-back): \layout { \context { \Score %% Changing the defaults from engraver-init.ly startRepeatType = #"[|:" endRepeatType = #":|]" doubleRepeatType = #":|][|:" } }
