lilypond-devel
[Top][All Lists]
Advanced

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

page breaking (again)


From: Joe Neeman
Subject: page breaking (again)
Date: Tue, 25 Jul 2006 12:45:26 +1000

Here is my latest patch to add a new page-breaker. This actually adds 2
page breakers now:

ly:page-turn-breaking will only allow page turns at specified places
within the score. By default, a page turn can only appear at the end of
a score. This can be altered in two ways:
1) by adding \allowPageTurn or \pageTurn in certain places throughout
the score
2) by adding Page_turn_engraver to a Staff (or Voice) context.
Page_turn_engraver will scan the context for noteheads. Wherever there
is a sufficiently long gap in noteheads, a page turn will be permitted.
This length is tuned by the context property minPageTurnLength

ly:optimal-breaking does not care about page turns. The main advantage
over the current page breaker is that it is capable of changing the
horizontal spacing so that the vertical spacing is better. If you use
this, you probably want to set ragged-last-bottom = ##f.

I propose that ly:optimal-breaking be eventually made the default page
breaker (I'm sure there are plenty of issues to work out first, though).

Both page-breakers can be tuned with the (book-wide) paper block
variables "page-spacing-weight" (default 1.0) which specifies the
importance of good page spacing relative to line spacing and
"blank-last-page-force" (default 0) which specifies the penalty for
ending the piece on a left-hand page. ly:page-turn-breaking will also
consider leaving blank pages mid-score. The penalty for these pages can
be tuned with "blank-page-force" (default 10).

The new files are attached in a tar archive (I cc to Han-Wen just in
case the list strips it). There are 13 of them, so I thought it would be
easier.

2006-07-25  Joe Neeman  <address@hidden>

        * scm/page.scm (make-page): make it friendlier to call (esp. from C++)

        * scm/layout-page-layout.scm (make-page-from-systems): new function
        (optimal-page-breaks): use the new page-breaking calling convention

        * scm/define-context-properties.scm (all-user-translation-properties):
        add revokePageTurns

        * lily/paper-column-engraver.cc (stop_translation_timestep): add
        revokePageTurns  functionality. If there is a special barline within
        the breakable region, break there instead of at the end of the region.

        * lily/paper-book.cc (pages): use the new page-breaking calling
convention

Attachment: page_breaking_newfiles.tar.gz
Description: application/compressed-tar

Attachment: page_breaking_20060725.patch
Description: Text Data


reply via email to

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