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
 
(3 intermediate revisions by the same user not shown)
Line 5: Line 5:
<<
<<
   \new Staff \new Voice = melody \relative c' {
   \new Staff \new Voice = melody \relative c' {
     c4 d e f
     c4 d e f | g4 f e d | c1
    g4 f e d
    c1
   }
   }
   \new Lyrics \lyricsto melody { aa aa aa aa aa aa aa aa aa }
   \new Lyrics \lyricsto melody { aa aa aa aa aa aa aa aa aa }


   \new Staff {
   \new Staff \new Voice = melody \relative c' {
    \new Voice = melody \relative c' {
    c4 d e f | g4 f e d | c1
      c4 d e f
      g4 f e d
      c1
    }
   }
   }
   % Reducing the minimum space below the staff and above the lyrics:
   % Reducing the minimum space below the staff and above the lyrics:
   \new Lyrics \with {
   \new Lyrics \with {
Line 27: Line 22:
</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 15:18, 12 December 2025

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

\version "2.24"

% Default layout:
<<
  \new Staff \new Voice = melody \relative c' {
    c4 d e f | g4 f e d | c1
  }
  \new Lyrics \lyricsto melody { aa aa aa aa aa aa aa aa aa }

  \new Staff \new Voice = melody \relative c' {
    c4 d e f | g4 f e d | c1
  }

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