Lyrics alignment: Difference between revisions
mNo edit summary |
Demonstrate more alignment values |
||
| 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. 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. | 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. Other numeric values are possible, too – don't forget to add the <samp>#</samp> Scheme prefix for negative numbers! | ||
<lilypond version="2.24"> | <lilypond version="2.24"> | ||
| Line 7: | Line 7: | ||
\relative c'' { | \relative c'' { | ||
c1 | c1 c c c | ||
} | } | ||
\addlyrics { | \addlyrics { | ||
\once \override LyricText.self-alignment-X = #LEFT | \once \override LyricText.self-alignment-X = #LEFT | ||
" | "left-aligned" | ||
\once \override LyricText.self-alignment-X = #CENTER | \once \override LyricText.self-alignment-X = #CENTER | ||
" | "centered" | ||
\once \override LyricText.self-alignment-X = 1 | \once \override LyricText.self-alignment-X = 1 | ||
" | "right-aligned" | ||
\once \override LyricText.self-alignment-X = #-2 | |||
"very left" | |||
} | } | ||
</lilypond> | </lilypond> | ||