# Lilypond: Indicate alternate endings

Using Lilypond, I would like to indicate alternate endings to the piece I am engraving; an "Optional 'Screen Gems' Ending" which is 2 measures long or another "Low Fat" ending (not my terms; they are in the original score) which is 1 meaasure. I would like notation similar to 1st and 2nd endings but without the repeat, of course. How do I do this? Thanks!

See here for the LilyPond documentation on long repeats.

\version "2.19.82"

voltaFirst = \markup \text "Gems"
voltaSecond = \markup \text "Fat"

\relative c' {
\repeat volta 2 {
e4 e e e
}
\alternative {{
\set Score.repeatCommands = #(list(list 'volta voltaFirst))
g2 g g g \bar "||"
}{
\set Score.repeatCommands = #(list(list 'volta voltaSecond))
d1
}}
\bar "|."
}


You can add usual markup arguments after \text to change how it's displayed.

• This seems kind of ridiculously complicated to me. :-/ – Jason Silver Aug 30 '19 at 16:50
• It's not much more complicated than what's written in their documentation. – Neal Aug 31 '19 at 18:49
• Not criticising you, just commenting on the code. Sorry for the miscommunication. – Jason Silver Sep 1 '19 at 19:23