On Fri, 7 Apr 2006 20:00, Han-Wen Nienhuys wrote: > Joe Neeman wrote: > > On Fri, 7 Apr 2006 16:31, Werner LEMBERG wrote: > >> TeX has exactly the same problem. > > > > Does TeX allow the user to arbitrarily assign penalties for inserting a > > line break at the end of any word? > > Yes, I'm certain. See ch. 14 of the TeXbook (you can download that book, > btw). In fact our use of the value 10000 was taken from Knuth's example, > who takes 10000 to mean "infinity". Thanks -- Werner has sent me a copy of that chapter. I will read it next week.
> > > OK, so the solution will always have a certain level of instability. Just > > to put some idea of scale on my previous example graphs, it's possible > > that LilyPond will be tossing up between using 5 systems and using 10 > > systems. 5 systems provides much better spacing but 10 systems has less > > penalties. The total badness is _slightly_ less for 5 systems so Lily > > goes with that. > > I think this is perfectly reasonable, at least if you're trying to fill > out pages. 5 systems=1 page, 10 systems=2 pages. I wasn't thinking in terms of filling out pages. The point is that, independent of page breaks, you might have a situation where F(5 lines) < F(6 lines) < F(7 lines) < F(8 lines) < F(9 lines) but F(10 lines) is between F(5) and F(6). Just because the line break penalties happen to add up strangely. I don't think TeX has to deal with this problem because each paragraph is self-contained. In LilyPond, every line affects every other line. (This is just an initial reaction. It might change after I read the TeXbook.) Therefore penalties in TeX cause less instability than penalties in LilyPond. Or at least they only cause local instability. _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel