Jump to content

Adjusting vertical spacing of lyrics: Difference between revisions

From LilyPond wiki
mNo edit summary
mNo edit summary
 
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 | g4 f e d | c1
   % Default layout:
   }
   \new Lyrics \lyricsto melody \text
   \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 Staff \new Voice = melody \music
   % 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>

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
>>