[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Defining 'not-last-page'
From: |
Matthew Collett |
Subject: |
Defining 'not-last-page' |
Date: |
Fri, 15 Jul 2011 12:20:27 +1200 |
titling-init.ly contains the following definitions:
#(define (first-page layout props arg)
(if (book-first-page? layout props)
(interpret-markup layout props arg)
empty-stencil))
#(define (last-page layout props arg)
(if (book-last-page? layout props)
(interpret-markup layout props arg)
empty-stencil))
#(define (not-first-page layout props arg)
(if (not (book-first-page? layout props))
(interpret-markup layout props arg)
empty-stencil))
Given these, it would seem to be trivial to complete the set by defining
#(define (not-last-page layout props arg)
(if (not (book-last-page? layout props))
(interpret-markup layout props arg)
empty-stencil))
However, any attempt to _use_ this results in 'ERROR: Unbound variable:
book-last-page?'. This is extremely Schemely puzzling, since in exactly the
same context 'last-page' works fine, even though it references the same
putatively AWOL variable. For example,
\paper {
oddHeaderMarkup = \markup { \fill-line {
\null
\fromproperty #'page:page-number-string
{
\on-the-fly #not-last-page { "More ..." }
\on-the-fly #last-page { "No more." }
}
}}
evenHeaderMarkup = \oddHeaderMarkup
}
\markup{}
\pageBreak
\markup{}
works as expected with the 'not-last-page' line commented out. What is really
going on here, and how can I get 'not-last-page' to work?
Best wishes,
Matthew
- Defining 'not-last-page',
Matthew Collett <=