I have a custom book titles whose definition looks like this:

    bookTitleMarkup = \markup { \fontsize #-3 \column {
        \fill-line { \fontsize #6 \fromproperty #'header:title }
        \fill-line {
            \fromproperty #'header:meter
            \concat { "Tune: " \fromproperty #'header:tune }
        }
        \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
        }
    }}

This is defined in a master style file for a project which is then loaded by each score in the project. Ideally all those custom fields would be defined, but in some cases I've either not had the time or been able to fill them all out yet. For most of the fields this is not a problem as the empty field takes up no space in the score. 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"

\paper  {
    bookTitleMarkup = \markup { \fontsize #-3 \column {
        \fill-line { \fontsize #6 \fromproperty #'header:title }
        \fill-line {
            \fromproperty #'header:meter
            \concat { "Tune: " \fromproperty #'header:tune }
        }
        \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 %%%

--
✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝
Br. Samuel, OSB
St. Anselm’s Abbey
Washington, DC
(R. Padraic Springuel)

PAX ☧ ΧΡΙΣΤΟΣ

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to