Jump to content

Lyrics alignment: Difference between revisions

From LilyPond wiki
Import snippet from LSR
 
(No difference)

Latest revision as of 22:38, 26 October 2025

Horizontal alignment for lyrics can be set by overriding the self-alignment-X property of the LyricText object. -1 is left, 0 is center, and 1 is right; however, you can use #LEFT, #CENTER and #RIGHT as well.

\version "2.24.0"

\layout { ragged-right = ##f }

\relative c'' {
  c1
  c1
  c1
}
\addlyrics {
  \once \override LyricText.self-alignment-X = #LEFT
  "This is left-aligned"
  \once \override LyricText.self-alignment-X = #CENTER
  "This is centered"
  \once \override LyricText.self-alignment-X = 1
  "This is right-aligned"
}