lilypond-user
[Top][All Lists]
Advanced

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

Re: Suppress the header on first bookpart page


From: Thomas Morley
Subject: Re: Suppress the header on first bookpart page
Date: Sun, 14 Apr 2013 13:06:23 +0200

2013/4/14 Eluze <address@hidden>:
> Helge Kruse-4 wrote
>> For each instrument I have a header. How I can I suppress the head line
>> for the pages with header. That's the first page of a bookpart?
>
> see /part-first-page/ in
> http://lilypond.org/doc/v2.16/Documentation/notation-big-page#custom-titles-headers-and-footers

IIUC, Helge wants no page-header (apart from the page-number?) on a
bookparts first page.
The link above is not sufficient, because `not-part-first-pageĀ“
doesn't work out of the box with "2.16.2" (it does with "2.17.15")

The needed definitions have to be written in the file:

\version "2.16.0"

 #(define (part-first-page? layout props)
   (= (chain-assoc-get 'page:page-number props -1)
      (ly:output-def-lookup layout 'first-page-number)))

 #(define (not-part-first-page layout props arg)
   (if (not (part-first-page? layout props))
       (interpret-markup layout props arg)
       empty-stencil))

\paper {
  oddHeaderMarkup = \markup \fill-line {
    \on-the-fly #not-first-page
      \on-the-fly #not-part-first-page
        \fromproperty #'header:composer
    \on-the-fly #not-first-page
      \on-the-fly #not-part-first-page
        \fromproperty #'header:title
    \on-the-fly #not-first-page
      \on-the-fly #not-part-first-page
       \fromproperty #'header:instrument
    \on-the-fly #print-page-number-check-first
      \fromproperty #'page:page-number-string
  }
  evenHeaderMarkup = \oddHeaderMarkup
}

\header {
  title = "Melancholia"
  composer = "The one who must not be named"
}

music = \relative c' { \repeat unfold 200 { c2 r4 r } }

\book {
  \bookpart {
    \header { instrument = "Violino 1" }
    \score { \music }
  }
  \bookpart {
    \header { instrument = "Violino 2" }
    \score { \music }
  }
}

HTH,
  Harm



reply via email to

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