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: Wed, 02 Aug 2006 21:19:15 +1000

On Sat, 2006-07-29 at 13:40 +0200, Nicolas Sceaux wrote:
> BTW, setting a page break inside a score, and at the top level, is not
> the same thing. One is a burden, and not the other: suppose one uses the
> same score in different books, and wants a page break after the score in
> one book but not in the other. IMHO, between-scores-or-markups
> page breaks belong to the book (at top level), not to the score.
You are quite right about this, but there is a problem with doing it
transparently for all page-breaking functions. Basically, you want to
split the full page-breaking problem into two (or more) problems, solve
them independently and then concatenate the pages.

The problem is that the two page-breaking problems may not be
independent. In the page-turn-page-breaker, a page break after an even
page is different from a page break after an odd page. The wrapper
function wouldn't be able to make this distinction without
re-implementing most of the algorithm anyway.

Would it be possible to
- divide the functionality of the unified wrapper function into several
functions
- define a small wrapper function for each individual page-breaking
algorithm

that is, optimal-breaking (and probably most other breakers) will
1) split the problem up depending on inter-score page breaks
2) send each sub-problem to actual-optimal-breaking
3) do post-processing stuff

and page-turn-page-breaking can just skip the first step:
1) send the entire problem to actual-page-turn-breaking
2) do post-processing stuff

That way you can get the code reuse without forcing each algorithm to
reuse exactly the same code.





reply via email to

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