From 45c9b27033acc2890f44e7eb08c29c737ca9111f Mon Sep 17 00:00:00 2001
From: James Lowe <pkx166h@gmail.com>
Date: Thu, 23 Jul 2015 08:42:35 +0100
Subject: [PATCH] Doc: NR - using \unfoldRepeat with \addQuote

Issue 3515

Added example of how to
print \unfoldRepeats from
a music expression, when
using \addQuote.
---
 Documentation/notation/staff.itely | 35 ++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/Documentation/notation/staff.itely b/Documentation/notation/staff.itely
index 17a60cbb24..db5d5ebab8 100644
--- a/Documentation/notation/staff.itely
+++ b/Documentation/notation/staff.itely
@@ -1102,6 +1102,41 @@ oboeNotes = \relative {
 }
 @end lilypond
 
+If an @code{\unfoldRepeat} command in a music expression is required to
+be printed when using @code{\quoteDuring}, then it too must also contain
+its own @code{\unfoldRepeat} command;
+
+@lilypond[verbatim,quote]
+fluteNotes = \relative {
+  \repeat volta 2 { a'4 gis g gis }
+}
+
+oboeNotesDW = \relative {
+  \repeat volta 2 \quoteDuring #"incorrect" { s1 }
+}
+
+oboeNotesW = \relative {
+  \repeat volta 2 \quoteDuring #"correct" { s1 }
+}
+
+
+\addQuote "incorrect" { \fluteNotes }
+
+\addQuote "correct" { \unfoldRepeats \fluteNotes }
+
+\score {
+  \unfoldRepeats
+  <<
+    \new Staff \with { instrumentName = "Flute" }
+    \fluteNotes
+    \new Staff \with { instrumentName = "Oboe (incorrect)" }
+    \oboeNotesDW
+    \new Staff \with { instrumentName = "Oboe (correct)" }
+    \oboeNotesW
+  >>
+}
+@end lilypond
+
 The @code{\quoteDuring} command uses the @code{\transposition} settings
 of both quoted and quoting parts to produce notes for the quoting part
 that have the same sounding pitch as those in the quoted part.
-- 
2.39.5