lilypond-user
[Top][All Lists]
Advanced

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

How to prevent page number appearing on back of title page?


From: Nick Payne
Subject: How to prevent page number appearing on back of title page?
Date: Sat, 16 Apr 2011 16:46:26 +1000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8

It's happening because I'm using Header and Footer markups (cribbed from the Notation Reference examples) in order to have page numbers centred at the foot of the page. If I add a blank page on the back of the ToC, so that the first piece starts on a right-hand page, I'm getting a page number of 0 appearing on that supposedly blank page. How can I prevent that?

Below is a minimal example which shows the problem. The define of not-last-page in the main paper block is so that I can have a custom tagline on the final page.

\version "2.13.59"

date = #(strftime "%d/%m/%Y" (localtime (current-time)))

\paper {
    #(define (not-last-page layout props arg)
        (if (and (chain-assoc-get 'page:is-bookpart-last-page props #f)
            (chain-assoc-get 'page:is-last-bookpart props #f))
            empty-stencil
            (interpret-markup layout props arg)))

    first-page-number = -1
    print-page-number = ##f
    oddHeaderMarkup = \markup \fill-line { " " }
    evenHeaderMarkup = \markup \fill-line { " " }
    oddFooterMarkup = \markup \fill-line { \column {
\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 {
\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
    } }
    ragged-right = ##t
    ragged-bottom = ##t
    ragged-last-bottom = ##t
}

\header {
    title = "Overall Title"
    subtitle = \markup {
        \left-align \center-column {
            "Overall Subtitle"
            \lower #2 " " % to space ToC away from title/subtitle
        }
    }
    tagline = \markup {
        \fontsize #-3.5
        {
            Engraved on \date using \with-url #"http://lilypond.org/";
            { LilyPond \simple #(lilypond-version) (http://lilypond.org/) }
        }
    }
}

\markuplines \table-of-contents
\pageBreak
\markup \null

\bookpart {
    \paper {
        print-page-number = ##t
    }
    \header {
        subtitle = "Piece One"
        composer = "Person One"
    }
    \tocItem \markup { 1. Piece One }
    \relative c' { c1 }
}

\bookpart {
    \paper {
        print-page-number = ##t
    }
    \header {
        subtitle = "Piece Two"
        composer = "Person Two"
    }
    \tocItem \markup { 1. Piece Two }
    \relative c' { c1 }
}

\bookpart {
    \paper {
        print-page-number = ##t
    }
    \header {
        subtitle = "Piece Three"
        composer = "Person Three"
    }
    \tocItem \markup { 3. Piece Three }
    \relative c' { c1 }
}




reply via email to

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