#### 4.6.5 Page layout

The most basic settings influencing the spacing are `indent` and `linewidth`. They are set in the `\paper` block. They control the indentation of the first line of music, and the lengths of the lines.

If `raggedright` is set to true in the `\paper` block, then the lines are justified at their natural length. This useful for short fragments, and for checking how tight the natural spacing is.

The option `raggedlast` is similar to `raggedright`, but only affects the last line of the piece. No restrictions are put on that line. The result is similar to formatting paragraphs. In a paragraph, the last line simply takes its natural length.

The page layout process happens outside the LilyPond formatting engine: variables controlling page layout are passed to the output, and are further interpreted by `lilypond` wrapper program. It responds to the following variables in the `\paper` block. The spacing between systems is controlled with `interscoreline`, its default is 16pt. The distance between the score lines will stretch in order to fill the full page `interscorelinefill` is set to a positive number. In that case `interscoreline` specifies the minimum spacing.

If the variable `lastpagefill` is defined, systems are evenly distributed vertically on the last page. This might produce ugly results in case there are not enough systems on the last page. The lilypond-book command ignores `lastpagefill`. See lilypond-book manual for more information.

Page breaks are normally computed by TeX, so they are not under direct control of LilyPond. However, you can insert commands into the .tex output to instruct TeX where to break pages. This is done by setting the `between-systems-strings` on the NonMusicalPaperColumn where the system is broken. An example is shown in input/regression/between-systems.ly. The predefined command `\newpage` also does this.

To change the paper size, there are two commands,

                 #(set-default-paper-size "a4")
                 \paper{
                    #(set-paper-size "a4")
                 }

The second one sets the size of the `\paper` block that it's in.

##### Predefined commands

`\newpage`.

##### See also

In this manual: Invoking lilypond.

Examples: input/regression/between-systems.ly.

Internals: NonMusicalPaperColumn.

##### Bugs

LilyPond has no concept of page layout, which makes it difficult to reliably choose page breaks in longer pieces.

Read comments on this page, or add one. This page is for LilyPond-2.2.2 (stable-branch).