On 19.06.2006 13:38:56 Manuel Mall wrote:
> On Monday 19 June 2006 16:45, Jeremias Maerki wrote:
> > On 18.06.2006 20:57:51 Simon Pepping wrote:
> > > On Sun, Jun 18, 2006 at 07:36:45PM +0800, Manuel Mall wrote:
> <snip/>
> > > > Or should we use a more refined approach were we generate
> > > > initially an INFINITE penalty but if the page breaking cannot
> > > > find a solution we reduce the penalty on some/all of those
> > > > elements given an INFINITE penalty because of keeps and run the
> > > > page breaker again?
> > >
> > > I am in favor of this solution. There are generally two solutions:
> > > increase the tolerance, or force a solution. I think FOP already
> > > has a force parameter for this purpose.
> >
> > +1. Yes, BreakingAlgorithm has a "force" parameter which is currently
> > set to true for page breaking. There's also a "threshold". We can
> > probably play with that first. See
> > LineLayoutManager.findOptimalBreakPoints().
> >
> Yes, there is a force parameter and it seems to be always set to true 
> for page breaking (and false for line breaking). But it doesn't seem to 
> guarantee that breaks will be found otherwise we shouldn't get 
> the "giving up after 50 retries" message.

Right, but that's because an INFINITE penalty cannot make a legal break.
We still need to set the penalties to a different value to get legal,
but very undesired break points.

> Anyone who understands how this force parameter is suppose to work?

I think it's called "secondpass" in Knuth's article. The "force" parameter
is used to force acceptance of a line whose adjustment ratio exceeds the
"threshold" value. Otherwise, there could be a situation where no break
solution is found (which is used in line-breaking). In page breaking, the
force parameter essentially allows overfull pages although that
situation's caught by the partOverflowRecovery which inserts empty
lines/parts. In the end, we always find a solution in line-breaking (by
letting the line overflow) and in page-breaking (by trying to defer the
overflowing element to a later part/page and giving up after 60 retries).

Jeremias Maerki

Reply via email to