+ g4 |
+ a2 a |
+ g1 |
+}
+@end lilypond
+
+@cindex repeats, with ties
+@cindex alternative endings, with ties
+@cindex ties, in repeats
+@cindex ties, alternative endings
+@funindex \repeatTie
+
+Ties may be added to a second ending:
+
+@lilypond[verbatim,quote]
+\relative {
+ c''1
+ \repeat volta 2 { c4 d e f~ }
+ \alternative {
+ { f2 d }
+ { f2\repeatTie f, }
+ }
+}
+@end lilypond
+
+@funindex \inStaffSegno
+@cindex repeats, with segno
+@cindex segno, with repeats
+
+The @code{\inStaffSegno} command can be used to generate a composite
+bar line incorporating the segno symbol with the appropriate repeat
+bar line when used with the @code{\repeat volta} command. The
+correct type of repeat bar line, viz. start repeat, end repeat or
+double repeat, is selected automatically. Note that the
+corresponding @qq{D.S.} mark must be added manually.
+
+Away from a repeat:
+
+@lilypond[verbatim,quote]
+\relative {
+ e'1
+ \inStaffSegno
+ f2 g a b
+ c1_"D.S." \bar "|."