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
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user