lilypond-devel
[Top][All Lists]
Advanced

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

Re: Proposal: page breaking protocol


From: Joe Neeman
Subject: Re: Proposal: page breaking protocol
Date: Sat, 29 Jul 2006 07:51:53 +1000

On Fri, 2006-07-28 at 16:59 +0200, Nicolas Sceaux wrote:
> Hi,
> 
> Today, the page breaking function (optimal-page-breaks) does the page
> breaking + computes the page stencils + calls the page post process
> function. This means that every alternate page breaking function has to
> do the same.
That's funny, I hadn't noticed before. In my page-breaking algorithms, I
only do the page breaking and it still works for some reason. I'll
investigate this further.

> I propose to define an umbrella function, which will call
> the actual page breaking function (as chosen by the user in the \paper
> block), and then will do the other common processings (stencil
> computation and post processes, eg. annotations).
> 
> This new function could also be the place to introduce new page breaking
> facilities. It is possible today to force page breaks inside a piece, or
> before its title, but adding a page break between markups, or simply
> before a piece that does not have a title, requires some unsatisfactory
> hacks.
> 
> The page breaking wrapper function could split the system list every
> time some property is seen. Then, it would call the actual page breaking
> function on each chunk of system list.
> 
> Benefits:
>  - introduce page breaks between pieces or markups
>  - some pages inside the book can be ragged-bottom, which is nice to
>  separate chapters or acts of an opera for instance.

I think that the best way to do the first is to add support within the
page breaker. My breakers support \pageBreak at the end of a score. They
would also support breaking after markups if there were a way to set
'page-turn-permission = 'force in the markup Prob.

The second sounds very handy, though.

> 
> The signature of page breaking functions changes:
> 
> * page-breaking-function (lines paper-book first-page-number last-lines
> ragged-last) [function]
> Return a list of pages containing the `lines'. Positions of lines on
> pages are set in the 'configuration page property.
> If `lines' is empty, return an empty page.
> - first-page-number: the number of the first page.
> - last-lines: #t if there are no other lines, #f otherwise (in order to
> know the last computed page is also the last page of the book)
> - ragged-last: if #t, the last computed page should be ragged-bottom.

There are some conflicts between the way you've done things and the way
I've done things. For my page-breaking algorithms, the page breaker
needs to be able to control the way that lines are broken within scores.
Therefore, it can't accept a lines parameter because that implies that
the lines are already created.

> 
> 
> Would this be useful?
> 
> nicolas
> 
> 
> _______________________________________________
> lilypond-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/lilypond-devel





reply via email to

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