Hello!

> The problem is for `tune` or `poet` header field which also have labels 
> attached to them.  In those cases, I get the labels "Tune: " and "Lyrics: " 
> still appearing in the score.  Ideally I'd like those labels to disappear 
> when their associated field is empty.  Is there a way to make that happen?

%%% BEGIN snippet %%%
\version "2.19.53"

#(define-markup-command (when-property layout props symbol markp) (symbol? 
markup?)
  (if (chain-assoc-get symbol props)
      (interpret-markup layout props markp)
      empty-stencil))

\paper  {
   bookTitleMarkup = \markup { \fontsize #-3 \column {
       \fill-line { \fontsize #6 \fromproperty #'header:title }
       \when-property #'header:tune \fill-line {
           \fromproperty #'header:meter
           \concat { "Tune: " \fromproperty #'header:tune }
       }
       \when-property #'header:lyrics \fill-line {
           \concat { "Lyrics: " \fromproperty #'header:poet }
           \fromproperty #'header:composer
       }
       \fill-line {
           \override #'(line-width . 30) \wordwrap-field #'header:poet_copyright
           \override #'(line-width . 30) \wordwrap-field #'header:tune_copyright
       }
   }}
}

\new Staff {
   c'
}

%%% END snippet %%%

Hope that helps!
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: [email protected]


_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to