Re: Page size goes haywire

Eric Benson <[email protected]> Mon, 29 Jun 2026 11:51:34 -0700
Newsgroups gmane.comp.gnu.lilypond.devel
Message-ID <CAGbpyz4KCah-F0U1M_dA9B38L1v2L2hZEPJyGz5JUtm1=p6f8g@mail.gmail.com>
I'm not getting any errors or warnings when compiling. When I compile this
single song by itself, the margins stay where they belong. It's only in the
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%20d=
e%20Saudade%20-%20Ly%20Core%20-%20D.ly

and here is the "right size" file:

https://github.com/neonscribe/lilypond-lead-sheets/blob/main/Core/Destinati=
on%20Moon%20-%20Ly%20Core%20-%20Bb.ly

On Mon, Jun 29, 2026 at 11:35=E2=80=AFAM Xavier Scheuer <[email protected]=
m> 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 separat=
e
> > 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 1=
0%
> > 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 either
> go
> > past the right edge and bottom edge of the page, or shrink both margins
> so
> > that it uses a smaller part of the page. This condition persists in the
> > book until it engraves a different particular song that sets it back to
> 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 fo=
r
> > 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 i=
n
> 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, the=
n
> > 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 i=
n
> a measure.
> Check again the score (song) producing the error (and/or tell us which on=
e
> it is in your repository, it may help)..
> https://lilypond.org/doc/v2.27/Documentation/usage/music-runs-off-the-pag=
e
>
> Kind regards,
> Xavier
>
>