]> git.donarmstrong.com Git - lilypond.git/commitdiff
Change space to basic-distance in spacing alists.
authorJoe Neeman <joeneeman@gmail.com>
Tue, 7 Dec 2010 19:13:48 +0000 (11:13 -0800)
committerJoe Neeman <joeneeman@gmail.com>
Tue, 7 Dec 2010 20:06:29 +0000 (12:06 -0800)
14 files changed:
input/regression/page-breaking-min-distance2.ly
input/regression/page-spacing-nonstaff-lines-between.ly
input/regression/page-spacing-nonstaff-lines-bottom.ly
input/regression/page-spacing-nonstaff-lines-header-padding.ly
input/regression/page-spacing-staff-group-hara-kiri.ly
input/regression/paper-nested-override2.ly
input/regression/system-overstrike.ly
lily/constrained-breaking.cc
lily/page-layout-problem.cc
ly/engraver-init.ly
ly/paper-defaults-init.ly
python/convertrules.py
scm/define-grob-properties.scm
scm/define-grobs.scm

index 4634fbe2b86880fbdc088c0fbd7f667b87cdd841..57f9d592309f7bf7aaa5420c63e55a56e16cef6b 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.13.39"
+\version "2.13.42"
 
 \header {
   texidoc = "minimum-distance within a system is correctly accounted for in page breaking."
@@ -8,7 +8,7 @@
   \context {
     \Score
     \override VerticalAxisGroup #'staff-staff-spacing =
-      #'((space . 20)
+      #'((basic-distance . 20)
          (stretchability . 0))
   }
 }
