Here are the final differences between my working copy and CVS lilypond.
To use the new page breaker, add "Page_turn_engraver" to the staff which
is relevant for page turns, then add
#(define page-breaking ly:optimal-breaking)
to your (book-wide) paper block. Page turns will be considered when
there is a gap in notes of at least a semi-breve (whole note). To change
this, use the context property Staff.minPageTurnLength, eg.
\set Staff.minPageTurnLength = #(ly:make-moment 2 1)
The page turn algorithm will consider putting blank pages in the middle
of the score to help with page turns -- you can set the penalty for
blank pages in the (book-wide) paper block with the variable
"blank-page-force" (default is 10) or "blank-last-page-force" (default
is 0).
Also, the paper-block variable "page-spacing-weight" controls the
relative importance of page-spacing and line-spacing. Default is 1,
higher values will make the page-spacing more important.
(Note: this page-breaker doesn't support break-before. Use \pageBreak or
\noPageBreak at the end of the previous score instead)
}
spacer.solve ((b == 0) ? line_len - indent : line_len, ragged);
- force[b * breaks.size () + c] = spacer.force ();
+
+ /* add a (convex) penalty for compression. We do this _only_ in
get_line_forces,
+ not get_line_configuration. This is temporary, for backwards
compatibility;
+ the old line/page-breaking stuff ignores page breaks when it
calculates line
+ breaks, so compression penalties can result in scores (eg.
wtk-fugue) blowing
+ up to too many pages. */
+ Real f = spacer.force ();
+ force[b * breaks.size () + c] = f - (f < 0 ? f*f*6 : 0);