From: Han-Wen Nienhuys Date: Sun, 25 May 2003 21:44:24 +0000 (+0000) Subject: (combine_demerits): add epsilon term to X-Git-Tag: release/1.7.20~5 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=301eb11ceebab869b43d5ef9069a0dc412680a1b;p=lilypond.git (combine_demerits): add epsilon term to force unique solution in zero-force case. --- diff --git a/ChangeLog b/ChangeLog index 3810b63aab..e61776292b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2003-05-25 Han-Wen Nienhuys + * lily/gourlay-breaking.cc (combine_demerits): add epsilon term to + force unique solution in zero-force case. + * lily/key-performer.cc (create_audio_elements): always use major key diff --git a/Documentation/user/tutorial.itely b/Documentation/user/tutorial.itely index 9bd2772e67..8bc0e301fe 100644 --- a/Documentation/user/tutorial.itely +++ b/Documentation/user/tutorial.itely @@ -788,7 +788,6 @@ for comments. - @node Printing lyrics @section Printing lyrics @cindex lyrics @@ -924,7 +923,7 @@ a lead sheet, for example, \paper @{ @} @} @end example -@lilypond[singleline] +@lilypond[] \score { < \context ChordNames \chords { r8 c2:sus4 f } @@ -935,7 +934,7 @@ a lead sheet, for example, \times 2/3 { f g g } \times 2/3 { g4-( a2-) } } \context Lyrics \lyrics { I want to break free __ } > - \paper{ } + \paper{ raggedright = ##t } } @end lilypond @@ -956,7 +955,7 @@ example @example \score @{ @var{..music..} - \midi @{ \tempo 4=72@} + \midi @{ \tempo 4=72 @} \paper @{ @} @} @end example @@ -981,7 +980,7 @@ example, tagline = "small is beautiful" @} - \score { @dots{} + \score @{ @dots{} @} @end example @cindex bibliographic information @@ -1014,12 +1013,12 @@ will be printed before each movement. tagline = "small is beautiful" @} - \score { @dots{} + \score @{ @dots{} \header @{ piece = "Adagio" @} - } - \score { @dots{} + @} + \score @{ @dots{} \header @{ piece = "Menuetto" @} - } + @} @end example More information on titling can be found in @ref{Invoking ly2dvi}. @@ -1187,7 +1186,7 @@ included if you installed a binary distribution. [TODO: revise for new site.] These HTML pages are also available on the web: go to the LilyPond website, click ``Documentation: Index'' on the side bar, look in the ``Information for uses'' section, and click on ``Documentation -of internals''. +of internals.'' You might want to bookmark either the HTML files on your disk, or the one on the web (the HTML on your hard drive will load much faster than @@ -1346,18 +1345,6 @@ notes), there should be more space. This space is controlled by @end example -(TODO: huh? what's this: ) - -This command resembles the one for setting slur attachments, but -subtly differs in its details. Grob properties can be manipulated -with two commands: @code{\override} extends the definition of a grob -with one setting, and @code{\revert} releases this setting. This has -a theoretical appeal: the operations are simple and symmetric. For -practical use, it can be cumbersome. The commands act like -parentheses: you should carefully balance the use of @code{\override} -and @code{\revert}. The @code{\set} command is more friendly: it -first does a @code{\revert} followed by @code{\override}. - @separate Brahms uses music notation is a slightly unorthodox way. Ties diff --git a/lily/gourlay-breaking.cc b/lily/gourlay-breaking.cc index 543caebacb..ae4c3073a4 100644 --- a/lily/gourlay-breaking.cc +++ b/lily/gourlay-breaking.cc @@ -235,7 +235,14 @@ Gourlay_breaking::combine_demerits (Column_x_positions const &prev, Q: do want globally non-cramped lines, or locally equally cramped lines. */ Real demerit = abs (this_one.force_) + abs (prev.force_ - this_one.force_) - + break_penalties; + + break_penalties + /* + This is rather ugly (not scale free), but we have to put a + penalty breaking two zero-force lines. Otherwise, we don't get a + unique solution (i.e.: line-breaks in short raggedright + fragments.) + */ + + 1e-5; if (!this_one.satisfies_constraints_b_) { diff --git a/lily/simple-spacer.cc b/lily/simple-spacer.cc index 5a658657d6..dceebef282 100644 --- a/lily/simple-spacer.cc +++ b/lily/simple-spacer.cc @@ -144,13 +144,7 @@ Simple_spacer::active_blocking_force () const Real Simple_spacer::active_springs_stiffness () const { - Real den = 0.0; - for (int i=0; i < springs_.size (); i++) - if (springs_[i].active_b_) - { - den += 1 / springs_[i].hooke_; - } - return 1/den; + range_stiffness (0, springs_.size ()); } void