Thank you very much, David!

Your suggestion fixed both the minimal example and my real use case! I'm
impressed with the reactivity and quality of Lilypond support!

Minimal example that produces the desired result

\version "2.24.0"

\relative {
  \clef treble
  \key c \major
  \time 4/4
  \repeat segno 2 {
    \repeat volta 2 { a'1 1 1 1 }
    {
      \alternative {
        \volta 1 {
          \repeat volta 2 { b1 1 1 1 }
        }
        \volta 2 { \section \sectionLabel "Coda" }
      }
    }
  }
  c1 1 1 1
}

[image: image.png]
Thank you very much David and Jean!
Vlad

On Sun, Feb 26, 2023 at 10:09 PM David Kastrup <d...@gnu.org> wrote:

> Volodymyr Prokopyuk <volodymyrprokop...@gmail.com> writes:
>
> > Hi Jean,
> >
> > I've produced the minimal example reflecting my real use case. This
> example
> > does not produce the desired result. The difference between the minimal
> > working example and my real use case is that both section A and section B
> > are \repeat volta 2 themselves. In this situation the minimal working
> > example from above stops working.
> >
> >
> > *Minimal example that does not produce the desired result*
> >
> > \version "2.24.0"
> >
> > \relative {
> >   \clef treble
> >   \key c \major
> >   \time 4/4
> >   \repeat segno 2 {
> >     \repeat volta 2 { a'1 1 1 1 }
> >     \alternative {
> >       \volta 1 {
> >         \repeat volta 2 { b1 1 1 1 }
> >       }
> >       \volta 2 { \section \sectionLabel "Coda" }
> >     }
> >   }
> >   c1 1 1 1
> > }
>
> Well, the old syntax compatibility sets in, drawing \alternative to the
> inner \repeat volta.  You could put { } before \alternative to block
> that.
>
> --
> David Kastrup
>

Reply via email to