[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Non-numeric page number
From: |
Thomas Morley |
Subject: |
Re: Non-numeric page number |
Date: |
Wed, 25 Aug 2021 00:29:31 +0200 |
Am Di., 24. Aug. 2021 um 18:38 Uhr schrieb Paul Hodges <pwh@cassland.org>:
>
> I am making a score one of whose pages (the last) will fold out from the
> previous. The previous page is numbered 5, but I have been told to make
> the fold-out page not 6 but 5a. I can't see how to change the header
> format for just a single page - can anyone help?
>
> Thanks, as ever,
> Paul
>
Hi Paul,
below may be a possibility, it has some strong limitations, though:
It works only for the very last page, which must be an otherwise even
number. Meaning you can't add another page.
To have it mid-score/book would likely require a lot more afford.
#(define (last-page-leporello layout props arg)
(let ((new-arg
(if (and (chain-assoc-get 'page:is-last-bookpart props)
(chain-assoc-get 'page:is-bookpart-last-page props))
(format #f "~aa" (1- (chain-assoc-get 'page:page-number props)))
arg)))
(interpret-markup layout props new-arg)))
\paper {
oddHeaderMarkup = \markup
\fill-line {
""
\on-the-fly #not-part-first-page \fromproperty #'header:instrument
\on-the-fly #print-page-number-check-first
\fromproperty #'page:page-number-string
}
%% evenHeaderMarkup would inherit the value of
%% oddHeaderMarkup if it were not defined here
evenHeaderMarkup = \markup
\fill-line {
\on-the-fly #print-page-number-check-first
\on-the-fly #last-page-leporello \fromproperty #'page:page-number-string
\on-the-fly #not-part-first-page \fromproperty #'header:instrument
""
}
}
\markup "PAGE 1"
\pageBreak
\markup "PAGE 2"
\pageBreak
\markup "PAGE 3"
\pageBreak
\markup "PAGE 4"
\pageBreak
\markup "PAGE 5"
\pageBreak
\markup "PAGE 6 on 5a"
Cheers,
Harm