;;;;
;;;; source file of the GNU LilyPond music typesetter
;;;;
-;;;; (c) 2004--2006 Jan Nieuwenhuizen <janneke@gnu.org>
+;;;; (c) 2004--2007 Jan Nieuwenhuizen <janneke@gnu.org>
;;;; Han-Wen Nienhuys <hanwen@xs4all.nl>
(define-module (scm layout-page-layout)
"Ideal distance between `line' reference position and `next-line'
reference position. If next-line is #f, return #f."
(and next-line
- (max (+ (max 0 (- (+ (interval-end (paper-system-staff-extents next-line))
- (if ignore-padding 0 (line-next-padding line next-line layout)))
- (interval-start (paper-system-staff-extents line))))
- (line-next-space line next-line layout))
- (line-minimum-distance line next-line layout ignore-padding))))
+ (max 0
+ (+ (- (+ (interval-end (paper-system-staff-extents next-line))
+ (if ignore-padding 0 (line-next-padding line next-line layout)))
+ (interval-start (paper-system-staff-extents line)))
+ (line-next-space line next-line layout)))))
(define (first-line-position line layout)
"Position of the first line on page"
(if prev-line prev-position 0.0)))
(bottom-position (- position
(interval-start (line-extent line)))))
- (and (or (not prev-line)
- (< bottom-position (page-printable-height page)))
- position)))
+ position))
(define (page-maximum-space-to-fill page lines paper)
"Return the space between the first line top position and the last line
(position (line-position-on-page
line prev-line prev-position page relative-positionning-fn)))
(if (null? (cdr lines))
- (and position
+ (max 0
(- (page-printable-height page)
(- position
(interval-start (line-extent line)))))