From: Paul Morris Date: Sun, 24 Jan 2016 02:43:09 +0000 (-0500) Subject: Issue 4743/2: Regtest, Doc NR 4.3.2, Changes entry X-Git-Tag: release/2.19.36-1~7 X-Git-Url: https://git.donarmstrong.com/lilypond.git?p=lilypond.git;a=commitdiff_plain;h=01b15679731ac5fcaf8edac1ad5bce6acba10ff0 Issue 4743/2: Regtest, Doc NR 4.3.2, Changes entry For ly:one-page-auto-height-breaking --- diff --git a/Documentation/changes.tely b/Documentation/changes.tely index c943a1a64e..2a265ce914 100644 --- a/Documentation/changes.tely +++ b/Documentation/changes.tely @@ -61,6 +61,13 @@ which scares away people. @end ignore +@item +A new page breaking function @code{ly:one-line-auto-height-breaking} +places a whole score on a single line and changes the page width +to match, just like @code{ly:one-line-breaking}. The difference is that +it also automatically modifies the height of the page to fit the height +of the music. + @item Markup-command @code{\draw-squiggle-line} is now available. Customizing is possible with overrides of @code{thickness}, @code{angularity}, diff --git a/Documentation/notation/spacing.itely b/Documentation/notation/spacing.itely index be5715f2cd..d3cfa42ff1 100644 --- a/Documentation/notation/spacing.itely +++ b/Documentation/notation/spacing.itely @@ -892,8 +892,8 @@ Default values not listed here are defined in The page-breaking algorithm to use. Choices are @code{ly:minimal-breaking}, @code{ly:page-turn-breaking}, -@code{ly:one-line-breaking} and @code{ly:optimal-breaking} -(the default). +@code{ly:one-line-breaking}, @code{ly:one-line-auto-height-breaking}, +and @code{ly:optimal-breaking} (the default). @item page-breaking-system-system-spacing @funindex page-breaking-system-system-spacing @@ -1559,6 +1559,7 @@ how to modify them. * Optimal page breaking:: * Minimal page breaking:: * One-line page breaking:: +* One-line-auto-height page breaking:: * Optimal page turning:: @end menu @@ -1596,8 +1597,8 @@ bottom of the final page (or the final page in each @ref{Fixed vertical spacing paper variables,,Fixed vertical spacing @code{@bs{}paper} variables}. Page breaks are computed by the @code{page-breaking} function. -LilyPond provides three algorithms for computing page breaks, -@code{ly:optimal-breaking}, @code{ly:page-turn-breaking} and +LilyPond provides several algorithms for computing page breaks, +including @code{ly:optimal-breaking}, @code{ly:page-turn-breaking} and @code{ly:minimal-breaking}. The default is @code{ly:optimal-breaking}, but the value can be changed in the @code{\paper} block: @@ -1710,14 +1711,31 @@ Snippets: The @code{ly:one-line-breaking} function is a special-purpose page breaking algorithm that puts each score on its own page, and -on a single line. This page breaking function does not typeset -titles or margins; only the score will be displayed. +on a single line. No titles or margins are typeset; only the score is +displayed. -The page width will be adjusted so that the longest score fits on +The page width is adjusted so that the longest score fits on one line. In particular, @code{paper-width}, @code{line-width} -and @code{indent} variables in the @code{\paper} block will be -ignored, although @code{left-margin} and @code{right-margin} will -still be honored. The height of the page will be left unmodified. +and @code{indent} variables in the @code{\paper} block are ignored, +although @code{left-margin} and @code{right-margin} are still honored. +The height of the page is left unmodified. + + +@node One-line-auto-height page breaking +@unnumberedsubsubsec One-line-auto-height page breaking + +@funindex ly:one-line-auto-height-breaking + +The @code{ly:one-line-auto-height-breaking} function works just like +@code{ly:one-line-breaking} except the page height is automatically +modified to fit the height of the music. Specifically, the +@code{paper-height} variable in the @code{\paper} block is set so that +it spans the height of the tallest score plus the @code{top-margin} and +@code{bottom-margin}. + +Note that the @code{top-system-spacing} setting will affect the +vertical position of the music. Set it to @code{##f} in a paper block +to simply place the music between the top and bottom margins. @node Optimal page turning diff --git a/input/regression/one-line-auto-height-breaking.ly b/input/regression/one-line-auto-height-breaking.ly new file mode 100644 index 0000000000..087ff501e5 --- /dev/null +++ b/input/regression/one-line-auto-height-breaking.ly @@ -0,0 +1,11 @@ +\version "2.19.36" + +\header { + texidoc = "The @var{ly:one-line-auto-height-breaking} algorithm puts + everything on one line (just like @code{ly:one-line-breaking}) and + sets the page-height to fit the music." +} + +\paper { page-breaking = #ly:one-line-auto-height-breaking } + +\include "typography-demo.ly"