[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Defining 'not-last-page'
From: |
Matthew Collett |
Subject: |
Re: Defining 'not-last-page' |
Date: |
Sat, 16 Jul 2011 10:34:44 +1200 |
On 16/07/2011, at 10:15 am, Neil Puttock wrote:
> The contents of titling-init.ly is within the scope of a \paper block;
> this is a different module from the one where you put your .ly code.
> Since none of the defines are public, they aren't exported as part of
> the public interface for the module, so they're invisible outside the
> \paper block.
So the solution is simply to put the _definition_ of not-last-page inside the
\paper block! Indeed, this works as expected:
\paper {
#(define (not-last-page layout props arg)
(if (not (book-last-page? layout props))
(interpret-markup layout props arg)
empty-stencil))
oddHeaderMarkup = \markup { \fill-line {
\null
\fromproperty #'page:page-number-string
\concat {
\on-the-fly #not-last-page { "More ..." }
\on-the-fly #last-page { "No more." }
}
}}
evenHeaderMarkup = \oddHeaderMarkup
}
\markup{}
\pageBreak
\markup{}
Thanks,
Matthew