From 92f18301f94f967941e1545453b3770efabb8a7a Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Tue, 2 Sep 2014 15:14:41 +0200 Subject: [PATCH] Add regtest for \tagGroup command --- input/regression/tag-group.ly | 78 +++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 input/regression/tag-group.ly diff --git a/input/regression/tag-group.ly b/input/regression/tag-group.ly new file mode 100644 index 0000000000..76b0a3fb64 --- /dev/null +++ b/input/regression/tag-group.ly @@ -0,0 +1,78 @@ +\version "2.19.14" + +\header { + texidoc = "The operation of @code{\\keepWithTag} can be made more +flexible by using @code{\\tagGroup}." +} + +\layout { ragged-right= ##t } + +music = +<< + \tag vI.vII + \new Staff \with { instrumentName = "vI vII" } + << + \tag vI \new Voice \with { \voiceOne } + { g''-\tag slurs ( a'' g'' a''-\tag slurs ) } + \tag vII \new Voice \with { \voiceTwo } + { c''-\tag slurs ( d'' c'' d''-\tag slurs ) } + >> + \tag bI.bII + \new Staff \with { instrumentName = "bI bII" \clef "bass" } + << + \tag bI \new Voice \with { \voiceOne } + { g-\tag slurs ( a g a-\tag slurs ) } + \tag bII \new Voice \with { \voiceTwo } + { c-\tag slurs ( d c d-\tag slurs ) } + >> +>> + +demo = +#(define-music-function (parser location syms m) + (symbol-list? ly:music?) + #{ + \new Score << + \keepWithTag #syms #m + \context Staff \mark #(string-join (map symbol->string syms) "&") + >> + #}) + +#(set-global-staff-size 16) + +demoline = +#(define-scheme-function (parser location m1 m2) (ly:music? ly:music?) + #{ + \markup \column { \fill-line { \null \score { #m1 } \score { #m2 } \null } + \vspace #1 } + #}) + + +\markuplist { + \fill-line { \center-column \fontsize #5 \bold { "\\keepWithTag" } } + \vspace #1 +} + +\demoline +\demo #'(vI vII bI bII slurs) \music +\demo #'(slurs vI) \music +\demoline +\demo #'(vI bI bII) \music +\demo #'(vI bI bII none) \music + +\markup \vspace #2 + +\markuplist { + \fill-line { \center-align \fontsize #5 \bold \left-column + { "\\tagGroup vI.vII" "\\tagGroup bI.bII" } } + \vspace #1 +} + +\tagGroup vI.vII +\tagGroup bI.bII + +\demoline +\demo #'(vI vII bI bII slurs) \music +\demo #'(slurs vI) \music +\demoline +\demo #'(vI bI bII) \music +\demo #'(vI bI bII none) \music -- 2.39.2