@code{DOWN}; those at the bottom should use @code{UP}. Setting
@code{staff-affinity} for a staff causes it to be treated as a
non-staff line. Setting @code{staff-affinity} to @code{#f} causes
-a non-staff line to be treated as a staff.
-
-@c TODO: verify last clause below ("even if other...")
+a non-staff line to be treated as a staff. Setting
+@code{staff-affinity} to @code{UP}, @code{CENTER}, or @code{DOWN}
+causes a staff to be spaced as a non-staff line.
@item nonstaff-relatedstaff-spacing
The distance between the current non-staff line and the nearest
@code{CENTER}, then @code{nonstaff-relatedstaff-spacing} is used
for the nearest staves on @emph{both} sides, even if other
non-staff lines appear between the current one and either of the
-staves.
+staves. This means that the placement of a non-staff line depends
+on both the surrounding staves and the surrounding non-staff lines.
+Setting the @code{stretchability} of one of these types of spacing to
+a small value will make that spacing dominate. Setting the
+@code{stretchability} to a large value will make that spacing have
+little effect.
@item nonstaff-nonstaff-spacing
The distance between the current non-staff line and the next
-\version "2.13.38"
+\version "2.13.56"
\header {
- texidoc = "Various languages are supported for note names input.
-Selecting another language within a music expression is possible,
-and doesn't break point-and-click abilities.
-"
-}
+ texidoc = "
+ NoteNames context should be close to the related notes,
+ and should not collide with the tempo markings.
+ "
+}
-%% Old syntax.
-\include "english.ly"
+\paper {
+ system-system-spacing
+ #'basic-distance = #10 % increase this value for more space
+}
-\relative c'' {
- g4 bf d c
+notes = \relative c {
+ c'4 c c c
+}
- %% Manual override of the pitchnames variable
- %% and the parser note names:
- #(begin
- (set! pitchnames (ly:assoc-get 'nederlands language-pitch-names))
- (ly:parser-set-note-names parser pitchnames))
- bes4 a g fis
+mylyrics = \lyricmode {
+ \tempo "Allegro"
+ ly -- ric ly -- ric
+}
- %% The \language command acts in the same way:
- \language "italiano"
- sol4 fa mib re
+\score {
+ <<
+ \new Voice = "voice" {
+ \repeat unfold 13 \notes
+ }
+ \context NoteNames {
+ \repeat unfold 13 \notes
+ }
+ \new Lyrics \lyricsto "voice" {
+ \repeat unfold 13 \mylyrics
+ }
+ >>
}
\description "A context for printing the names of notes."
\consists "Axis_group_engraver"
- % FIXME: not sure what the default should be here.
- \override VerticalAxisGroup #'staff-affinity = #DOWN
+ \override VerticalAxisGroup #'staff-affinity = #UP
+ \override VerticalAxisGroup #'nonstaff-nonstaff-spacing =
+ #'((basic-distance . 0)
+ (minimum-distance . 2.8)
+ (padding . 0.2)
+ (stretchability . 0))
+ \override VerticalAxisGroup #'nonstaff-relatedstaff-spacing =
+ #'((basic-distance . 5.5)
+ (padding . 0.5)
+ (stretchability . 1))
+ \override VerticalAxisGroup
+ #'nonstaff-unrelatedstaff-spacing #'padding = 1.5
\consists "Tie_engraver"
\consists "Note_name_engraver"