]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 3751: Doc: Augment documentation for \inStaffSegno
authorTrevor Daniels <t.daniels@treda.co.uk>
Mon, 30 Dec 2013 23:52:02 +0000 (23:52 +0000)
committerCarl Sorensen <carl.d.sorensen@gmail.com>
Sun, 12 Jan 2014 02:00:53 +0000 (19:00 -0700)
  Slightly expand referring text in NR 1.2.5

  Expand NR 1.4.1 with additional text and examples

  Add regression test

Documentation/notation/repeats.itely
Documentation/notation/rhythms.itely
input/regression/repeat-volta-segno.ly [new file with mode: 0644]

index ad555652fb5add6687d7b0a4236236c864eb2db9..f3c4c5ac6c14d530bf6be0273c183be445388743 100644 (file)
@@ -239,24 +239,6 @@ g1 |
 The @code{measureLength} property is described in @ref{Time
 administration}.
 
-@funindex \inStaffSegno
-
-The @code{\inStaffSegno} command can be used to place the segno
-symbol in cooperation with the @code{\repeat volta} command.
-Alternative bar line symbols can be set in a Score context by
-overriding the properties @code{segnoType},
-@code{startRepeatSegnoType}, @code{endRepeatSegnoType} or
-@code{doubleRepeatSegnoType} as required.
-
-@lilypond[verbatim,quote,relative=1]
-e1
-\repeat volta 2 {
-  \inStaffSegno
-  f2 g a b
-}
-c1_"D.S." \bar "|."
-@end lilypond
-
 @cindex repeats, with ties
 @cindex alternative endings, with ties
 @cindex ties, in repeats
@@ -274,6 +256,83 @@ c1
 }
 @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=1]
+e1
+\inStaffSegno
+f2 g a b
+c1_"D.S." \bar "|."
+@end lilypond
+
+At the start of a repeat:
+
+@lilypond[verbatim,quote,relative=1]
+e1
+\repeat volta 2 {
+  \inStaffSegno  % start repeat
+  f2 g a b
+}
+c1_"D.S." \bar "|."
+@end lilypond
+
+At the end of a repeat:
+
+@lilypond[verbatim,quote,relative=1]
+e1
+\repeat volta 2 {
+  f2 g a b
+  \inStaffSegno  % end repeat
+}
+f2 g a b
+c1_"D.S." \bar "|."
+@end lilypond
+
+Between two repeats:
+
+@lilypond[verbatim,quote,relative=1]
+e1
+\repeat volta 2 {
+  f2 g a b
+}
+\inStaffSegno  % double repeat
+\repeat volta 2 {
+  f2 g a b
+}
+c1_"D.S." \bar "|."
+@end lilypond
+
+Alternative bar line symbols can be obtained by setting (in the Score
+context) the properties @code{segnoType}, @code{startRepeatSegnoType},
+@code{endRepeatSegnoType} or @code{doubleRepeatSegnoType} to the
+required bar line type.  The alternative bar line types must be
+selected from the pre-defined types or types previously defined
+with the @code{\defineBarLine} command (see @ref{Bar lines}).
+
+@lilypond[verbatim,quote,relative=1]
+\defineBarLine ":|.S[" #'(":|." "S[" "")
+\defineBarLine "]" #'("]" "" "")
+e1
+\repeat volta 2 {
+  f2 g a b
+  \once \set Score.endRepeatSegnoType = ":|.S["
+  \inStaffSegno
+}
+f2 g \bar "]" a b
+c1_"D.S." \bar "|."
+@end lilypond
+
 @snippets
 @lilypondfile[verbatim,quote,texidoc,doctitle]
 {shortening-volta-brackets.ly}
index f935956922b947c7623b89a2d5a2001104146400..048d3a58d7eb08e2c09fe9fa299c98b728034cc6 100644 (file)
@@ -2812,9 +2812,10 @@ c4 c c c \break
 c1
 @end lilypond
 
-Additionally there is an @code{\inStaffSegno} command which
-creates a segno bar, placed in cooperation
-with the @code{\repeat volta} command.
+Additionally there is an @code{\inStaffSegno} command which creates
+a segno bar line in conjunction with an appropriate repeat bar line
+when used with a @code{\repeat volta} command, see
+@ref{Normal repeats}.
 
 @funindex \defineBarLine
 @funindex defineBarLine
diff --git a/input/regression/repeat-volta-segno.ly b/input/regression/repeat-volta-segno.ly
new file mode 100644 (file)
index 0000000..a03a95f
--- /dev/null
@@ -0,0 +1,33 @@
+\version "2.18.0"
+
+\header {
+  texidoc="
+  The segno sign should be automatically combined with the
+  appropriate repeat bar line when @code{\inStaffSegno} is
+  used.
+"
+}
+
+\relative c' {
+  c1
+  \inStaffSegno
+  c2^"no repeat" c c c
+  \repeat volta 2 {
+    \inStaffSegno  % start repeat
+  c2^"start repeat" c c c
+  }
+  \break
+  c1
+  \repeat volta 2 {
+  c2 c c c^"end repeat"
+    \inStaffSegno  % end repeat
+  }
+  c2 c c c
+  \repeat volta 2 {
+  c2 c c c
+  }
+  \inStaffSegno  % double repeat
+  \repeat volta 2 {
+  c2^"double repeat" c c c
+  }
+}