Next: , Previous: Vertical spacing inside a system, Up: Vertical spacing


11.4.2 Vertical spacing of piano staves

The distance between staves of a PianoStaff cannot be computed during formatting. Rather, to make cross-staff beaming work correctly, that distance has to be fixed beforehand.

The distance of staves in a PianoStaff is set with the forced-distance property of the VerticalAlignment object, created in PianoStaff.

It can be adjusted as follows

\new PianoStaff \with {
  \override VerticalAlignment #'forced-distance = #7
} {
  ...
}

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

The difference is demonstrated in the following example,

     
     \relative c'' <<
       \new PianoStaff \with {
         \override VerticalAlignment #'forced-distance = #7
       } <<
         \new Staff { c1 }
         \new Staff { c }
       >>
       \new PianoStaff <<
         \new Staff { c }
         \new Staff { c }
       >>
     >>

[image of music]

See also

Example files: input/regression//alignment-vertical-spacing.ly.


Next: , Previous: Vertical spacing inside a system, Up: Vertical spacing

This page is for LilyPond-2.10.33 (stable-branch).

Report errors to http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs.