Jump to content

Adjusting vertical spacing of lyrics: Difference between revisions

From LilyPond wiki
m Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series
mNo edit summary
 
(4 intermediate revisions by the same user not shown)
Line 2: Line 2:


<lilypond version="2.24">
<lilypond version="2.24">
% Default layout:
music = \relative c' { c4 d e f | g4 f e d | c1 }
text = \lyricmode { aa aa aa aa aa aa aa aa aa }
 
<<
<<
   \new Staff \new Voice = melody \relative c' {
   \new Staff \new Voice = melody \music
    c4 d e f
   % Default layout:
    g4 f e d
   \new Lyrics \lyricsto melody \text
    c1
   }
   \new Lyrics \lyricsto melody { aa aa aa aa aa aa aa aa aa }


   \new Staff {
   \new Staff \new Voice = melody \music
    \new Voice = melody \relative c' {
   % Reducing the minimum space below the staff and above the lyrics.
      c4 d e f
      g4 f e d
      c1
    }
  }
   % Reducing the minimum space below the staff and above the lyrics:
   \new Lyrics \with {
   \new Lyrics \with {
     \override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
     \override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
       #'((basic-distance . 1))
       #'((basic-distance . 1))
   }
   } \lyricsto melody \text
  \lyricsto melody { aa aa aa aa aa aa aa aa aa }
>>
>>
</lilypond>
</lilypond>


[[Category:Vocal music]]
[[Category:Spacing]]
[[Category:Spacing]]
[[Category:Text]]
[[Category:Text]]
[[Category:Tweaks and overrides]]
[[Category:Tweaks and overrides]]
[[Category:Workaround]]
[[Category:Vocal music]]
[[Category:Included in the official documentation]]
[[Category:Included in the official documentation]]
[[Category:Snippet]]

Latest revision as of 12:07, 30 December 2025

This snippet shows how to bring the lyrics line closer to the staff.

\version "2.24"

music = \relative c' { c4 d e f | g4 f e d | c1 }
text = \lyricmode { aa aa aa aa aa aa aa aa aa }

<<
  \new Staff \new Voice = melody \music
  % Default layout:
  \new Lyrics \lyricsto melody \text

  \new Staff \new Voice = melody \music
  % Reducing the minimum space below the staff and above the lyrics.
  \new Lyrics \with {
    \override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
      #'((basic-distance . 1))
  } \lyricsto melody \text
>>