Offsets is a list of increasing numbers. They must be negated to
create offsets.
"
+
(let* ((topmargin (ly:output-def-lookup layout 'topmargin))
;; TODO: naming vsize/hsize not analogous to TeX.
(system-separator-markup (ly:output-def-lookup layout 'systemSeparatorMarkup))
(system-separator-stencil (if (markup? system-separator-markup)
(interpret-markup layout
- (page-properties layout)
+ (layout-extract-page-properties layout)
system-separator-markup)
#f))
(lmargin (ly:output-def-lookup layout 'leftmargin))
(if #f
(display (list
- "leftmargin" leftmargin "rightmargin" rightmargin)))
+ "leftmargin " leftmargin "rightmargin " rightmargin
+ )))
(set! page-stencil (ly:stencil-combine-at-edge
- page-stencil Y DOWN head 0. 0.))
+ page-stencil Y DOWN
+ (if (and
+ (ly:stencil? head)
+ (not (ly:stencil-empty? head)))
+ head
+ (ly:make-stencil "" (cons 0 0) (cons 0 0)))
+ 0. 0.))
(map add-system (zip lines offsets))
- (if (ly:stencil? foot)
+ (if (and (ly:stencil? foot)
+ (not (ly:stencil-empty? foot)))
(set! page-stencil
(ly:stencil-add
page-stencil
(define (line-number node)
(ly:paper-system-number (car (node-lines node))))
- (display (_ "Calculating page breaks...") (current-error-port))
+ (ly:message (_ "Calculating page breaks..."))
(let* ((best-break-node (walk-lines '() '() lines))
(break-nodes (get-path best-break-node '()))
(define (node->page-stencil node)
(if (not (eq? node last-node))
- (display "[" (current-error-port)))
+ (ly:progress "["))
(let ((stencil
((ly:output-def-lookup paper 'page-make-stencil)
(node-lines node)
(eq? node best-break-node))))
(if (not (eq? node last-node))
(begin
- (display (car (last-pair (node-system-numbers node)))
- (current-error-port))
- (display "]" (current-error-port))))
+ (ly:progress (number->string
+ (car (last-pair (node-system-numbers node)))))
+ (ly:progress "]")))
stencil))
(if #f; (ly:get-option 'verbose)
"\nconfigs " (map node-configuration break-nodes))))
(let ((stencils (map node->page-stencil break-nodes)))
- (newline (current-error-port))
+ (ly:progress "\n")
stencils)))