LilyPond omit first page-number when numbering formatted by markup
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 Comments
Sorted by latest first Latest Oldest Best
By default, the page number is not printed on the first page, so adding print-first-page-number = ##f wont 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 }
}
Terms of Use Privacy policy Contact About Cancellation policy © freshhoot.com2025 All Rights reserved.