LilyPond Notation Reference: 4.1.6 Other \paper variables

### 4.1.6 Other `\paper` variables

#### `\paper` variables for line breaking

`max-systems-per-page`

  The maximum number of systems that will be placed on a page. This is currently supported only by the `ly:optimal-breaking` algorithm. Default: unset.

`min-systems-per-page`

  The minimum number of systems that will be placed on a page. This may cause pages to be overfilled if it is made too large. This is currently supported only by the `ly:optimal-breaking` algorithm. Default: unset.

`systems-per-page`

  The number of systems that should be placed on each page. This is currently supported only by the `ly:optimal-breaking` algorithm. Default: unset.

`system-count`

  The number of systems to be used for a score. Default: unset. This variable can also be set in a `\layout` block.

#### See also

Notation Reference: Line breaking.

#### `\paper` variables for page breaking

Default values not listed here are defined in ‘`ly/paper-defaults-init.ly`’

`page-breaking`

  The page breaking algorithm to use. Choices are `ly:minimal-breaking`, `ly:page-turn-breaking`, `ly:one-page-breaking`, `ly:one-line-breaking`, `ly:one-line-auto-height-breaking`, and `ly:optimal-breaking`. Default: `ly:optimal-breaking`.

`page-breaking-system-system-spacing`

  Tricks the page breaker into thinking that `system-system-spacing` is set to something different than it really is. For example, if `page-breaking-system-system-spacing.padding` is set to something substantially larger than `system-system-spacing.padding`, then the page breaker will put fewer systems on each page. Default: unset.

`page-count`

  The number of pages to be used for a score. Default: unset.

`page-spacing-weight`

  When using the `ly:optimal-breaking` algorithm for page breaking, LilyPond has to make trade-offs between horizontal and vertical stretching so that the overall spacing is more acceptable. This parameter controls the relative importance of page (vertical) spacing and line (horizontal) spacing. High values will make page spacing more important. Default: `10`.

The following variables are effective only when `page-breaking` is set to `ly:page-turn-breaking`. Page breaks are then chosen to minimize the number of page turns. Since page turns are required on moving from an odd-numbered page to an even-numbered one, a layout in which the last page is odd-numbered will usually be favoured. Places where page turns are preferred can be indicated manually by inserting `\allowPageTurn` or automatically by including the `Page_turn_engraver` (see Optimal page turning).

If there are insufficient choices available for making suitable page turns, LilyPond may insert a blank page either within a score, between scores (if there are two or more scores), or by ending a score on an even-numbered page. The values of the following three variables may be increased to make these actions less likely.

The values are penalties, i.e., the higher the value the less likely will be the associated action relative to other choices.

`blank-page-penalty`

  The penalty for having a blank page in the middle of a score. If `blank-page-penalty` is large and `ly:page-turn-breaking` is selected, then LilyPond will be less likely to insert a page in the middle of a score. Instead, it will space out the music further to fill the blank page and the following one. Default: 5.

`blank-last-page-penalty`

  The penalty for ending the score on an even-numbered page. If `blank-last-page-penalty` is large and `ly:page-turn-breaking` is selected, then LilyPond will be less likely to produce a score in which the last page is even-numbered. Instead, it will adjust the spacing in order to use one page more or one page less. Default: 0.

`blank-after-score-page-penalty`

  The penalty for having a blank page after the end of one score and before the next. By default, this is smaller than `blank-page-penalty`, so that blank pages after scores are inserted in preference to blank pages within a score. Default: 2.

#### See also

Notation Reference: Page breaking, Optimal page breaking, Optimal page turning, Minimal page breaking, One-page page breaking, One-line page breaking, One-line-auto-height page breaking.

Installed Files: ‘`ly/paper-defaults-init.ly`’.

#### `\paper` variables for page numbering

Default values not listed here are defined in ‘`ly/paper-defaults-init.ly`’

`auto-first-page-number`

  The page breaking algorithm is affected by the first page number being odd or even. If set to true, the page breaking algorithm will decide whether to start with an odd or even number. This will result in the first page number remaining as is or being increased by one. Default: `#f`.

`first-page-number`

  The value of the page number on the first page.

`print-first-page-number`

  If set to true, a page number is printed on the first page.

`print-page-number`

  If set to false, page numbers are not printed.

`page-number-type`

  The type of numerals used for page numbers. Choices include `'arabic`, `'roman-ij-lower`, `'roman-ij-upper`, `'roman-lower`, and `'roman-upper`. Default: `'arabic`.

`bookpart-level-page-numbering`

  If set to true, each bookpart has its indepdendent sequence of page numbers, starting at `first-page-number` (1 by default).

  This may also be used for one bookpart only. The typical use case is numbering pages of the first bookpart independently and in roman numerals, as may be wished for an analytical introduction to the work being published.

  >     \book {
  >       \bookpart {
  >         \paper {
  >           bookpart-level-page-numbering = ##t
  >           page-number-type = #'roman-lower
  >         }
  >         \markuplist \wordwrap-lines {
  >           Lorem ipsum dolor sit amet.
  >         }
  >       }
  >       \bookpart {
  >         …
  >       }
  >     }

#### See also

Installed Files: ‘`ly/paper-defaults-init.ly`’.

#### Known issues and warnings

Odd page numbers are always on the right. If you want the music to start on page 1 there must be a blank page on the back of the cover page so that page 1 is on the right-hand side.

#### `\paper` variables concerning headers and markups

`print-all-headers`

  If set to true, this will print all headers for each `\score` in the output. Normally only the `piece` and `opus` header variables are printed. For use cases see Titles and headers. Default: `#f`.

`reset-footnotes-on-new-page`

  If set to true, footnote numbers are reset on each page break. For footnotes numbered consecutively across page breaks, set to `#f`. Default: `#t`.

`system-separator-markup`

  A markup object that is inserted between systems, often used for orchestral scores. Default: unset. The `\slashSeparator` markup, defined in ‘`ly/titling-init.ly`’, is provided as a sensible default, for example:

  >     #(set-default-paper-size "a8")

  >     \book {
  >       \paper {
  >         system-separator-markup = \slashSeparator
  >       }
  >       \header {
  >         tagline = ##f
  >       }
  >       \score {
  >         \relative { c''1 \break c1 \break c1 }
  >       }
  >     }

`footnote-separator-markup`

  A markup object that is inserted above the footnote texts at the bottom of the page. Default: a centered horizontal line, defined in ‘`ly/paper-defaults-init.ly`’.

#### See also

Installed Files: ‘`ly/titling-init.ly`’, ‘`ly/paper-defaults-init.ly`’.

Snippets: Spacing.

#### Known issues and warnings

The default page header puts the page number and the `instrument` field from the `\header` block on a line.

#### `\paper` variables for debugging

The variables `debug-beam-scoring`, `debug-slur-scoring` and `debug-tie-scoring` allow to print debugging output for beam, slur and tie scoring. See Debugging scoring algorithms for a detailed explanation, what these variables do.

#### LilyPond — Notation Reference v2.24.4 (stable-branch).