I have the following in my \paper block. I want to eliminate the page number on page 1. I have 'print-first-page-number = ##f' but the oddHeaderMarkup is overriding it. Is there a way around this? Some sort of conditional?
Turns out you just need to swap two lines. The \if conditional will apply to the next item ... and just the next item. It prints the next item if true, and leaves it blank if false. But the next item is the empty quotes, so something that's already empty. So just swap the \if conditional line down one to put it right before the page number line and all should be well.
oddHeaderMarkup = \markup {
\fill-line {
"" \larger\bold "SCORE"
\if \should-print-page-number
\fromproperty #'page:page-number-string
}
}
There's also an alternative you can use, that kind of does this from the opposite viewpoint. This will print the page number unless it's the first page. Either should work, just going at things in two different ways. In some circumstances (special cases? tricky layouts?) one might be preferable over the other. But there are options to explore.
oddHeaderMarkup = \markup {
\fill-line {
"" \larger\bold "SCORE"
\unless \on-first-page
\fromproperty #'page:page-number-string
}
}
For more details on these, have a look at:
and