bug-lilypond
[Top][All Lists]
Advanced

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

Re: PATCH: Lyrics break estimation of vertical spacing


From: David Kastrup
Subject: Re: PATCH: Lyrics break estimation of vertical spacing
Date: Thu, 22 Apr 2010 09:51:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (gnu/linux)

"Boris Shingarov" <address@hidden> writes:

> What makes me really depressed about the situation with pure-height,
> is that we have fixed a number of "reasonable" bugs in this area
> (intersystem begin/rest, overridden stem length, deprecated space,
> padding of markup -- these are the ones that I did in the immediate
> past, -- the slur fix from Joe yesterday, and I also recall a bunch of
> other fixes in this area in the last few months), but we are not only
> not closer to having reasonable trouble-free page layout, but starting
> to look at page overfill/underfill problems which are very deeply
> rooted in the nature of pure-height estimation. 
>
> So much so that I am starting to think that sacrificing the benefit of
> linebreaking/pagebreaking integration in the sake of always running
> real (non-pure) height, would be the path to having a reasonable
> layout for our book.  That is, calculate the line breaks disregarding
> page breaking; calculate tallness of all lines; then run the page
> breaking algorithm.  

In case the line breaking algorithm is TeX-like, namely using a shortest
graph traversal algorithm (Viterbi), it would be a considerable
improvement if the first pass did not establish the optimal breaks, but
rather the maximum and minimum heights of material.  Then the page
breaker would pick its goals (avoid widows, avoid extra pages and so
on), and the line breaking would be done again, this time using optimal
breaks while keeping the page break goals focused.

A complete separation of line- and page breaking makes it infeasible to
avoid things like widows and clubs (single lines on one page) by picking
better line breaks.

That actually is a rather severe limitation with TeX: while TeX has
penalties for widows and clubs (and hyphens at the end of a page), they
come into play only once line breaking is already completed.  With a
rigid layout, there is nothing you can do to fix the previous bad
decision.  You can only call it foul and have TeX emit a warning.

I think we need to be better than that.

-- 
David Kastrup





reply via email to

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