[Top][All Lists]

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

Re: dumb stacking page breaker

From: Joe Neeman
Subject: Re: dumb stacking page breaker
Date: Mon, 16 Jul 2007 07:26:30 +1000
User-agent: KMail/1.9.5

On Monday 16 July 2007 05:49, Nicolas Sceaux wrote:
> Joe Neeman <address@hidden> writes:
> > On Sunday 15 July 2007 08:37, Nicolas Sceaux wrote:
> >> Should Page_breaking::pack_systems_on_least_pages also compute the
> >> Page_spacing_result force_, demerits_, etc, slots, even though they are
> >> not used in the subclass? (to better conform to the protocol designed
> >> for the other spacing methods).
> >
> > If it doesn't complicate things too much, I think you should put it in.
> > If it gets messy (eg. on the last page), then just put a comment noting
> > the difference and we can worry about it if we actually need it in the
> > future. The same remark applies to ragged-bottom/ragged-last-bottom
> > support, which doesn't seem to be there at the moment.
> OK, in the following, the force_ and penalty_ slots are set, and
> finalize_spacing_result is called.  Could you just check whether
> penalty_ is computed as it should at the end of the function (for I
> don't understand exactly what it should be by reading the other pieces
> of code).
> I'm abusing your services...

Not at all. You need to include cached_line_details_[line].page_penalty_ 
whenever that line is the last line of a page (so you need to be summing 
page-penalties in the loop somewhere). You can ignore turn_penalty_ since the 
algorithm isn't aware of page turns (Optimal_page_breaking also ignores 

reply via email to

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