Suppress the header on first bookpart page

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Suppress the header on first bookpart page

Helge Kruse-4
I want to write all instrument's part in one book. I use a bookpart for
each instrument. The headline should identify the piece, instrument and
page to reduce the time for sort pages when all sheets dropped to the
floor. ;-)

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?

Regards
Helge

Example:

\version "2.16.0"

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

\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 }
   }
}



_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Suppress the header on first bookpart page

Eluze
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

hth
Eluze
Reply | Threaded
Open this post in threaded view
|

Re: Suppress the header on first bookpart page

Thomas Morley
2013/4/14 Eluze <[hidden email]>:
> 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

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Suppress the header on first bookpart page

Helge Kruse-2
Am 14.04.2013 13:06, schrieb Thomas Morley:

> 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))
>

> HTH,
>    Harm

Yes, this helps very well. Also the hint with the odd/even header was
very helpful.

Thanks
Helge



_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user