]> git.donarmstrong.com Git - lilypond.git/blob - input/regression/unassociated-lyrics-alignment.ly
Issue 3254: align unassociated lyrics using NoteColumn extent.
[lilypond.git] / input / regression / unassociated-lyrics-alignment.ly
1 \version "2.19.9"
2 #(set-global-staff-size 30)
3
4 \header {
5   texidoc = "Lyrics without an @code{associatedVoice} should align properly.
6 If there are notes in the @code{PaperColumn}, they should align to them,
7 and when there are no notes, they should align relative to the
8 @code{PaperColumn} itself (represented with blue @code{GridLines} here)"
9 }
10
11 \paper {
12   ragged-right = ##f
13 }
14
15 \layout {
16   \context {
17     \Voice
18     \consists "Grid_point_engraver"
19     gridInterval = #(ly:make-moment 1/4)
20     \override GridPoint.Y-extent = #'(-1 . 3)
21   }
22   \context {
23     \Staff
24     \consists "Grid_line_span_engraver"
25     \override GridLine.color = #blue
26   }
27 }
28
29 music = <<
30   \new Staff <<
31     \new Voice { s1*3 } % needed for gridLines
32     \new Voice { d'2 d' <f' g'>1 s1 }
33   >>
34   \new Lyrics { \lyricmode { foo2 bar mmmm1 a2 bom } }
35 >>
36
37 \markup "default (centered):"
38 \music
39
40 \markup "right-aligned:"
41 {
42   \override Score.LyricText.self-alignment-X = #RIGHT
43   \music
44 }