]> git.donarmstrong.com Git - lilypond.git/blob - input/regression/tag-group.ly
Issue 5167/6: Changes: show \markup xxx = ... \etc assignments
[lilypond.git] / input / regression / tag-group.ly
1 \version "2.19.22"
2
3 \header {
4   texidoc = "The operation of @code{\\keepWithTag} can be made more
5 flexible by using @code{\\tagGroup}."
6 }
7
8 \layout { ragged-right= ##t }
9
10 music =
11 <<
12   \tag vI.vII
13   \new Staff \with { instrumentName = "vI vII" }
14   <<
15     \tag vI \new Voice \with { \voiceOne }
16     { g''-\tag slurs ( a'' g'' a''-\tag slurs ) }
17     \tag vII \new Voice \with { \voiceTwo }
18     { c''-\tag slurs ( d'' c'' d''-\tag slurs ) }
19   >>
20   \tag bI.bII
21   \new Staff \with { instrumentName = "bI bII" \clef "bass" }
22   <<
23     \tag bI \new Voice \with { \voiceOne }
24     { g-\tag slurs ( a g a-\tag slurs ) }
25     \tag bII \new Voice \with { \voiceTwo }
26     { c-\tag slurs ( d c d-\tag slurs ) }
27   >>
28 >>
29
30 demo =
31 #(define-music-function (syms m)
32   (symbol-list? ly:music?)
33   #{
34     \new Score <<
35       \keepWithTag #syms #m
36       \context Staff \mark #(string-join (map symbol->string syms) "&")
37     >>
38   #})
39
40 #(set-global-staff-size 16)
41
42 demoline =
43 #(define-scheme-function (m1 m2) (ly:music? ly:music?)
44   #{
45     \markup \column { \fill-line { \null \score { #m1 } \score { #m2 } \null }
46                       \vspace #1 }
47   #})
48
49
50 \markuplist {
51   \fill-line { \center-column \fontsize #5 \bold { "\\keepWithTag" } }
52   \vspace #1
53 }
54
55 \demoline
56 \demo #'(vI vII bI bII slurs) \music
57 \demo #'(slurs vI) \music
58 \demoline
59 \demo #'(vI bI bII) \music
60 \demo #'(vI bI bII none) \music
61
62 \markup \vspace #2
63
64 \markuplist {
65   \fill-line { \center-align \fontsize #5 \bold \left-column
66                { "\\tagGroup vI.vII" "\\tagGroup bI.bII" } }
67   \vspace #1
68 }
69
70 \tagGroup vI.vII
71 \tagGroup bI.bII
72
73 \demoline
74 \demo #'(vI vII bI bII slurs) \music
75 \demo #'(slurs vI) \music
76 \demoline
77 \demo #'(vI bI bII) \music
78 \demo #'(vI bI bII none) \music