1\version "2.21.0"
2
3\header {
4  texidoc = "The markup command @code{\\first-visible} uses the first argument that produces a non-empty stencil and ignores the rest.
5
6The expected markup on this score is \"Lame Songs for Testing\" followed by a \"C\" time signature symbol."
7
8  publication = "Lame Songs for Testing"
9}
10
11#(ly:expect-warning "Cannot find glyph nonesuch-1")
12#(ly:expect-warning "Cannot find glyph nonesuch-2")
13
14\paper {
15  scoreTitleMarkup = \markup {
16    \first-visible {
17      \musicglyph "nonesuch-1"
18      \fromproperty #'header:composer
19      \italic \fromproperty #'header:publication
20    }
21    \first-visible {
22      \musicglyph "timesig.C44"
23      \musicglyph "this should not be attempted"
24    }
25  }
26}
27
28\score { f' }
29
30\markup {
31  No elements: \first-visible {}
32}
33
34\markup {
35  One element (expect 111): \first-visible { 111 }
36}
37
38\markup {
39  Single markup list (expect aaa):
40  \first-visible \column-lines {
41  \musicglyph "nonesuch-2"
42  ""
43  aaa
44  bbb
45  }
46}
47
48\markup {
49  Multiple markup lists (expect ccc):
50  \first-visible {
51    \column-lines { }
52    \column-lines { ccc ddd }
53    \column-lines { eee }
54  }
55}
56
57\markup {
58  Mixed markup and markup lists (expect fff):
59  \first-visible {
60    ""
61    \column-lines { }
62    \normal-text fff
63    \column-lines { ggg hhh }
64    iii
65  }
66}
67
68\markup {
69  Nested markup lists (expect jjj):
70  \first-visible {
71    \column-lines {
72      \column-lines {
73        \column-lines {
74	  ""
75        }
76      }
77    }
78    \column-lines {
79      \column-lines {
80        \column-lines {
81          jjj
82        }
83      }
84    }
85    kkk
86  }
87}
88