2

I use this snippet to reformat the LilyPond page numbering:

pagenumcol = \markup {
  \column {
    \vspace #0.5
    \fromproperty #'page:page-number-string
  }
}

copyrightcol = \markup {
  \fill-line {
    \box \fontsize #-4
    \column {
      \line { "Educational copying welcome." }
    }
  }
}

\paper {
  oddHeaderMarkup = \markup \null
  evenHeaderMarkup = \markup \null
  oddFooterMarkup = \markup { \copyrightcol \pagenumcol }
  evenFooterMarkup = \markup { \pagenumcol \copyrightcol }
}

When using this example the first page number gets printed. Does anyone on here know how I can omit this?

I tried to add print-first-page-number = ##f, but it does not take any effect in this scenario.

1 Answer 1

3

By default, the page number is not printed on the first page, so adding print-first-page-number = ##f won’t change the default setting.

Rather, you first need to check whether LilyPond would by default print the page number on the relevant page. This can be done with \on-the-fly #print-page-number-check-first (see also the relevant section in the LilyPond documentation on customised footers and headers).

This way, you re-activate the default behaviour of not printing the page number on the first page, which you overrode by defining your custom footer.

The following settings should work:

pagenumcol = \markup {
  \column {
    \vspace #0.5
    \fromproperty #'page:page-number-string
  }
}

copyrightcol = \markup {
  \fill-line {
    \box \fontsize #-4
    \column {
      \line { "Educational copying welcome." }
    }
  }
}

\paper {
  oddHeaderMarkup = \markup \null
  evenHeaderMarkup = \markup \null
  oddFooterMarkup = \markup { \copyrightcol \on-the-fly #print-page-number-check-first \pagenumcol }
  evenFooterMarkup = \markup { \on-the-fly #print-page-number-check-first \pagenumcol \copyrightcol }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.