release commit
[lilypond.git] / ly / book-paper-defaults.ly
blobbb344e921e920015fae23f6e2d59ad98de4f3011
1 \version "2.3.2"
2 \bookpaper {
4 #(define-public (book-title paper scopes)
5 "Generate book title from header strings."
7 (define (get sym)
8 (let ((x (ly:modules-lookup scopes sym)))
9 (if (and x (not (unspecified? x))) x "")))
11 (let ((props (page-properties paper)))
13 (interpret-markup
14 paper props
15 (markup
16 #:column
17 (#:override '(baseline-skip . 4)
18 #:column
19 (#:fill-line
20 (#:normalsize (get 'dedication))
21 #:fill-line
22 (#:huge #:bigger #:bigger #:bigger #:bigger #:bold (get 'title))
23 #:override '(baseline-skip . 3)
24 #:column
25 (#:fill-line
26 (#:large #:bigger #:bigger #:bold (get 'subtitle))
27 #:fill-line (#:bigger #:bigger #:bold (get 'subsubtitle)))
28 #:override '(baseline-skip . 5)
29 #:column ("")
30 #:override '(baseline-skip . 2.5)
31 #:column
32 (#:fill-line
33 (#:bigger (get 'poet) #:large #:bigger #:caps (get 'composer))
34 #:fill-line (#:bigger (get 'texttranslator) #:bigger (get 'opus))
35 #:fill-line
36 (#:bigger (get 'meter) #:bigger (get 'arranger))
38 #:fill-line (#:large #:bigger (get 'instrument))
39 " "
40 #:fill-line (#:large #:bigger #:caps (get 'piece) ""))))))))
42 #(define-public (user-title paper markup)
43 "Generate book title from header markup."
44 (if (markup? markup)
45 (let ((props (page-properties paper))
46 (baseline-skip (chain-assoc-get 'baseline-skip props 2)) )
47 (stack-lines DOWN 0 BASELINE-SKIP
48 (list (interpret-markup paper props markup))))))
50 #(define-public (score-title paper scopes)
51 "Generate score title from header strings."
53 (define (get sym)
54 (let ((x (ly:modules-lookup scopes sym)))
55 (if (and x (not (unspecified? x))) x "")))
57 (let ((props (page-properties paper)))
59 (interpret-markup
60 paper props
61 (markup
62 #:column
63 (#:override '(baseline-skip . 4)
64 #:column
65 (#:fill-line
66 ("" (get 'opus))
67 #:fill-line (#:large #:bigger #:caps (get 'piece) "")))))))
70 papersize = "a4"