Re: Page size goes haywire

Eric Benson <[email protected]> Mon, 29 Jun 2026 12:04:41 -0700
Newsgroups gmane.comp.gnu.lilypond.devel
Message-ID <CAGbpyz4AAwU03i8xpuxMCPinexr8wnD76NoWQ6wkQM4-LX4ysw@mail.gmail.com>
I put some files in GitHub to show the problem. In this folder:

https://github.com/neonscribe/lilypond-lead-sheets/tree/main/TeX

there are four files, AV.ly, AV.pdf, AVX.ly and AVX.pdf. The AV files show
the layout spilling past the edges, while the AVX files show the layout
shrinking.

On Mon, Jun 29, 2026 at 11:51=E2=80=AFAM Eric Benson <[email protected]> =
wrote:

> I'm not getting any errors or warnings when compiling. When I compile thi=
s
> single song by itself, the margins stay where they belong. It's only in t=
he
> context of a book with more songs that the margins go haywire, and they
> stay that way until another specific song is compiled.
>
> Here is the "wrong size" file:
>
>
> https://github.com/neonscribe/lilypond-lead-sheets/blob/main/Core/Chega%2=
0de%20Saudade%20-%20Ly%20Core%20-%20D.ly
>
> and here is the "right size" file:
>
>
> https://github.com/neonscribe/lilypond-lead-sheets/blob/main/Core/Destina=
tion%20Moon%20-%20Ly%20Core%20-%20Bb.ly
>
> On Mon, Jun 29, 2026 at 11:35=E2=80=AFAM Xavier Scheuer <x.scheuer@gmail.=
com>
> wrote:
>
>> On Mon, 29 Jun 2026 at 20:17, Eric Benson <[email protected]> wrote:
>> >
>> > I have a large collection of lead sheets in LilyPond I've been working
>> on
>> > for several years. I believe I may have stumbled upon a strange bug. I
>> had
>> > been engraving these individually and assembling PDFs using LaTeX, but
>> the
>> > resulting files were huge because each separate PDF has its own separa=
te
>> > copy of its fonts. Combining PDFs this way doesn't offer any way to
>> combine
>> > fonts. I finally broke down and figured out how to compile these books
>> > entirely within LilyPond, so the largest native-buit PDF is now about
>> 10%
>> > of the size of the assembled PDF.
>> >
>> > Anyway, in the process of building these books I encountered a strange
>> > problem. There is a particular song that causes the engraving to eithe=
r
>> go
>> > past the right edge and bottom edge of the page, or shrink both margin=
s
>> so
>> > that it uses a smaller part of the page. This condition persists in th=
e
>> > book until it engraves a different particular song that sets it back t=
o
>> the
>> > correct size. I use a somewhat complicated system of include files to
>> > enable these songs to be typeset in different keys. There is one key f=
or
>> > the "wrong size" song that makes it get too large. All the other keys
>> that
>> > I've tried make it get too small. The song is written in D, but if I
>> > transpose it to C it spills over the limits of the page. If I keep it
>> in D
>> > or transpose to some other key it shrinks to a smaller portion of the
>> page.
>> > This new page size stays until the "right size" song gets engraved, th=
en
>> > the rest of the book uses the correct size.
>>
>> Hello,
>>
>> Do you have any errors or warnings when compiling the scores?
>> Music running off the page is almost always due to an error of duration
>> in a measure.
>> Check again the score (song) producing the error (and/or tell us which
>> one it is in your repository, it may help)..
>> https://lilypond.org/doc/v2.27/Documentation/usage/music-runs-off-the-pa=
ge
>>
>> Kind regards,
>> Xavier
>>
>>