bug-lilypond
[Top][All Lists]
Advanced

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

Re: Page layout is affected by previous pages?


From: Sven Axelsson
Subject: Re: Page layout is affected by previous pages?
Date: Tue, 11 Oct 2005 15:32:29 +0200

On 11/10/05, Mats Bengtsson <address@hidden> wrote:
>
> The question from address@hidden provided a nice example
> of a LilyPond problem, namely that the page breaking and system
> spacing on one page seem to be affected by what happened on earlier
> pages.
>
> In the following example, you would expect the output to contain 4
> equal pages, but what happens is that page 3 (which is in the middle
> of the "piece") gets one score line less than all the other pages.
> My only interpretation is that there is some memory between the
> pages in the page breaking algorithm. In my opinion, the systems on
> a new page should be typeset without any consideration of what has
> happened on earlier pages. I get the same results both with 2.6.3 and
> 2.7.12.


Yes, I'm sure that Lilypond does global page layout, as it should to
get optimal breaks, but in this case the reason is something else. If
you look at the result, you'll notice that all the odd pages have a bit
more space at the top. Taking a peek in
titling-init.ly<http://titling-init.ly>reveals this:

oddHeaderMarkup = \markup
\fill-line {
%% force the header to take some space, otherwise the
%% page layout becomes a complete mess.
" "
\on-the-fly #not-first-page \fromproperty #'header:instrument
\on-the-fly #print-page-number-check-first \fromproperty
#'page:page-number-string
}

evenHeaderMarkup = \markup
\fill-line {
\on-the-fly #print-page-number-check-first \fromproperty
#'page:page-number-string
\on-the-fly #not-first-page \fromproperty #'header:instrument
""
}

Note that in evenHeaderMarkup we have an empty string instead of a space. If
we change that to a space, the pages will be balanced. As is, the headers do
take
up some space, and this seems to make the second to last page break early.

Fix that by either using oddHeaderMarkup = "" and evenHeaderMarkup = "" or
by making topmargin a bit less.

And to finish this rambling, let's file a bug report:
the last line in evenHeaderMarkup should be changed to " ", else the headers
will not be balanced if they are empty.

--
Sven Axelsson


reply via email to

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