Dear Eric,

On Sat, 27 Jun 2026, Eric Benson wrote:

> I would like to find a way for LilyPond to balance the pages when it does
> automatic page breaking. That is, if a score is, say, 9 systems long, I
> would like to put 5 systems on one page and 4 systems on the other page,
> rather than 8 and 1 as it does now if I don't intervene.
>

Here is one approach. It is not perfect, but it’s one possibility.

Note that per 26.1 The \paper block (LilyPond Notation Reference)
<https://lilypond.org/doc/v2.27/Documentation/notation/the-paper-block>:

> A \paper block cannot be placed within a \score block.


But if each of your scores starts at the top of a new page, then this won’t
be a problem for you.

In actual practice, for larger, more complex scores, I typically control my
page breaks manually using a separate breaks variable, rather than using
the below approach. I can share an example of that, too, if it’s of
interest.

Gabriel

\version "2.27.1"

music = \fixed c' {
  e b d a
}

\bookpart {
  \markup { By default, this
    score renders as 13 systems on
    first page and 1 system on
    second page:
  }

  \score {
    \*100 \music
  }
}

\bookpart {
  \markup { Let’s make it
    7 and 7 instead in this
    new bookpart:
  }

  \paper {
    max-systems-per-page = 7
  }

  \score {
    \*100 \music
  }
}

\bookpart {
  \markup { Let’s make it
    8 and 8 instead in this
    third bookpart:
  }

  \paper {
    systems-per-page = 8
  }

  \score {
    \*100 \music
  }
}

Reply via email to