1 #(set-global-staff-size 16)
4 %% ugh. text on toplevel is a bit broken...
6 oddHeaderMarkup = \markup {}
7 evenHeaderMarkup = \markup {}
8 oddFooterMarkup = \markup {}
9 evenFooterMarkup = \markup {}
14 #(define (doc-char name)
15 (let* ((n (string-length name)))
17 ;; split long glyph names near the middle at dots
18 (let* ((middle-pos (round (/ n 2)))
19 (left-dot-pos (string-rindex name #\. 0 middle-pos))
20 (right-dot-pos (string-index name #\. middle-pos))
21 (left-distance (if (number? left-dot-pos)
22 (- middle-pos left-dot-pos)
24 (right-distance (if (number? right-dot-pos)
25 (- right-dot-pos middle-pos)
27 (split-pos (if (> left-distance right-distance)
30 (left (substring name 0 split-pos))
31 (right (substring name split-pos)))
34 (make-pad-to-box-markup
39 (make-typewriter-markup left)
40 (make-typewriter-markup
43 (make-pad-to-box-markup
46 (make-huge-markup (make-musicglyph-markup name))))))
49 (make-pad-to-box-markup
52 (make-typewriter-markup name))
53 (make-pad-to-box-markup
56 (make-huge-markup (make-musicglyph-markup name))))))))
58 #(define (min-length lst n)
59 "(min (length lst) n)"
60 (if (or (null? lst) (<= n 0))
62 (1+ (min-length (cdr lst) (1- n)))))
64 #(define (doc-chars names acc)
66 ((n (min-length names 2))
68 (tail (drop names n)))
73 (make-line-markup (map doc-char head))
76 #(define (group-lines lines)
78 ((n (min-length lines 25))
80 (tail (drop lines n)))
82 (make-column-markup head)
85 (group-lines tail)))))
88 ((glyphs (delete ".notdef"
90 (ly:font-load "emmentaler-20"))))
91 (lines (doc-chars glyphs '()))
92 (pages (group-lines (reverse lines))))
95 (collect-scores-for-book
97 (make-override-markup '(word-space . 4) x)))