[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lyric hyphen goes outside staff limits at line break

From: Thomas Morley
Subject: Re: lyric hyphen goes outside staff limits at line break
Date: Sun, 11 Mar 2012 21:13:06 +0100

Hi Zsolt,

2012/3/11 -Eluze <address@hidden>:
> Zsolt Cselényi wrote:
>> Hi, of course in the _tiny_ example I used narrow paper (yes, 2.8 cm) to
>> bring
>> out the error. However, it also happens in case of normal paper size:
>> every now
>> and then when working with longer chants where syllables have to be broken
>> at
>> the end of line, the hyphen connecting the last syllable on the line to
>> the one
>> on the next sticks out.
>> I don't get it why you can't reproduce it. Yes, hyphens are suppressed
>> mid-line
>> but the one at the end should not be: that's the one sticking out
>> off-staff.
>> Should I post another example with bigger paper & longer music? How can I
>> share
>> a print-out to show it looks at my end?
>> Thanks!
>> Zsolt
> I'm not familiar with this music, but does
> \override LyricHyphen #'minimum-distance = #9 help?
> Eluze

I've no solution but some observations:
\remove Bar_engraver causes some problems, \override SpacingSpanner
#'packed-spacing = ##t from, too.
But it is possible to provoke the problem even without them. ->
attached png (The last LyricHyphen of the line collides with the

My attempt to alter the 'X-extent of the last stem of a line from
inside a LyricHyphen-override failed. And I don't know why. I can
change the color of the stem but not the 'X-extent! Overriding it
directly in the Voice works.

\version "2.14.2"

#(define (lyric-hyphen-callback-test-2 hyphengrob)
    (let* ((par (ly:grob-parent (ly:grob-parent hyphengrob X) X))
           (st (ly:grob-object par 'stem))
           (orig (ly:grob-original hyphengrob))
           (siblings (if (ly:grob? orig)
                       (ly:spanner-broken-into orig)
                       '() )))
    (if (and (>= (length siblings) 2)
      (eq? (car siblings) hyphengrob))
      (ly:grob-set-property! st 'color red)
      (ly:grob-set-property! st 'X-extent '(0 . 10))))))

myLayout = \layout {
    indent = 18
    \context {
     \override NonMusicalPaperColumn #'line-break-permission = ##f
  \context {
    \override LyricHyphen #'after-line-breaking =

chant = {
        \repeat unfold 23 { f' }
        %\once \override Stem #'X-extent = #'(0 . 2)

verba = \lyricmode { \repeat unfold 24 { bla -- } bla }

\score {
  \new StaffGroup <<
   \new Staff <<
     \new Voice = "melody1" \chant
     \new Lyrics = "one" \lyricsto "melody1" \verba
    \new Staff <<
     \new Voice = "melody2" \chant
     \new Lyrics = "two" \lyricsto "melody2" \verba
 \layout { \myLayout }


Attachment: lyric-hyphen-test.png
Description: PNG image

reply via email to

[Prev in Thread] Current Thread [Next in Thread]