[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Lyrics and spacing inside a system
From: |
Neil Puttock |
Subject: |
Re: Lyrics and spacing inside a system |
Date: |
Tue, 30 Mar 2010 22:16:38 +0100 |
On 23 March 2010 11:49, Dmytro O. Redchuk <address@hidden> wrote:
> So, here is the simplified example:
>
> % --------------8<-----------------------------
> \score {
> \context ChoirStaff <<
> \new Staff = "upperstaff" <<
> \new Voice = "alto" {
> \voiceTwo
> g'4 g' r2
> }
> \context Lyrics = "altolyrics" \lyricsto "alto"
> \lyricmode { a a }
> >>
> %
> \new Staff = "tenstaff" <<
> \new Voice = "tenor" {
> f'4 f' f' f'
> }
> \context Lyrics = "tenlyrics" \with {
> alignAboveContext = "tenstaff"
> } \lyricsto "tenor" \lyricmode { _ _ p p }
>
> >>
> >>
> }
>
> \paper {
> ragged-right = ##t
> indent = 0
> }
> % --------------8<-----------------------------
>
> So, there is "some unwanted vertical space" between lyrics lines, which
> i failed to make to disappear with spacings and affinity.
OK, here's another trick you might try:
\layout {
\context {
\Lyrics
\override LyricText #'after-line-breaking =
#(lambda (grob)
(let ((text (ly:grob-property grob 'text)))
(and (string? text)
(string=? text " ")
(set! (ly:grob-property grob 'Y-extent) #f))))
}
}
This checks each LyricText grob to see whether it's a skip (the lexer
converts an underscore to a space in a \lyricmode block), then resets
the vertical extent so the skips don't take up any space in the
alignment.
Cheers,
Neil