]> git.donarmstrong.com Git - lilypond.git/commitdiff
(get_line): extract page-penalty from the left
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 12 Jun 2004 23:01:43 +0000 (23:01 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 12 Jun 2004 23:01:43 +0000 (23:01 +0000)
bound.

ChangeLog
Documentation/user/notation.itely
lily/book.cc
lily/paper-book.cc
lily/system.cc
scm/document-markup.scm

index a1a649e5019b40bc3c992b0e8a7ae301b3f200fd..70190456c219c3c3e9d48bdc528d7a7f823895ee 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-06-13  Han-Wen Nienhuys   <hanwen@xs4all.nl>
+
+       * lily/system.cc (get_line): extract page-penalty from the left
+       bound.
+
+       * scm/fret-diagrams.scm (fret-diagram): use @table for documentation
+
 2004-06-12  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
        * scm/framework-ps.scm: don't load output-XXX from framework-XXX
@@ -66,7 +73,7 @@
 
        * ly/engraver-init.ly (AncientRemoveEmptyStaffContext): remove
        override of Beam::position-callbacks. Why would grace beams not be
-       quantized? Fixes: weird-stem-size-grace. Backportme.
+       quantized? Fixes: weird-stem-size-grace. 
 
        * lily/new-lyric-combine-music-iterator.cc (find_voice): issue
        warning only once. Backportme.
index e14580f87f5bcff7758aef9e8d5666068fe9d201..bae708cb0e188201bc772142c02cdab62f7164a3 100644 (file)
@@ -233,6 +233,8 @@ note with the @code{\rest} keyword appended. This makes manual
 formatting in polyphonic music easier.  Rest collision testing will
 leave these rests alone
 
+@cindex @code{\rest}
 @lilypond[quote,raggedright,verbatim]
 a'4\rest d'4\rest
 @end lilypond
@@ -292,6 +294,9 @@ Program reference: @internalsref{SkipEvent}, @internalsref{SkipMusic}.
 
 
 @cindex duration
+@cindex @code{\longa}
+@cindex @code{\breve}
+@cindex @code{\maxima}
 
 
 In Note, Chord, and Lyrics mode, durations are designated by numbers
@@ -1086,6 +1091,8 @@ indicating how much of the measure has passed at this point.
 @node Unmetered music
 @subsection Unmetered music
 
+@cindex @code{\bar}
+
 Bar lines and bar numbers are calculated automatically. For unmetered
 music (e.g. cadenzas), this is not desirable.  By setting
 @code{Score.timing} to false, this automatic timing can be switched
@@ -1099,7 +1106,6 @@ off. Empty bar lines,
 indicate where line breaks can occur.
 
 
-
 @refcommands
 
 @cindex @code{\cadenzaOn}
@@ -1211,6 +1217,8 @@ The easiest way to enter fragments with more than one voice on a staff
 is to split chords using the separator @code{\\}.  You can use it for
 small, short-lived voices or for single chords
 
+@cindex @code{\\}
+
 @lilypond[quote,verbatim,fragment]
 \context Staff \relative c'' {
   c4 << { f d e  } \\ { b c2 } >>
@@ -1268,8 +1276,8 @@ Similarly, you can merge half note heads with eighth notes, by setting
 c8 c4. } \\ { c2 c2 } >>
 @end lilypond
 
-LilyPond also vertically shifts rests that are opposite of a stem
-
+LilyPond also vertically shifts rests that are opposite of a stem,
+for example
 
 @lilypond[quote,raggedright,fragment,verbatim]
 \context Voice << c''4 \\  r4 >>
index 267b5a6fac4464a53d6c84ad98a28c652df7da19..789c368078296146403dae13fbfb559f13618e40 100644 (file)
@@ -69,7 +69,6 @@ Paper_book *
 Book::process (String outname, Output_def *default_def)
 {
   Paper_book *paper_book = new Paper_book ();
-        
   Real scale = ly_scm2double (bookpaper_->c_variable ("outputscale"));
   
   Output_def * scaled_bookdef = scale_output_def (bookpaper_, scale);
index 9836726869f3ef460bb1e5c18fb1d6ee61d5b8cf..39c3f5f7aa8e9251f723014b3b98be442232b51b 100644 (file)
@@ -420,11 +420,11 @@ Paper_book::pages ()
   SCM all = lines ();
   SCM proc = paper->c_variable ("page-breaking");
   SCM pages = scm_apply_0 (proc, scm_list_n (all,
-                                             self_scm (),
-                                             scm_make_real (text_height),
-                                             scm_make_real (-copy_height),
-                                             scm_make_real (-tag_height),
-                                             SCM_UNDEFINED));
+                                            self_scm (),
+                                            scm_make_real (text_height),
+                                            scm_make_real (-copy_height),
+                                            scm_make_real (-tag_height),
+                                            SCM_UNDEFINED));
 
 
   SCM *page_tail = &pages_;
index caab3a2bb5d0bee4adc1f9d0cc734c4783ea8a3c..401cca393abe60baa9ee4867e257d8006d395287 100644 (file)
@@ -339,7 +339,6 @@ System::get_line ()
   SCM exprs = SCM_EOL;
   SCM *tail = &exprs;
 
-  Real penalty = 0;
   for (int i = LAYER_COUNT; i--;)
     for (SCM s = all; ly_c_pair_p (s); s = ly_cdr (s))
       {
@@ -366,31 +365,10 @@ System::get_line ()
        *tail = scm_cons (st.expr (), SCM_EOL);
        tail = SCM_CDRLOC(*tail);
        
-       /*
-         UGH. back-end should extract this info from the System? 
-        */
-       if (g->original_)
-         {
-           /*
-             Huh ? penalties from all columns are added ??!! --hwn
-            */
-           if (Item *it = dynamic_cast <Item*> (g))
-             {
-               Grob *col = it->get_column ();
-               SCM s = col->get_property ("page-penalty");
-               
-               // FIXME; page breaking is not discrete at +-10000
-               if (ly_c_number_p (s)) // && fabs (ly_scm2double (s)) < 10000)
-                 penalty += ly_scm2double (s);
-             }
-         }
       }
 
-  /*
-    TODO: fix user penalties.
-    
-    */
   
+
   Interval x (extent (this, X_AXIS));
   Interval y (extent (this, Y_AXIS));
   Stencil sys_stencil (Box (x,y),
@@ -399,6 +377,12 @@ System::get_line ()
   
   Paper_line *pl = new Paper_line (sys_stencil, false);
 
+
+
+  Item * break_point =this->get_bound(LEFT);
+  pl->penalty_ =
+    robust_scm2double (break_point->get_property ("page-penalty"), 0.0);
+  
   return scm_gc_unprotect_object (pl->self_scm ());
 }
 
index 77c5d5228a2d1414d3eb75b327bfa18ce4b99fdc..ad02d4f3eded0dfd14ec4e3498555e7244a35e52 100644 (file)
@@ -7,8 +7,7 @@
 
 (define (doc-markup-function func)
   (let*
-      (
-       (doc-str  (procedure-documentation func) )
+      ((doc-str  (procedure-documentation func) )
        (f-name (symbol->string (procedure-name  func)))
        (c-name (regexp-substitute/global #f "-markup$" f-name  'pre "" 'post))
        (sig (object-property func 'markup-signature))