]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix tight spacing for markup lines.
authorJoe Neeman <joeneeman@gmail.com>
Mon, 19 Oct 2009 17:55:46 +0000 (10:55 -0700)
committerJoe Neeman <joeneeman@gmail.com>
Mon, 19 Oct 2009 19:04:02 +0000 (12:04 -0700)
lily/page-layout-problem.cc
lily/paper-book.cc

index 35443dfc8430f8c11f2e7fc82095b6c09f8fc2df..fe87727d5ec074f38dac99e063d07dde15a859f1 100644 (file)
@@ -253,6 +253,8 @@ Page_layout_problem::append_prob (Prob *prob, Spring const& spring, Real padding
 {
   Skyline_pair *sky = Skyline_pair::unsmob (prob->get_property ("vertical-skylines"));
   Real minimum_distance = 0;
+  bool tight_spacing = to_boolean (prob->get_property ("tight-spacing"));
+
   if (sky)
     {
       minimum_distance = (*sky)[UP].distance (bottom_skyline_);
@@ -266,10 +268,17 @@ Page_layout_problem::append_prob (Prob *prob, Spring const& spring, Real padding
       bottom_skyline_.clear ();
       bottom_skyline_.set_minimum_height (iv[DOWN]);
     }
-  minimum_distance += padding;
 
   Spring spring_copy = spring;
-  spring_copy.ensure_min_distance (minimum_distance);
+  if (tight_spacing)
+    {
+      spring_copy.set_min_distance (minimum_distance);
+      spring_copy.set_inverse_stretch_strength (0.0);
+      spring_copy.set_distance (0.0);
+    }
+  else
+    spring_copy.ensure_min_distance (minimum_distance + padding);
+
   springs_.push_back (spring_copy);
   elements_.push_back (Element (prob));
 }
index 26f7be7e19518acc329c1fc891fe8737042616e8..4700a8ce0a54dedfa3eb8115242a7dc3c6bfad54 100644 (file)
@@ -516,16 +516,12 @@ Paper_book::get_system_specs ()
                                ly_symbol2scm ("allow"));
 
              paper_system_set_stencil (ps, *unsmob_stencil (t));
-             ps->set_property ("is-title", SCM_BOOL_T); 
-             if (scm_is_pair (scm_cdr (list)))
-               {
-                 /* If an other markup is following, set this markup 
-                  * next padding and next space to 0, so that baseline-skip 
-                  * only should be taken into account for lines vertical
-                  * spacing. */
-                 ps->set_property ("next-padding", scm_double2num (0.0));
-                 ps->set_property ("next-space", scm_double2num (0.0));
-               }
+             ps->set_property ("is-title", SCM_BOOL_T);
+             if (list != texts)
+               /* For each markup other than the first, place it as closely as
+                  possible to the previous markup and don't allow stretching. */
+               ps->set_property ("tight-spacing", SCM_BOOL_T);
+
              system_specs = scm_cons (ps->self_scm (), system_specs);
              ps->unprotect ();