lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: finding first page of score in scheme


From: Nicolas Sceaux
Subject: Re: finding first page of score in scheme
Date: Wed, 28 Jun 2006 22:18:56 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin)

Graham Percival <address@hidden> writes:

> I'd like to display something in the footer of the first (and last)
> pages of each score in a book.
>
> My current thought is to create a function (called at the beginning of
> each score) that records the page number into some global variable(s),
> and then create a "first-page-score" function which checks to see if
> the current page number is equal to one of those numbers.  This seems
> like a ugly hack, though.  Can anybody see a nice solution?

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 you want to change the footer or header depending on what is on
page, that is after it has been filled, and thus after the header and
footers have been created. So you have to create them again, and make
sure there is still enough space for all the lines, etc. Or: you define
your header and footer markup so that they always take the same
space. (then the lines already on the page still fit on it).

I'm not sure that what I wrote is crystal clear.

nicolas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]