lilypond-devel
[Top][All Lists]
Advanced

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

Re: page breaking


From: Han-Wen Nienhuys
Subject: Re: page breaking
Date: Fri, 09 Jun 2006 12:18:48 +0200
User-agent: Thunderbird 1.5.0.2 (X11/20060501)

Joe Neeman schreef:
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)


immensely cool. I will try to review before monday. Bug me if you haven't heard anything by tuesday.

            }
          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);

Am  I missing something here? Shouldn't this be f > 0 ?  It look


--

Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen

LilyPond Software Design
 -- Code for Music Notation
http://www.lilypond-design.com





reply via email to

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