solutions are now optimal too.
* input/test/page-breaks.ly: New file.
* scm/page-layout.scm (ly:optimal-page-breaks): Bugfix: underful
solutions are now optimal too.
+ * input/test/page-breaks.ly: New file.
+
* lily/paper-outputter.cc (Paper_outputter): Import page breaking
functions into safe module.
--- /dev/null
+\version "2.1.30"
+
+\header {
+ texidoc = "Stress optimal page breaking. This should look nice on 4 a6 pages."
+ copyright = "Copyright by /me"
+
+ title = "Title"
+ subtitle = "(and (the) subtitle)"
+ subsubtitle = "Sub sub title"
+ poet = "Poet"
+ composer = "Composer"
+ texttranslator = "Text Translator"
+ opus = "opus 0"
+ meter = "Meter (huh?)"
+ arranger = "Arranger"
+ instrument = "Instrument"
+ piece = "Piece"
+}
+
+\score {
+ \context Staff \notes \relative c' {
+ %% 16: ideally cramped
+ %% 17: very bad without density
+ \repeat unfold 17 { a b c d \break }
+ }
+ \paper {
+ %% #(set-paper-size "a6")
+ linewidth = 80\mm
+ vsize = 150 \mm
+ hsize = 105 \mm
+ #(define page-breaking ly:optimal-page-breaks)
+ }
+}
%% stress page breaking:
%% 35 keep on 3 pages
%% 36 spread evenly over 4 pages
- \repeat unfold 35 { a b c d \break }
+ \repeat unfold 36 { a b c d \break }
c1
}
}
(hh (make-node '() (node-line node) 0 0 height))
(break-score (robust-break-score node))
(density-score (if (null? paths) 0
- (* 0 (density-variance
+ ;; TODO: find out why we need density
+ ;; use other height-score parameters?
+ ;; See: input/test/page-breaks.ly
+ (* 1 (density-variance
(cons hh (get-path (car paths)))))))
(page-score (height-score page height))
(this-score (add-scores page-score break-score density-score))