[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Leadsheet - trying to fill page without leaving empty space
From: |
Aaron Hill |
Subject: |
Re: Leadsheet - trying to fill page without leaving empty space |
Date: |
Mon, 10 Jun 2019 09:50:06 -0700 |
User-agent: |
Roundcube Webmail/1.3.8 |
On 2019-06-10 9:12 am, Michael Hendry wrote:
I can usually get a reasonable result by tweaking global-staff-size,
but here’s an example of the bottom of a page with
[ . . . ]
Am I tweaking the wrong parameter?
Is there a more elegant way of ensuring that a leadsheet fits in one
page?
%%%%
\paper { page-count = #1 }
%%%%
Whether LilyPond will be happy about that is another thing entirely.
Setting and/or adjusting the global staff size is unlikely to be the
correct thing since that scales everything. What you probably want is
tighter spacing rather than physically smaller elements. This falls to
using the flexible vertical spacing features of LilyPond:
%%%%
\paper {
system-system-spacing = #'(
(basic-distance . 15)
(minimum-distance . 10)
(padding . 1)
(stretchability . 2))
ragged-bottom = ##f
last-bottom-spacing = #'(
(basic-distance . 0)
(minimum-distance . 0)
(padding . 0)
(stretchability . 1))
}
%%%%
(NOTE: The values above are just examples, nothing magical nor implying
best practice.)
One could probably write a dissertation on LilyPond's vertical spacing
algorithm and the resulting head-scratching. Here is a quick breakdown:
basic-distance is what LilyPond will try to honor absent of other
constraints. Specifying a smaller value for minimum-distance will give
LilyPond permission to compress the spacing. padding lets you specify
that the "ink" between two systems must be separated by a suitable
amount. Finally, stretchability is a unitless number that controls
where LilyPond is permitted to *add* space such as when ragged-bottom is
false.
It should be noted that annotate-spacing is a useful tool to determine
where space is allocated. The whitespace you see between the last
system and the footer might not be useable space, as far as LilyPond is
concerned. If it has been instructed to keep a minimum amount of space,
that is probably why it opted to overflow to a second page.
-- Aaron Hill