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: Boris Shingarov
Subject: Re: Page Spacer gets confused by next-space leading to unusable layout
Date: Sun, 30 May 2010 05:06:23 -0400
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4

On 05/30/2010 03:52 AM, Joe Neeman wrote:
IIRC, tight-spacing just means to place lines as close together as possible (which means a tight spring and a padding of zero).

That's what the code in page-layout-problem seems to be doing -- so I based my patch to page-breaking on simply trying to match the page-layout-problem. But what is the story behind tight-spacing in the first place? Most importantly, what is the reasoning behind which lines are considered tight-spaced? The thing I find confusing, is on this line:

padding = orig[i].title_ ? old.title_padding_ : old.padding_;

how do I prove that it really should be orig[i].title_, as opposed to old.title_?


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 ? ...

Ah, of course.  That's what I meant.  My bad.

Boris




reply via email to

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