diff options
author | Joe Neeman <joeneeman@gmail.com> | 2006-07-24 11:50:27 +0000 |
---|---|---|
committer | Joe Neeman <joeneeman@gmail.com> | 2006-07-24 11:50:27 +0000 |
commit | 437c8d6e284659962049283969445dda7cd45642 (patch) | |
tree | fb887a263e427b3639ba4a8c80853edce9d11291 /scm | |
parent | 268a1921b8747a432d404c10fd93cbc7a2689678 (diff) |
* scm/define-grobs.scm (all-grob-descriptions): make NonMusicalPaperColumn
page-breakable by default
* scm/layout-page-layout.scm (space-systems): fix bug where the force isn't
correctly calculated for a single-system page
* scm/lily-library.scm (interval-sane?): check that the first number is no
bigger than the second number
* lily/simple-spacer.cc (solve): allow compression even when ragged (but we
acknowledge that we aren't satisfying constraints)
* lily/hara-kiri-group-spanner.cc (request_suicide): give equal treatment to
non-Items
* lily/grob.cc (pure_height): add minimum-Y-extent
* lily/gourlay-breaking.cc (solve): don't ignore a compression force, even if we're
ragged
* lily/constrained-breaking.cc: convert code to use new Matrix class
(get_best_solution): new function
* scm/page.scm (make-page-stencil): don't crash if we annotate-layout when there
is a page with no systems
Diffstat (limited to 'scm')
-rw-r--r-- | scm/define-grobs.scm | 1 | ||||
-rw-r--r-- | scm/layout-page-layout.scm | 12 | ||||
-rw-r--r-- | scm/lily-library.scm | 3 | ||||
-rw-r--r-- | scm/page.scm | 9 |
4 files changed, 16 insertions, 9 deletions
diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index a8e3c092c4..b0d023b2be 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -1140,6 +1140,7 @@ (non-musical . #t) (line-break-permission . allow) + (page-break-permission . allow) ;; debugging stuff: print column number. ;; (font-size . -6) (font-name . "sans") (Y-extent . #f) diff --git a/scm/layout-page-layout.scm b/scm/layout-page-layout.scm index f00fbf1ca0..8756062384 100644 --- a/scm/layout-page-layout.scm +++ b/scm/layout-page-layout.scm @@ -127,18 +127,24 @@ is what have collected so far, and has ascending page numbers." (define (space-systems page-height lines ragged? paper) "Compute lines positions on page: return force and line positions as a pair. force is #f if lines do not fit on page." - (let* ((springs (map (lambda (prev-line line) + (let* ((empty-stencil (ly:make-stencil '() '(0 . 0) '(0 . 0))) + (empty-prob (ly:make-prob 'paper-system (list `(stencil . ,empty-stencil)))) + (cdr-lines (append (cdr lines) + (if (<= (length lines) 1) + (list empty-prob) + '()))) + (springs (map (lambda (prev-line line) (list (line-ideal-distance prev-line line paper) (/ 1.0 (line-next-space prev-line line paper)))) lines - (cdr lines))) + cdr-lines)) (rods (map (let ((i -1)) (lambda (prev-line line) (set! i (1+ i)) (list i (1+ i) (line-minimum-distance prev-line line paper)))) lines - (cdr lines))) + cdr-lines)) (last-line (car (last-pair lines))) (topskip (first-line-position (first lines) paper)) (space-to-fill (- page-height diff --git a/scm/lily-library.scm b/scm/lily-library.scm index d178c6926c..bb7e7a32a8 100644 --- a/scm/lily-library.scm +++ b/scm/lily-library.scm @@ -383,7 +383,8 @@ found." (not (or (nan? (car i)) (inf? (car i)) (nan? (cdr i)) - (inf? (cdr i))))) + (inf? (cdr i)) + (> (car i) (cdr i))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/scm/page.scm b/scm/page.scm index a572e44102..258589ae53 100644 --- a/scm/page.scm +++ b/scm/page.scm @@ -314,8 +314,10 @@ create offsets. (foot (prop 'foot-stencil)) ) - (if (or (annotate? layout) - (ly:output-def-lookup layout 'annotate-systems #f)) + (if (and + (or (annotate? layout) + (ly:output-def-lookup layout 'annotate-systems #f)) + (pair? lines)) (begin (for-each (lambda (sys next-sys) @@ -386,9 +388,6 @@ create offsets. (let* ((p-book (page-property page 'paper-book)) (layout (ly:paper-book-paper p-book)) - (scopes (ly:paper-book-scopes p-book)) - (number (page-page-number page)) - (last? (page-property page 'is-last)) (h (- (ly:output-def-lookup layout 'paper-height) (ly:output-def-lookup layout 'top-margin) (ly:output-def-lookup layout 'bottom-margin))) |