]> git.donarmstrong.com Git - lilypond.git/commitdiff
Rename paper variables: blank-*-force -> blank-*-penalty (2735)
authorTrevor Daniels <t.daniels@treda.co.uk>
Fri, 17 Aug 2012 22:47:52 +0000 (23:47 +0100)
committerTrevor Daniels <t.daniels@treda.co.uk>
Wed, 22 Aug 2012 08:38:19 +0000 (09:38 +0100)
 - update code and documentation

 - add convert-ly rule

Documentation/notation/spacing.itely
lily/page-breaking.cc
ly/paper-defaults-init.ly
python/convertrules.py

index 97c7b9813a466743165d2b7ed5c1032f5aeb6d1c..920a398f0b56ca0265202fbdc8196c5d4f5f0d88 100644 (file)
@@ -908,31 +908,31 @@ will be the associated action relative to other choices.
 
 @table @code
 
-@item blank-page-force
-@funindex blank-page-force
+@item blank-page-penalty
+@funindex blank-page-penalty
 
 The penalty for having a blank page in the middle of a score.  If
-@code{blank-page-force} is large and @code{ly:page-turn-breaking} is
+@code{blank-page-penalty} is large and @code{ly:page-turn-breaking} is
 selected, then LilyPond will be less likely to insert a page in the
 middle of a score.  Instead, it will space out the music further to
 fill the blank page and the following one.  Default: 5.
 
-@item blank-last-page-force
-@funindex blank-last-page-force
+@item blank-last-page-penalty
+@funindex blank-last-page-penalty
 
 The penalty for ending the score on an even-numbered page.  If
-@code{blank-last-page-force} is large and
+@code{blank-last-page-penalty} is large and
 @code{ly:page-turn-breaking} is selected, then LilyPond will be less
 likely to produce a score in which the last page is even-numbered.
 Instead, it will adjust the spacing in order to use one page more or
 one page less.  Default: 0.
 
-@item blank-after-score-page-force
-@funindex blank-after-score-page-force
+@item blank-after-score-page-penalty
+@funindex blank-after-score-page-penalty
 
 The penalty for having a blank page after the end of one score and
 before the next.  By default, this is smaller than
-@code{blank-page-force}, so that blank pages after scores are
+@code{blank-page-penalty}, so that blank pages after scores are
 inserted in preference to blank pages within a score.  Default: 2.
 
 @end table
index 692244b897063daab340b814da73529beee58642..18582a607dee8abd6f5fffa41eef553752641c61 100644 (file)
@@ -1224,11 +1224,11 @@ Page_breaking::blank_page_penalty () const
   SCM penalty_sym;
 
   if (is_last ())
-    penalty_sym = ly_symbol2scm ("blank-last-page-force");
+    penalty_sym = ly_symbol2scm ("blank-last-page-penalty");
   else if (ends_score ())
-    penalty_sym = ly_symbol2scm ("blank-after-score-page-force");
+    penalty_sym = ly_symbol2scm ("blank-after-score-page-penalty");
   else
-    penalty_sym = ly_symbol2scm ("blank-page-force");
+    penalty_sym = ly_symbol2scm ("blank-page-penalty");
 
   Break_position const &pos = breaks_[current_end_breakpoint_];
   if (Paper_score *ps = system_specs_[pos.system_spec_index_].pscore_)
index 79566954fce8e8ef9ffc39a671ff6d66171d5c14..4bde252d17b4bcb14ec67184ca109699609b470e 100644 (file)
@@ -97,9 +97,9 @@
   %%
   %% Page breaking
   %%
-  blank-after-score-page-force = 2
-  blank-last-page-force = 0
-  blank-page-force = 5
+  blank-after-score-page-penalty = 2
+  blank-last-page-penalty = 0
+  blank-page-penalty = 5
   page-breaking = #ly:optimal-breaking
 
 
index 44ecf049e78c04e5691e1fa1a2c142f2b731836b..b3aa1676c0dae090fc2434b0cc2b3e2c941ef95c 100644 (file)
@@ -3380,6 +3380,13 @@ def conv (str):
     str = re.sub ('\n"(' + wordsyntax + r')"(\s*=\s*\\stringTuning)', "\n\\1\\2", str)
     return str
 
+@rule ((2, 17, 0), r"blank-*-force -> blank-*-penalty")
+def conv (str):
+    str = re.sub ('blank-page-force', 'blank-page-penalty', str)
+    str = re.sub ('blank-last-page-force', 'blank-last-page-penalty', str)
+    str = re.sub ('blank-after-score-page-force', 'blank-after-score-page-penalty', str)
+    return str
+
 # Guidelines to write rules (please keep this at the end of this file)
 #
 # - keep at most one rule per version; if several conversions should be done,