### 4.6 Global layout

The global layout determined by three factors: the page layout, the line breaks, and the spacing. These all influence each other. The choice of spacing determines how densely each system of music is set, which influences where line breaks are chosen, and thus ultimately how many pages a piece of music takes. This section explains how to tune the algorithm for spacing.

Globally spoken, this procedure happens in three steps: first, flexible distances (“springs”) are chosen, based on durations. All possible line breaking combination are tried, and the one with the best results — a layout that has uniform density and requires as little stretching or cramping as possible — is chosen. When the score is processed by TeX, each page is filled with systems, and page breaks are chosen whenever the page gets full.

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