]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/layout-page-layout.scm
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / scm / layout-page-layout.scm
index 8370ea8a403aaa425039f6d0bff8cc75a99a7184..8a7628af857519d7c1dc0ec0bb8c718db029ab27 100644 (file)
 
   (define (handle-page page)
     (define index 0)
+    (define music-system-heights
+      (map-in-order (lambda (sys)
+                     (* -1 (car (paper-system-extent sys Y))))
+                   (remove (lambda (sys)
+                             (ly:prob-property? sys 'is-title))
+                           (page-lines page))))
     (define (handle-system sys)
       (let*
          ((props `((line-break . #t)
                     . ((system-Y-extent . ,(paper-system-extent sys Y))
                        (system-refpoint-Y-extent . ,(paper-system-staff-extents sys))
                        (system-index . ,index)
+                       (music-system-heights . ,music-system-heights)
                        (page-system-count . ,(length (page-lines page)))
                        (page-printable-height . ,(page-printable-height page)) 
                        (page-space-left . ,(page-property page 'space-left))))
@@ -311,7 +318,7 @@ is what have collected so far, and has ascending page numbers."
 
       (cons force positions)))
 
-  (define (walk-paths done-lines best-paths current-lines  last? current-best)
+  (define (walk-paths done-lines best-paths current-lines last? current-best)
     "Return the best optimal-page-break-node that contains
 CURRENT-LINES.  DONE-LINES.reversed ++ CURRENT-LINES is a consecutive
 ascending range of lines, and BEST-PATHS contains the optimal breaks
@@ -336,6 +343,7 @@ CURRENT-BEST is the best result sofar, or #f."
                             last?)))
            (height (page-printable-height this-page))
           (vertical-spacing (space-systems height current-lines ragged?))
+          
           (satisfied-constraints (car vertical-spacing))
            (force (if satisfied-constraints
                      (if (and last? ragged-last?)