@menu
* Vertical spacing inside a system::
-* Vertical spacing of piano staves::
* Vertical spacing between systems::
* Controlling spacing of individual systems::
* Two-pass vertical spacing::
@inputfileref{input/regression/,alignment-vertical-spacing.ly}.
-@node Vertical spacing of piano staves
-@subsection Vertical spacing of piano staves
-
-The distance between staves of a @internalsref{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 @code{PianoStaff} is set with the
-@code{forced-distance} property of the
-@internalsref{VerticalAlignment} object, created in
-@internalsref{PianoStaff}.
-
-It can be adjusted as follows
-@example
-\new PianoStaff \with @{
- \override VerticalAlignment #'forced-distance = #7
-@} @{
- ...
-@}
-@end example
-
-@noindent
-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,
-@lilypond[quote,verbatim]
-\relative c'' <<
- \new PianoStaff \with {
- \override VerticalAlignment #'forced-distance = #7
- } <<
- \new Staff { c1 }
- \new Staff { c }
- >>
- \new PianoStaff <<
- \new Staff { c }
- \new Staff { c }
- >>
->>
-@end lilypond
-
-
-@seealso
-
-Example files: @inputfileref{input/regression/,alignment-vertical-spacing.ly}.
-
-
@node Vertical spacing between systems
@subsection Vertical spacing between systems
x.add_point (stem->relative_coordinate (x_refpoint_, X_AXIS));
x.widen (staff_space / 20); // ugh.
Interval y;
- y.add_point (Stem::stem_end_position (stem) * staff_space * .5);
+ Real stem_end_position =
+ Stem::is_cross_staff (stem)
+ ? get_grob_direction (stem) * infinity_f
+ : Stem::stem_end_position (stem) * staff_space * .5;
+
+ y.add_point (stem_end_position);
Direction stemdir = get_grob_direction (stem);
y.add_point (Stem::head_positions (stem)[-stemdir]
\consists "Figured_bass_position_engraver"
\consists "Script_row_engraver"
- \override VerticalAxisGroup #'minimum-Y-extent = #'(-3.5 . 3.5)
localKeySignature = #'()
createSpacing = ##t
ignoreFiguredBassRest = ##t
"Just like @code{GrandStaff} but with a forced distance between
the staves, so cross staff beaming and slurring can be used."
+ \override VerticalAxisGroup #'minimum-Y-extent = #'(-4 . 4)
\consists "Instrument_name_engraver"
instrumentName = #'()