Graham Percival <[EMAIL PROTECTED]> writes: > Nicolas Sceaux wrote: >> Graham Percival <[EMAIL PROTECTED]> writes: >> >>> I'd like to display something in the footer of the first (and last) >>> pages of each score in a book. >>> >> You may have to hack the function that builds the pages (the >> page-breaking function set in the \paper block). >> See scm/layout-page-layout.scm. But this is not trivial. >> A page is created, then filled with lines (text or music systems). >> When the page is created, the footer and header are also created (using >> the markups defined in ly/titling-init.ly), so that the spacing function >> should know how much space is left on the page for the lines. > > But doesn't lilypond know when it's compiling a new \score ? I guess > I don't know enough about how \books are produced. This code > (lyoutput-def-lookup layout 'first-page-number)
This property is entered by the user, or defaults to 1. Knowing the first page number of a book is trivial. > returns the first page of the \book. Isn't there another function > that returns the first page of the \score ? No. for the following reason: you have to call the page breaking function to know on what pages a score will be placed. At the time the footer and header markups are created by the page breaking function, the score is not placed on it yet. > I suppose that I could hard-code the numbers: > #(define (first-page-score layout props arg) > (if (= (chain-assoc-get 'page:page-number props -1) > 3|5|7 ) > *** I know that's not proper scheme You can do that, sure. This problematics also arise when one wants to make a table of contents. nicolas _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user