Jump to content

Putting lyrics inside the staff: 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
Line 1: Line 1:
Lyrics can be moved vertically to place them inside the staff. The lyrics are moved with <code>\override LyricText.extra-offset = #'(0 . </code><code>dy</code><code>)</code> and there are similar commands to move the extenders and hyphens. The offset needed is established with trial and error.
Lyrics can be moved vertically to place them inside the staff. The lyrics are moved with <code>\override LyricText.extra-offset = #'(0 . <var>dy</var>)</code> and there are similar commands to move the extenders and hyphens. The offset needed is established with trial and error.


<lilypond version="2.24">
<lilypond version="2.24">

Revision as of 10:39, 19 November 2025

Lyrics can be moved vertically to place them inside the staff. The lyrics are moved with \override LyricText.extra-offset = #'(0 . dy) and there are similar commands to move the extenders and hyphens. The offset needed is established with trial and error.

\version "2.24"

% LSR : contributed by Jan-Peter Voigt http://lists.gnu.org/archive/html/lilypond-user/2010-10/msg00451.html

<<
  \new Staff <<
    \new Voice = "voc" \relative c' { \stemDown a bes c8 b c4 }
  >>
  \new Lyrics \with {
    \override LyricText.extra-offset = #'(0 . 8.6)
    \override LyricExtender.extra-offset = #'(0 . 8.6)
    \override LyricHyphen.extra-offset = #'(0 . 8.6)
  } \lyricsto "voc" { La la -- la __ _ la }
>>