From c203c51a1740bad64a298c6556be643164e4b7ef Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Thu, 15 Jan 2004 20:15:59 +0000 Subject: [PATCH] * input/regression/lyrics-multi-stanza.ly (texidoc): remove file. * lily/lyric-extender.cc (brew_molecule): behave decently in case of line breaks. (brew_molecule): add padding to left, not right. --- ChangeLog | 11 +++++- input/regression/lyric-combine-polyphonic.ly | 38 ++++++++----------- ...s-extender.ly => lyric-extender-broken.ly} | 15 +++----- input/regression/lyric-phrasing-new.ly | 36 +++++++----------- input/regression/lyric-phrasing.ly | 4 +- input/regression/lyrics-melisma-beam.ly | 20 +++++----- input/regression/lyrics-multi-stanza.ly | 25 ------------ lily/lyric-extender.cc | 14 +++---- 8 files changed, 63 insertions(+), 100 deletions(-) rename input/regression/{lyrics-extender.ly => lyric-extender-broken.ly} (53%) delete mode 100644 input/regression/lyrics-multi-stanza.ly diff --git a/ChangeLog b/ChangeLog index b513e8dac2..20bbc8abf3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,16 @@ 2004-01-15 Han-Wen Nienhuys + * input/regression/*.ly: use newaddlyrics iso. addlyrics + + * input/regression/lyrics-multi-stanza.ly (texidoc): remove file. + + * lily/lyric-extender.cc (brew_molecule): behave decently in case + of line breaks. + (brew_molecule): add padding to left, not right. + * lily/system.cc (uniquify_list): new function - (output_lines): uniquify_list () on all-elements + (output_lines): uniquify_list () on all-elements. This fixes + double symbols in the output. * lily/beam.cc (rest_collision_callback): don't move anything if staff-position is set. diff --git a/input/regression/lyric-combine-polyphonic.ly b/input/regression/lyric-combine-polyphonic.ly index c500d983d9..e4d029bf7d 100644 --- a/input/regression/lyric-combine-polyphonic.ly +++ b/input/regression/lyric-combine-polyphonic.ly @@ -2,7 +2,7 @@ \header { texidoc ="Polyphonic rhythms and rests don't disturb -@code{\addlyrics}." +@code{\newaddlyrics}." } @@ -11,29 +11,23 @@ texidoc ="Polyphonic rhythms and rests don't disturb \clef violin \time 8/8 \key des \major - << \context Voice = one { - \voiceOne - \addlyrics - \notes { - bes'4 bes'4 - bes'4 bes'4 - } - \context Lyrics \lyrics - { - Do __ mi __ nus ex - } - } - \context Voice = two { - \voiceTwo - \addlyrics - \notes { - ees'8 r8 r8 r8 ees' r8 r8 r8 - } - \context Lyrics \lyrics - { - Do __ na + << + \context Voice = one { + \voiceOne + bes'4 bes'4 + bes'4 bes'4 + } + \context Voice = two { + \voiceTwo + ees'8 r8 r8 r8 ees' r8 r8 r8 } + \newaddlyrics "two" \lyrics \new LyricsVoice { + Do na } + \lyrics \newaddlyrics "one" \new LyricsVoice + { + Do mi nus ex + } >> } \paper { raggedright = ##t} diff --git a/input/regression/lyrics-extender.ly b/input/regression/lyric-extender-broken.ly similarity index 53% rename from input/regression/lyrics-extender.ly rename to input/regression/lyric-extender-broken.ly index cc01c865f2..f4d769db57 100644 --- a/input/regression/lyrics-extender.ly +++ b/input/regression/lyric-extender-broken.ly @@ -1,28 +1,25 @@ -#(ly:set-option 'old-relative) \version "2.1.7" \header{ texidoc = - "Extenders that end a staff should not extend past the staff. -Also shown: a trick to get an extender at the end of the staff. -" + "Extenders that end a staff should not extend past the staff." } sopran = \notes \relative c'' { \time 3/4 a2.( | \break - g2) << g4 { s8 s8 } >> | + g2) g4 } text = \lyrics { -vielt __ Zeit. __ " " +Aaaaa __ aaaaaah } \score { << -\addlyrics - \context Staff \sopran - \context Lyrics \text + + \context Voice = "foo" \sopran + \context LyricsVoice \newaddlyrics foo \text >> \paper { linewidth = 5.0\cm } diff --git a/input/regression/lyric-phrasing-new.ly b/input/regression/lyric-phrasing-new.ly index 7e3886f835..83acf33dec 100644 --- a/input/regression/lyric-phrasing-new.ly +++ b/input/regression/lyric-phrasing-new.ly @@ -1,3 +1,4 @@ +\version "2.1.9" \header { texidoc = "Lyric phrasing: @@ -10,27 +11,16 @@ texidoc = "Lyric phrasing: \score{ -\context Staff { - \addlyrics - \notes \relative c' \context Voice = "bla" { - \autoBeamOff - c4( c16 d c b) c4 - d16[ e f g] - - } - \lyrics \context LyricsVoice = "bla-1" { - al tijd - izzz - } - - } - -\paper { raggedright = ##t - - \translator { - \VoiceContext - - } - } +<< \notes \relative c' \context Voice = "bla" { + \autoBeamOff + c4( c16 d c b) c4 + d16[ e f g] + + } + \lyrics \newaddlyrics "bla" \context LyricsVoice { + al tijd + izzz + } >> + + \paper { raggedright = ##t } } - diff --git a/input/regression/lyric-phrasing.ly b/input/regression/lyric-phrasing.ly index 0c2de01f8b..0cdeeab8b3 100644 --- a/input/regression/lyric-phrasing.ly +++ b/input/regression/lyric-phrasing.ly @@ -30,11 +30,11 @@ a a a8 ( a) a4 } \context Lyrics << - \context LyricsVoice = "v-1" \lyrics { + \new LyricsVoice \newaddlyrics "v" \lyrics { \property LyricsVoice . stanza = "1:" Start sentence melisma end. } - \context LyricsVoice = "v-2" \lyrics { + \new LyricsVoice \newaddlyrics "v" \lyrics { \property LyricsVoice . stanza = "2:" x x x __ x. } diff --git a/input/regression/lyrics-melisma-beam.ly b/input/regression/lyrics-melisma-beam.ly index ece841ac79..ac3665206d 100644 --- a/input/regression/lyrics-melisma-beam.ly +++ b/input/regression/lyrics-melisma-beam.ly @@ -1,4 +1,3 @@ - \version "2.1.7" \header { @@ -7,14 +6,13 @@ \score { - \simultaneous { - \addlyrics - \new Staff - \notes \relative c'' { - \property Staff.autoBeaming = ##f - c8 c8[ c8 c8] c8 } - - \context Lyrics \lyrics { bla bla bla } - } - \paper { raggedright = ##t } + << + \new Staff + \notes \relative c'' { + \property Staff.autoBeaming = ##f + c8 c8[ c8 c8] c8 } + + \newaddlyrics "" \new LyricsVoice \lyrics { bla bla bla } + >> + \paper { raggedright = ##t } } diff --git a/input/regression/lyrics-multi-stanza.ly b/input/regression/lyrics-multi-stanza.ly deleted file mode 100644 index 3bf16f3daf..0000000000 --- a/input/regression/lyrics-multi-stanza.ly +++ /dev/null @@ -1,25 +0,0 @@ - -\version "2.1.7" -\header { - -texidoc = "Lyrics syllables are aligned according to - punctuation. Stanza and stz set stanza numbers. " - -} - - -\score { -\addlyrics - \notes \relative c'' \context Voice = duet { \time 3/4 g2 e4 a2 f4 g2. } - \lyrics \context Lyrics << - \context LyricsVoice = "duet-1" { - \property LyricsVoice . stanza = "Bert" - Hi, my name is bert. } - \context LyricsVoice = "duet-2" { - \property LyricsVoice . stanza = "Ernie" - Ooooo, ch\'e -- ri, je t'aime. } - >> - \paper { raggedright = ##t} -} - - diff --git a/lily/lyric-extender.cc b/lily/lyric-extender.cc index 4a6a54d5c5..25cfb2bd1e 100644 --- a/lily/lyric-extender.cc +++ b/lily/lyric-extender.cc @@ -33,7 +33,7 @@ Lyric_extender::brew_molecule (SCM smob) Link_array heads (Pointer_group_interface__extract_grobs (me, (Grob*)0, "heads")); - if (!heads.size ()) + if (!heads.size () && r->break_status_dir () == CENTER) return SCM_EOL; common = common_refpoint_of_array (heads, common, X_AXIS); @@ -44,23 +44,23 @@ Lyric_extender::brew_molecule (SCM smob) else left_point = heads[0]->extent (common, X_AXIS)[LEFT]; - if (isinf (left_point)) return SCM_EOL; - /* It seems that short extenders are even lengthened to go past the note head, but haven't found a pattern in it yet. --hwn 1/1/04 */ - SCM minlen = me->get_grob_property ("minimum-length"); Real right_point = left_point + (gh_number_p (minlen) ? gh_scm2double (minlen) : 0.0); - right_point = right_point >? heads.top ()->extent (common, X_AXIS)[RIGHT]; - + if (r->break_status_dir ()) + right_point = infinity_f; + else + right_point = right_point >? heads.top ()->extent (common, X_AXIS)[RIGHT]; + Real h = sl * gh_scm2double (me->get_grob_property ("thickness")); Real pad = 2* h; right_point = right_point extent (common, X_AXIS)[LEFT] - pad); @@ -69,7 +69,7 @@ Lyric_extender::brew_molecule (SCM smob) return SCM_EOL; - right_point += pad; + left_point += pad; Real w = right_point - left_point; -- 2.39.2