bug-lilypond
[Top][All Lists]

## Re: Page Spacer gets confused by next-space leading to unusable layout

 From: Joe Neeman Subject: Re: Page Spacer gets confused by next-space leading to unusable layout Date: Sun, 30 May 2010 14:52:18 +0700

```On Tue, May 18, 2010 at 10:58 AM, Boris Shingarov <address@hidden> wrote:

> Hi Joe,
>
>
>  The fact that tight-spacing ignores padding is probably a bug. Do things
>>>> work better if you change minimum_distance to (minimum_distance +
>>>>
>>>>
>>> fix exactly the issue I was referring to.
>>> What should we do with it at this point, so that we can see some
>>> progress?  Shall I open a codereview issue on this one line?  doesn't
>>> really seem appropriate, as Joe is the real author of this proposed
>>> change.
>>>
>>>
>> Actually, this turns out to be the wrong fix. If you look for
>> "Markuplines spacing broken: how to set a line padding?" in the
>> lily-devel archives, you'll see that the zero-padding for markup lines
>> was intentional (although there should have been a comment to make that
>> clear), so it is the page breaker that needs to change, not the page
>> layout.
>>
>>
>
> So, something like the attached patch?
>
> I am not sure of the exact logic behind "tight-spacing" (seems convoluted),
> but when applied to our real-world manuscript, the result looks pretty good.
>  (So I am in a situation opposite to that of Dr. Knuth's anecdote).
>

IIRC, tight-spacing just means to place lines as close together as possible
anything specific that is confusing (and then, ideally, add a comment to the
code).

the patch lgtm, apart from

diff --git a/lily/page-breaking.cc b/lily/page-breaking.cc
index d9235d8..ea0c8c5 100644
--- a/lily/page-breaking.cc
+++ b/lily/page-breaking.cc
@@ -99,7 +99,9 @@ compress_lines (const vector<Line_details> &orig)
{
Line_details const &old = ret.back ();
Line_details compressed = orig[i];