lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Supressing header on first page


From: James Worlton
Subject: Re: Supressing header on first page
Date: Wed, 3 Mar 2010 15:51:06 -0600

Sorry for the noise, but there was a typo in my code example below. Fixed now for
whoever may find this helpful.

James

On Wed, Mar 3, 2010 at 3:05 PM, James Worlton <address@hidden> wrote:
On Wed, Mar 3, 2010 at 2:39 PM, Nick Payne <address@hidden> wrote:
On 04/03/10 05:33, James Worlton wrote:

On Sat, Feb 20, 2010 at 12:11 AM, Brett McCoy <address@hidden> wrote:
I am using oddHeaderMarkup and evenHeaderMarkup to put running headers
(title, composer) on each page of a score, but want to suppress it on
the first page of the score (where the main header is). I can't seem
to find anything in the snippets or notation reference on how to
suppress this on the first page. Preventing the page number on the
first page I have handled using \on-the-fly
#print-page-number-check-first, is there something similar for
headers?

-- Brett
------------------------------------------------------------

I am very interested in this question as well, and haven't seen a solution posted
yet (or in any of the documentation/snippets). So I am shamelessly reactivating
the thread.
This is what I use for the \paper section in a score that has title page only (no notes) on the first page, starts page numbers with "1" at the foot of the page on the first page of music, and prints a tagline with no page number at the foot of the last page:

[snip a lot of code]
 
    oddFooterMarkup = \markup \fill-line { \column {
        \bold \fontsize #2
        \on-the-fly #not-last-page \on-the-fly #not-first-page \fromproperty #'page:page-number-string
        \on-the-fly #last-page \fromproperty #'header:tagline
    } }
    evenFooterMarkup = \markup \fill-line { \column {
        \bold \fontsize #2
        \on-the-fly #not-last-page \on-the-fly #not-first-page \fromproperty #'page:page-number-string
        \on-the-fly #last-page \fromproperty #'header:tagline
    } }
}

I'd forgotten about (did I ever know about??) the "\on-the-fly #not-first-page" code. I
applied it to my situation and it did what I wanted: remove the header from the first
page (my score has no title page).

This produces the desired result:

\version "2.13.14"
#(set-default-paper-size "letter")
\header {
  title = "Title"
}
\paper{
  oddHeaderMarkup = \markup \fill-line {
    " "
    \on-the-fly #not-first-page \fromproperty #'header:title
    \on-the-fly #not-first-page \on-the-fly #print-page-number-check-first \fromproperty #'page:page-number-string
  }
  evenHeaderMarkup = \markup \fill-line {
    \on-the-fly #print-page-number-check-first \fromproperty #'page:page-number-string
    \on-the-fly #not-first-page \fromproperty #'header:title
    " "
  }
}
\score {
  \new Staff {
    c1 \pageBreak
    c1 \pageBreak
    c1
  }
}

whereas with "\on-the-fly #not-first-page" removed the header appears above the title on the first page.

Is this in the documentation anywhere? I couldn't find it. Should this be the default
behavior of headers?

Thanks for the tip!
James Worlton


reply via email to

[Prev in Thread] Current Thread [Next in Thread]