bug-lilypond
[Top][All Lists]
Advanced

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

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 +
>>>> padding) in page-layout-problem.cc:286?
>>>>
>>>>
>>> As I had posted earlier, changing to (minimum_distance+padding) does
>>> 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
(which means a tight spring and a padding of zero). Feel free to ask about
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];
-      Real padding = orig[i].title_ ? old.title_padding_ : old.padding_;
+      Real padding = 0;
+      if (!orig[i].tight_spacing_)
+        orig[i].title_ ? old.title_padding_ : old.padding_;

I suppose you mean
padding = orig[i].title ? ...


reply via email to

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