Thanks Micheal! The '\unless \on-first-page' was what I went with on the first try. It was the magic sauce.
-David ----- Original Message ----- > From: "Michael Werner" <reznae...@gmail.com> > To: "bobroff" <bobr...@centrum.is> > Cc: "Lillypond Users Mailing List" <lilypond-user@gnu.org> > Sent: Sunday, November 12, 2023 1:09:05 PM > Subject: Re: pageNumber > Hi David, > > On Sun, Nov 12, 2023 at 7:18 AM bobr...@centrum.is <bobr...@centrum.is> > wrote: > >> 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: > http://lilypond.org/doc/v2.25/Documentation/notation/custom-layout-for-headers-and-footers > and > http://lilypond.org/doc/v2.25/Documentation/notation/conditional-markup > -- > Michael