Lyrics alignment: Difference between revisions
Appearance
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 |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
Horizontal alignment for lyrics can be set by overriding the <code>self-alignment-X</code> property of the <code>LyricText</code> object. | Horizontal alignment for lyrics can be set by overriding the <code>self-alignment-X</code> property of the <code>LyricText</code> object. Value -1 means left-aligned, 0 centered, and 1 right-aligned. Alternatively, you can use the Scheme values <code>LEFT</code>, <code>CENTER</code>, and <code>RIGHT</code> instead of numbers. | ||
<lilypond version="2.24"> | <lilypond version="2.24"> | ||
\layout { ragged-right = ##f } | \layout { | ||
ragged-right = ##f | |||
} | |||
\relative c'' { | \relative c'' { | ||
| Line 19: | Line 21: | ||
</lilypond> | </lilypond> | ||
[[Category:Really simple]] | |||
[[Category:Text]] | |||
[[Category:Vocal music]] | [[Category:Vocal music]] | ||
[[Category:Included in the official documentation]] | [[Category:Included in the official documentation]] | ||
[[Category:Snippet]] | |||
Latest revision as of 16:17, 12 December 2025
Horizontal alignment for lyrics can be set by overriding the self-alignment-X property of the LyricText object. Value -1 means left-aligned, 0 centered, and 1 right-aligned. Alternatively, you can use the Scheme values LEFT, CENTER, and RIGHT instead of numbers.
\version "2.24"
\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"
}