From: Nicolas Sceaux Date: Fri, 18 May 2007 15:44:02 +0000 (+0200) Subject: Toplevel page breaking and page turning commands documentation and X-Git-Tag: release/2.11.25-1~9^2~5^2~1 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=3ec84c3721054719231090b80ded0788b7e57ef4;p=lilypond.git Toplevel page breaking and page turning commands documentation and regression tests. --- diff --git a/Documentation/topdocs/NEWS.tely b/Documentation/topdocs/NEWS.tely index ebdee04b86..4a707e3b96 100644 --- a/Documentation/topdocs/NEWS.tely +++ b/Documentation/topdocs/NEWS.tely @@ -65,6 +65,11 @@ which scares away people. @end ignore +@item +Page breaking and page turning commands (@code{\pageBreak}, +@code{\noPageBreak}, etc) can be used at top-level, between scores and +top-level markups. + @item The following options are now changed as a @code{-d} sub-option: @code{--backend}, @code{--safe}, @code{--preview} and diff --git a/Documentation/user/spacing.itely b/Documentation/user/spacing.itely index dddc5262f0..ac85a6c214 100644 --- a/Documentation/user/spacing.itely +++ b/Documentation/user/spacing.itely @@ -652,6 +652,9 @@ inserted at a bar line. These commands force and forbid a page-break from happening. Of course, the @code{\pageBreak} command also forces a line break. +The @code{\pageBreak} and @code{\noPageBreak} commands may also be +inserted at top-level, between scores and top-level markups. + Page breaks are computed by the @code{page-breaking} function. LilyPond provides two algorithms for computing page breaks, @code{ly:optimal-breaking} and @code{ly:page-turn-breaking}. The @@ -747,6 +750,19 @@ page turns if the repeat is very short. If you set the context property @code{minimumRepeatLengthForPageTurn} then the @code{Page_turn_engraver} will only allow turns in repeats whose duration is longer than this value. +The page turning commands, @code{\pageTurn}, @code{\noPageTurn} and +@code{\allowPageTurn}, may also be used at top-level, between scores and +top-level markups. + +@refcommands + +@funindex \pageTurn +@code{\pageTurn} +@funindex \noPageTurn +@code{\noPageTurn} +@funindex \allowPageTurn +@code{\allowPageTurn} + @refbugs There should only be one @code{Page_turn_engraver} in a score. If there is more diff --git a/input/regression/page-break-between-scores.ly b/input/regression/page-break-between-scores.ly index bc42a9ef2b..0cae8aff9b 100644 --- a/input/regression/page-break-between-scores.ly +++ b/input/regression/page-break-between-scores.ly @@ -1,7 +1,8 @@ \version "2.11.19" \header { - texidoc = "Page breaks work when they are placed at the end of a score." + texidoc = "Page breaks work when they are placed at the end of a score, +or between scores." } #(set-default-paper-size "a6") @@ -12,4 +13,8 @@ \score { {a b c' d'} } + \pageBreak + \score { + {a b c' d'} + } } diff --git a/input/regression/page-break-turn-toplevel.ly b/input/regression/page-break-turn-toplevel.ly new file mode 100644 index 0000000000..d019eb0452 --- /dev/null +++ b/input/regression/page-break-turn-toplevel.ly @@ -0,0 +1,16 @@ +\version "2.11.24" + +\header { + texidoc = "Page breaking and page turning commands (@{\\pageBreak}, +@code{\\noPageBreak}, etc), can be used at top level." +} + +#(set-default-paper-size "a6") +\paper{ #(define page-breaking ly:page-turn-breaking) } + +{ c'1 \break c'_\markup \typewriter "\\allowPageTurn" } +\allowPageTurn +{ e'1 \break e'_\markup \typewriter "\\pageBreak \\noPageTurn" } +\pageBreak +\noPageTurn +{ g'1 \break g' }