Hi everyone,

I like having a horizontal line separating the footers from the score. However, I don’t know how to hide that line when the footer is empty (see working example below).

I thought maybe I could adapt the \first-visible markup command, but I couldn’t get far with that (how to access the header fields in the markup command definition?).

Could someone give me a pointer please, or has someone got a solution for this kind of issue?

Best, Simon

% >8>8>8>8>8>8>8>8>8>8>8>8>8

\version "2.25.29"

\header {
  %copyright = "Copyright is mine!"
  tagline = ##f
  %tagline = "Special tagline"
}

\paper {
  oddFooterMarkup = \markup \center-column {
    %% how to make the following horizontal line conditional on whether the
    %% following header fields aren’t empty?
    \override #'(span-factor . 1/3) \draw-hline
    %% Copyright header field only on first page in each bookpart.
    \if \on-first-page-of-part \fill-line {
      \fromproperty #'header:copyright
    }
    %% Tagline only on last page in each book.
    \if \on-last-page \fill-line {
      \fromproperty #'header:tagline
    }
  }
}

\markup "[insert Public Domain content here]"


Reply via email to