[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Suppressing Page numbers
From: |
Jonathan Wilkes |
Subject: |
Suppressing Page numbers |
Date: |
Sun, 13 Sep 2009 18:40:31 -0700 (PDT) |
Hello,
I'm trying to finish up a score and am doing something
fairly standard:
page 1: title (no page#)
page 2: blank (no page#)
page 3: "Notes" (no page#)
page 4: music (numbered as page #1)
I've seen a scheme function to suppress the first two pages, and a
command to renumber pages, but I can't figure out how to use the two
in tandem.
What would be great is just a single command to keep from printing
negative page numbers.
Here's my snippet:
\version "2.12.2"
\include "titling-init.ly"
#(define (skip-two-page-numbers layout props arg)
(if (or (> (chain-assoc-get 'page:page-number props -1)
(+ (ly:output-def-lookup layout 'first-page-number) 1))
(eq? (ly:output-def-lookup layout 'print-first-page-number) #t))
(create-page-number-stencil layout props arg)
empty-stencil))
\markup Title
\pageBreak
\markup " "
\pageBreak
\markup { \fill-line { "Notes" } }
\pageBreak
\score {
c d e f
}
\paper {
first-page-number = #-2
oddHeaderMarkup = \markup
\fill-line {
" "
\on-the-fly #not-first-page \fromproperty #'header:instrument
\on-the-fly #skip-two-page-numbers \fromproperty #'page:page-number-string
}
evenHeaderMarkup = \markup
\fill-line {
\on-the-fly #skip-two-page-numbers \fromproperty #'page:page-number-string
\on-the-fly #not-first-page \fromproperty #'header:instrument
" "
}
}
- Suppressing Page numbers,
Jonathan Wilkes <=