]> git.donarmstrong.com Git - lilypond.git/commitdiff
Rename spacing variables.
authorJoe Neeman <joeneeman@gmail.com>
Mon, 10 Aug 2009 12:43:24 +0000 (22:43 +1000)
committerJoe Neeman <joeneeman@gmail.com>
Mon, 10 Aug 2009 23:51:36 +0000 (09:51 +1000)
first-system-spacing -> top-system-spacing
first-system-title-spacing -> top-title-spacing
last-system-spacing -> bottom-system-spacing

input/regression/page-spacing-first-system-spacing.ly [deleted file]
input/regression/page-spacing-first-system-title-spacing.ly [deleted file]
input/regression/page-spacing-loose-lines-header-padding.ly
input/regression/page-spacing-top-system-spacing.ly [new file with mode: 0644]
input/regression/page-spacing-top-title-spacing.ly [new file with mode: 0644]
lily/page-breaking.cc
lily/page-layout-problem.cc
ly/paper-defaults-init.ly
scm/page.scm

diff --git a/input/regression/page-spacing-first-system-spacing.ly b/input/regression/page-spacing-first-system-spacing.ly
deleted file mode 100644 (file)
index 82f7b4e..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-\version "2.13.2"
-
-#(set-default-paper-size "a6")
-
-\book {
-
-  \header {
-    texidoc = "first-system-spacing controls the spacing to the first
-non-title staff on every page."
-    title = "Title"
-  }
-
-  \paper {
-    first-system-spacing = #'((minimum-distance . 30))
-    ragged-bottom = ##t
-  }
-
-  { c'1 \pageBreak c'1 }
-}
\ No newline at end of file
diff --git a/input/regression/page-spacing-first-system-title-spacing.ly b/input/regression/page-spacing-first-system-title-spacing.ly
deleted file mode 100644 (file)
index e6117fc..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-\version "2.13.2"
-
-#(set-default-paper-size "a6")
-
-\book {
-
-  \header {
-    texidoc = "first-system-title-spacing controls the spacing to the title,
-provided that it is the first system on a page."
-    title = "Title"
-  }
-
-  \paper {
-    first-system-title-spacing = #'((minimum-distance . 30))
-    ragged-bottom = ##t
-  }
-
-  { c'1 \pageBreak c'1 }
-}
\ No newline at end of file
index a3262da1c6c6e55a56fac3c8f3e3c69df7dc2349..fca9e620b658a6a6de13b29d21fa596529b7d7c6 100644 (file)
@@ -9,8 +9,8 @@ line, whether or not it is spaceable."
 
 \book {
   \paper {
-    first-system-spacing = #'((space . 1) (padding . 10))
-    last-system-spacing = #'((space . 1) (padding . 10))
+    top-system-spacing = #'((space . 1) (padding . 10))
+    bottom-system-spacing = #'((space . 1) (padding . 10))
     annotate-spacing = ##t
     ragged-last-bottom = ##f
   }
diff --git a/input/regression/page-spacing-top-system-spacing.ly b/input/regression/page-spacing-top-system-spacing.ly
new file mode 100644 (file)
index 0000000..dbb1689
--- /dev/null
@@ -0,0 +1,19 @@
+\version "2.13.2"
+
+#(set-default-paper-size "a6")
+
+\book {
+
+  \header {
+    texidoc = "top-system-spacing controls the spacing to the first
+non-title staff on every page."
+    title = "Title"
+  }
+
+  \paper {
+    top-system-spacing = #'((minimum-distance . 30))
+    ragged-bottom = ##t
+  }
+
+  { c'1 \pageBreak c'1 }
+}
\ No newline at end of file
diff --git a/input/regression/page-spacing-top-title-spacing.ly b/input/regression/page-spacing-top-title-spacing.ly
new file mode 100644 (file)
index 0000000..823b62f
--- /dev/null
@@ -0,0 +1,19 @@
+\version "2.13.2"
+
+#(set-default-paper-size "a6")
+
+\book {
+
+  \header {
+    texidoc = "@var{top-title-spacing} controls the spacing
+from the top margin to a title (or markup), provided that it is
+the first system on a page."
+    title = "Title" }
+
+  \paper {
+    top-title-spacing = #'((minimum-distance . 30))
+    ragged-bottom = ##t
+  }
+
+  { c'1 \pageBreak c'1 }
+}
\ No newline at end of file
index 8dc19ef3576adc8dff840bcf962fb2f8b65b6680..1b61f3825846964b80f4a275b7af4f225a411faf 100644 (file)
@@ -1365,9 +1365,9 @@ Page_breaking::last_break_position () const
 Real
 Page_breaking::min_whitespace_at_top_of_page (Line_details const &line) const
 {
-  SCM first_system_spacing = book_->paper_->c_variable ("first-system-spacing");
+  SCM first_system_spacing = book_->paper_->c_variable ("top-system-spacing");
   if (line.title_)
-    first_system_spacing = book_->paper_->c_variable ("first-system-title-spacing");
+    first_system_spacing = book_->paper_->c_variable ("top-title-spacing");
 
   Real min_distance = -infinity_f;
   Real padding = 0;
@@ -1386,7 +1386,7 @@ Page_breaking::min_whitespace_at_top_of_page (Line_details const &line) const
 Real
 Page_breaking::min_whitespace_at_bottom_of_page (Line_details const &line) const
 {
-  SCM last_system_spacing = book_->paper_->c_variable ("last-system-spacing");
+  SCM last_system_spacing = book_->paper_->c_variable ("bottom-system-spacing");
   Real min_distance = -infinity_f;
   Real padding = 0;
 
index fb9e27d12bb95f8bf5faa1561af1a5acabf7334d..d409d3405a7d91a22582d54023598f72ec259742 100644 (file)
@@ -64,13 +64,13 @@ Page_layout_problem::Page_layout_problem (Paper_book *pb, SCM page_scm, SCM syst
       after_title_spacing = paper->c_variable ("after-title-spacing");
       before_title_spacing = paper->c_variable ("before-title-spacing");
       between_title_spacing = paper->c_variable ("between-title-spacing");
-      last_system_spacing = paper->c_variable ("last-system-spacing");
-      first_system_spacing = paper->c_variable ("first-system-spacing");
+      last_system_spacing = paper->c_variable ("bottom-system-spacing");
+      first_system_spacing = paper->c_variable ("top-system-spacing");
       if (scm_is_pair (systems) && unsmob_prob (scm_car (systems)))
-       first_system_spacing = paper->c_variable ("first-system-title-spacing");
+       first_system_spacing = paper->c_variable ("top-title-spacing");
 
       // Note: the page height here does _not_ reserve space for headers and
-      // footers. This is because we want to anchor the first-system-spacing
+      // footers. This is because we want to anchor the top-system-spacing
       // spring at the _top_ of the header.
       page_height_ -= robust_scm2double (paper->c_variable ("top-margin"), 0)
        + robust_scm2double (paper->c_variable ("bottom-margin"), 0);
@@ -131,7 +131,7 @@ Page_layout_problem::Page_layout_problem (Paper_book *pb, SCM page_scm, SCM syst
     {
       Real bottom_padding;
 
-      // TODO: junk bottom-space now that we have last-system-spacing?
+      // TODO: junk bottom-space now that we have bottom-system-spacing?
       // bottom-space has the flexibility that one can do it per-system.
       // NOTE: bottom-space is misnamed since it is not stretchable space.
       if (Prob *p = elements_.back ().prob)
index ab598e5a460830aa508c2ac63fd2ee1630524154..9bffbff7dc3ab4e9558ba5985e3427ece6cad739 100644 (file)
@@ -45,9 +45,9 @@
     after-title-spacing = #'((space . 2) (padding . 0.5))
     before-title-spacing = #'((space . 5) (padding . 0.5))
     between-title-spacing = #'((space . 1) (padding . 0.5))
-    first-system-spacing = #'((space . 1) (padding . 1) (min-distance . 0))
-    first-system-title-spacing = #'((space . 1) (padding . 1) (min-distance . 0))
-    last-system-spacing = #'((space . 1) (padding . 1) (min-distance . 0) (stretchability . 5))
+    top-system-spacing = #'((space . 1) (padding . 1) (min-distance . 0))
+    top-title-spacing = #'((space . 1) (padding . 1) (min-distance . 0))
+    bottom-system-spacing = #'((space . 1) (padding . 1) (min-distance . 0) (stretchability . 5))
 
     ragged-bottom = ##f
 
index 2b63218766f7f6ab3690133e7b5bb91d362db497..ca4e0d8659ddeba0b1f2bcb26cb05aab2f9303bd 100644 (file)
@@ -88,8 +88,8 @@
 (define (annotate-top-space first-system layout header-stencil stencil)
   (let* ((top-margin (ly:output-def-lookup layout 'top-margin))
         (sym (if (paper-system-title? first-system)
-                 'first-system-title-spacing
-                 'first-system-spacing))
+                 'top-title-spacing
+                 'top-system-spacing))
         (spacing-spec (ly:output-def-lookup layout sym))
         (X-offset (ly:prob-property first-system 'X-offset 5))
         (header-extent (ly:stencil-extent header-stencil Y)))