index a8de135cd79421203dffb35c6862c371afadeeb7..a8570796b8e1c763d48f2583e71b545103c15829 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.13.36"
+\version "2.13.42"
 
 \header {
   texidoc = "Non-staff lines between two systems don't confuse the
@@ -9,7 +9,7 @@ between the two closest staves of consecutive systems."
 
 \paper {
   ragged-right = ##t
-  system-system-spacing = #'((space . 20) (minimum-distance . 30))
+  system-system-spacing = #'((basic-distance . 20) (minimum-distance . 30))
   annotate-spacing = ##t
 }
 
index ec15e48940d569d44af504f391b06e540c823a0a..b99304a0ad7e9021b97b428c5f5a2eeadd5181dd 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.13.39"
+\version "2.13.42"
 
 \header {
   texidoc = "A non-staff line (such as @code{Lyrics}) at the
@@ -9,7 +9,7 @@ bottom of a system gets spaced appropriately."
   ragged-right = ##t
   \context {
     \Lyrics
-    \override VerticalAxisGroup #'nonstaff-nonstaff-spacing #'space = #20
+    \override VerticalAxisGroup #'nonstaff-nonstaff-spacing #'basic-distance = #20
   }
 }
 <<
index e83b24605c8642d8875ed25d7bc045017ada5fe8..924723de696e3e56bdb328f690eccf532fb9c2c3 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.13.36"
+\version "2.13.42"
 
 \header {
   texidoc = "Padding from the header and footer is measured to the
@@ -9,8 +9,8 @@ first non-staff line, whether or not it is spaceable."
 
 \book {
   \paper {
-    top-system-spacing = #'((space . 1) (padding . 10))
-    last-bottom-spacing = #'((space . 1) (padding . 10))
+    top-system-spacing = #'((basic-distance . 1) (padding . 10))
+    last-bottom-spacing = #'((basic-distance . 1) (padding . 10))
     annotate-spacing = ##t
     ragged-last-bottom = ##f
   }
index 940e3ace8c87d2aa4026a840cd3d336bafe87738..18ae6d93fccc65bb6cf1c6287c40d602dc3d1dc4 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.13.39"
+\version "2.13.42"
 
 \header {
   texidoc = "StaffGrouper interacts correctly with \RemoveEmptyStaffContext.
@@ -18,7 +18,7 @@ In both systems, there should be a large space between the staff groups."
 \score {
   <<
     \new StaffGroup = "G1" \with {
-      \override StaffGrouper #'staffgroup-staff-spacing #'space = #20
+      \override StaffGrouper #'staffgroup-staff-spacing #'basic-distance = #20
     }
     <<
       \new Staff { c'1 \break c'1 \break R1 }
index 632c48411dc13121fd50ba8096d210f5dc264176..49c6a7f7b0eb1b0e8e3762037dc63c474e88797c 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.13.38"
+\version "2.13.42"
 
 \header {
   texidoc = "Setting individual nested paper properties does not
@@ -8,7 +8,7 @@ remove existing settings or break spacing annotation."
 \book {
   \paper {
     annotate-spacing = ##t
-    system-system-spacing = #'((space . 12) (minimum-distance . 8))
+    system-system-spacing = #'((basic-distance . 12) (minimum-distance . 8))
     system-system-spacing #'padding = #1
   }
   \relative c' {
index 1a304b3156613f355404fb7756c17475fc7c39bc..09b87b0838cbe32ea98f3620705bf40e6c0295e3 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.13.36"
+\version "2.13.42"
 
 \header {
   texidoc = "By setting the padding between systems to a negative
@@ -9,7 +9,7 @@ value, it is possible to eliminate the anti-collision constraints.
 \book {
   \paper {
     ragged-bottom = ##t
-    system-system-spacing = #'((space . 1) (padding . -10))
+    system-system-spacing = #'((basic-distance . 1) (padding . -10))
   }
 
   {
index dcef2208e336e619396ab7103d255b52fd071289..29c00e1b0334c1b6fd1946e125310f51cbcc93f6 100644 (file)
@@ -398,13 +398,13 @@ Constrained_breaking::initialize ()
 
   Page_layout_problem::read_spacing_spec (spacing_spec,
                                          &system_system_space_,
-                                         ly_symbol2scm ("space"));
+                                         ly_symbol2scm ("basic-distance"));
   Page_layout_problem::read_spacing_spec (page_breaking_spacing_spec,
                                          &system_system_space_,
-                                         ly_symbol2scm ("space"));
+                                         ly_symbol2scm ("basic-distance"));
   Page_layout_problem::read_spacing_spec (title_spec,
                                          &system_markup_space_,
-                                         ly_symbol2scm ("space"));
+                                         ly_symbol2scm ("basic-distance"));
 
   Page_layout_problem::read_spacing_spec (spacing_spec,
                                          &system_system_padding_,
@@ -543,8 +543,8 @@ Line_details::Line_details (Prob *pb, Output_def *paper)
   title_min_distance_ = 0;
   space_ = 0;
   title_space_ = 0;
-  Page_layout_problem::read_spacing_spec (spec, &space_, ly_symbol2scm ("space"));
-  Page_layout_problem::read_spacing_spec (title_spec, &title_space_, ly_symbol2scm ("space"));
+  Page_layout_problem::read_spacing_spec (spec, &space_, ly_symbol2scm ("basic-distance"));
+  Page_layout_problem::read_spacing_spec (title_spec, &title_space_, ly_symbol2scm ("basic-distance"));
   Page_layout_problem::read_spacing_spec (spec, &padding_, ly_symbol2scm ("padding"));
   Page_layout_problem::read_spacing_spec (title_spec, &title_padding_, ly_symbol2scm ("padding"));
   Page_layout_problem::read_spacing_spec (spec, &min_distance_, ly_symbol2scm ("minimum-distance"));
index aec0b80ac8380ea9a957731410152eb4edba81b3..e9a00093d9ded28f757b45d8a339d852beda27d3 100644 (file)
@@ -652,7 +652,7 @@ Page_layout_problem::get_fixed_spacing (Grob *before, Grob *after, int spaceable
   Real stretchability = 0;
   if (Page_layout_problem::read_spacing_spec (spec, &stretchability, ly_symbol2scm ("stretchability"))
       && stretchability == 0)
-    Page_layout_problem::read_spacing_spec (spec, &ret, ly_symbol2scm ("space"));
+    Page_layout_problem::read_spacing_spec (spec, &ret, ly_symbol2scm ("basic-distance"));
 
   // If we're pure, then paper-columns have not had their systems set,
   // and so elts[i]->get_system () is unreliable.
@@ -752,7 +752,7 @@ Page_layout_problem::alter_spring_from_spacing_spec (SCM spec, Spring* spring)
   Real space;
   Real stretch;
   Real min_dist;
-  if (read_spacing_spec (spec, &space, ly_symbol2scm ("space")))
+  if (read_spacing_spec (spec, &space, ly_symbol2scm ("basic-distance")))
     spring->set_distance (space);
   if (read_spacing_spec (spec, &min_dist, ly_symbol2scm ("minimum-distance")))
     spring->set_min_distance (min_dist);
index 26f0de3706cc4833bb4478861c122a3e62f89fad..d102d7c5d4e3e489e69f913d2966b26c36b0f3f0 100644 (file)
@@ -16,7 +16,7 @@
 %%%% You should have received a copy of the GNU General Public License
 %%%% along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 
-\version "2.13.39"
+\version "2.13.42"
 
 \context {
   \name "Global"
@@ -375,7 +375,7 @@ a collection of staves, with a bracket in front and spanning bar lines."
   pedalUnaCordaStrings = #'("una corda" "" "tre corde")
   \override VerticalAxisGroup #'staff-affinity = #CENTER
   \override VerticalAxisGroup #'nonstaff-relatedstaff-spacing =
-    #'((space . 5)
+    #'((basic-distance . 5)
        (padding . 0.5))
   \override TextScript #'font-shape = #'italic
   \override DynamicLineSpanner #'Y-offset = #0
@@ -407,14 +407,14 @@ printing of a single line of lyrics."
   \override VerticalAxisGroup #'remove-empty = ##t
   \override VerticalAxisGroup #'staff-affinity = #UP
   \override VerticalAxisGroup #'nonstaff-relatedstaff-spacing =
-    #'((space . 5.5)
-       (stretchability . 1)
-       (padding . 0.5))
+    #'((basic-distance . 5.5)
+       (padding . 0.5)
+       (stretchability . 1))
   \override VerticalAxisGroup #'nonstaff-nonstaff-spacing =
-     #'((space . 0)
-       (stretchability . 0)
+     #'((basic-distance . 0)
+       (minimum-distance . 2.8)
        (padding . 0.2)
-       (minimum-distance . 2.8))
+       (stretchability . 0))
   \override VerticalAxisGroup #'nonstaff-unrelatedstaff-spacing #'padding = #1.5
   \override InstrumentName #'self-alignment-Y = ##f
 
index e18e12019da5bf4a44a41c8546013e77ef2e91a8..e3ff4ee04d2426686364201741022671f96b9fd8 100644 (file)
@@ -17,7 +17,7 @@
 %%%% You should have received a copy of the GNU General Public License
 %%%% along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 
-\version "2.12.0"
+\version "2.13.42"
 
 \paper {
   #(set-paper-dimension-variables (current-module))
   %% Flexible vertical spacing
   %%
   %% Note: these are not scaled; they are in staff-spaces.
-  system-system-spacing = #'((space . 12) (minimum-distance . 8) (padding . 1) (stretchability . 60))
-  score-system-spacing = #'((space . 14) (minimum-distance . 8) (padding . 1) (stretchability . 120))
-  markup-system-spacing = #'((space . 5) (padding . 0.5) (stretchability . 30))
-  score-markup-spacing = #'((space . 12) (padding . 0.5) (stretchability . 60))
-  markup-markup-spacing = #'((space . 1) (padding . 0.5))
-  top-system-spacing = #'((space . 1) (padding . 1) (minimum-distance . 0))
-  top-markup-spacing = #'((space . 0) (padding . 1) (minimum-distance . 0))
-  last-bottom-spacing = #'((space . 1) (padding . 1) (minimum-distance . 0) (stretchability . 30))
+  system-system-spacing = #'((basic-distance . 12) (minimum-distance . 8) (padding . 1) (stretchability . 60))
+  score-system-spacing = #'((basic-distance . 14) (minimum-distance . 8) (padding . 1) (stretchability . 120))
+  markup-system-spacing = #'((basic-distance . 5) (padding . 0.5) (stretchability . 30))
+  score-markup-spacing = #'((basic-distance . 12) (padding . 0.5) (stretchability . 60))
+  markup-markup-spacing = #'((basic-distance . 1) (padding . 0.5))
+  top-system-spacing = #'((basic-distance . 1) (padding . 1) (minimum-distance . 0))
+  top-markup-spacing = #'((basic-distance . 0) (padding . 1) (minimum-distance . 0))
+  last-bottom-spacing = #'((basic-distance . 1) (padding . 1) (minimum-distance . 0) (stretchability . 30))
 
 
   %%
index 3ea4739db0d091dbe138b736d62dc0c6ea692029..b01e1bbaba46b74f8eed3174911645434a1d3391 100644 (file)
@@ -3108,6 +3108,13 @@ def conv(str):
 
     return str
 
+@rule ((2, 13, 42),
+    _ ("Rename space to basic-distance in various spacing alists."))
+def conv(str):
+    str = re.sub (r'\(space\s+\.\s+([0-9]*\.?[0-9]*)\)', r'(basic-distance . \1)', str)
+    str = re.sub (r"#'space\s+=\s+#?([0-9]*\.?[0-9]*)", r"#'basic-distance = #\1", str)
+    return str
+
 
 # Guidelines to write rules (please keep this at the end of this file)
 #
index 6097eb8f0763193f0f8e3ec86c27c305b1ffddfe..497f8f08af0798485d535eca88a5201735cbe39d 100644 (file)
@@ -785,7 +785,7 @@ appear between staves.  The alist can contain the following keys:
 @item @code{padding} -- the minimum required amount of
 unobstructed vertical whitespace between the two items, measured
 in staff-spaces.
-@item @code{space} -- the vertical distance, measured in
+@item @code{basic-distance} -- the vertical distance, measured in
 staff-spaces, between the reference points of the two items when
 no collisions would result, and no stretching or compressing is in
 effect.
index 9666d63030f0cab6450b20747512ca0611943790..0f66726b474a564c163d2e8e79ccb6e397bcc40a 100644 (file)
 
     (StaffGrouper
      . (
-       (staff-staff-spacing . ((space . 9)
-                                (stretchability . 5)
+       (staff-staff-spacing . ((basic-distance . 9)
                                (minimum-distance . 7)
-                               (padding . 1)))
-       (staffgroup-staff-spacing . ((space . 10.5)
-                                     (stretchability . 9)
+                               (padding . 1)
+                                (stretchability . 5)))
+       (staffgroup-staff-spacing . ((basic-distance . 10.5)
                                     (minimum-distance . 8)
-                                    (padding . 1)))
+                                    (padding . 1)
+                                     (stretchability . 9)))
        (meta . ((class . Spanner)
                 (interfaces . (staff-grouper-interface))))))
 
      . (
        (adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights)
        (axes . (,Y))
-       (default-staff-staff-spacing . ((space . 9)
+       (default-staff-staff-spacing . ((basic-distance . 9)
                                        (minimum-distance . 8)
                                        (padding . 1)))
        (nonstaff-unrelatedstaff-spacing . ((padding . 0.5)))