#### 4.6.2 Vertical spacing

The height of each system is determined automatically by LilyPond, to keep systems from bumping into each other, some minimum distances are set. By changing these, you can put staves closer together, and thus put more systems onto one page.

Normally staves are stacked vertically. To make staves maintain a distance, their vertical size is padded. This is done with the property `minimumVerticalExtent`. It takes a pair of numbers, so if you want to make it smaller from its, then you could set

           \set Staff.minimumVerticalExtent = #'(-4 . 4)

This sets the vertical size of the current staff to 4 staff spaces on either side of the center staff line. The argument of `minimumVerticalExtent` is interpreted as an interval, where the center line is the 0, so the first number is generally negative. The staff can be made larger at the bottom by setting it to `(-6 . 4)`.

The piano staves are handled a little differently: to make cross-staff beaming work correctly, it is necessary that the distance between staves is fixed beforehand. This is also done with a VerticalAlignment object, created in PianoStaff. In this object the distance between the staves is fixed by setting `forced-distance`. If you want to override this, use a `\context` block as follows:

           \paper {
             \context {
               \PianoStaffContext
               \override VerticalAlignment #'forced-distance = #9
             }
             ...
           }

This would bring the staves together at a distance of 9 staff spaces, measured from the center line of each staff.

##### See also

Internals: Vertical alignment of staves is handled by the VerticalAlignment object.

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