%% Generated by lilypond-book
%% Options: [exampleindent=10.16\mm,indent=0\mm,line-width=160\mm,paper-height=845.047\pt,paper-width=597.508\pt,papersize='(cons (* 597.508 pt) (* 845.047 pt))]
\include "lilypond-book-preamble.ly"


% ****************************************************************
% Start cut-&-pastable-section
% ****************************************************************

#(ly:set-option 'eps-box-padding 3.000000)



\paper {
  #(set-paper-size '(cons (* 597.508 pt) (* 845.047 pt)))
  indent = 0\mm
  line-width = 160\mm
  % offset the left padding, also add 1mm as lilypond creates cropped
  % images with a little space on the right
  line-width = #(- line-width (* mm  3.000000) (* mm 1))
}

\layout {
  
}




% ****************************************************************
% ly snippet:
% ****************************************************************
\sourcefilename "/lilypond-2.26.0/input/regression/markup-first-visible.ly"
\sourcefileline 0
\version "2.21.0"

\header {
  texidoc = "The markup command @code{\\first-visible} uses the first argument that produces a non-empty stencil and ignores the rest.

The expected markup on this score is \"Lame Songs for Testing\" followed by a \"C\" time signature symbol."

  publication = "Lame Songs for Testing"
}

#(ly:expect-warning "Cannot find glyph nonesuch-1")
#(ly:expect-warning "Cannot find glyph nonesuch-2")

\paper {
  scoreTitleMarkup = \markup {
    \first-visible {
      \musicglyph "nonesuch-1"
      \fromproperty #'header:composer
      \italic \fromproperty #'header:publication
    }
    \first-visible {
      \musicglyph "timesig.C44"
      \musicglyph "this should not be attempted"
    }
  }
}

\score { f' }

\markup {
  No elements: \first-visible {}
}

\markup {
  One element (expect 111): \first-visible { 111 }
}

\markup {
  Single markup list (expect aaa):
  \first-visible \column-lines {
  \musicglyph "nonesuch-2"
  ""
  aaa
  bbb
  }
}

\markup {
  Multiple markup lists (expect ccc):
  \first-visible {
    \column-lines { }
    \column-lines { ccc ddd }
    \column-lines { eee }
  }
}

\markup {
  Mixed markup and markup lists (expect fff):
  \first-visible {
    ""
    \column-lines { }
    \normal-text fff
    \column-lines { ggg hhh }
    iii
  }
}

\markup {
  Nested markup lists (expect jjj):
  \first-visible {
    \column-lines {
      \column-lines {
        \column-lines {
	  ""
        }
      }
    }
    \column-lines {
      \column-lines {
        \column-lines {
          jjj
        }
      }
    }
    kkk
  }
}



% ****************************************************************
% end ly snippet
% ****************************************************************
