3 slashSeparator = \markup {
7 \raise #0.7 \beam #2.0 #0.5 #0.48
11 \pad-to-box #'(0 . 0) #'(0 . 3)
14 #"http://lilypond.org/"
19 #(format #f "Music engraving by LilyPond ~a~awww.lilypond.org"
21 (ly:wide-char->utf-8 #x2014)
27 #(define (print-all-headers layout props arg)
28 (if (eq? (ly:output-def-lookup layout 'print-all-headers) #t)
29 (interpret-markup layout props arg)
32 bookTitleMarkup = \markup {
33 \override #'(baseline-skip . 3.5)
35 \fill-line { \fromproperty #'header:dedication }
36 \override #'(baseline-skip . 3.5)
39 \huge \larger \larger \bold
40 \fromproperty #'header:title
44 \fromproperty #'header:subtitle
48 \fromproperty #'header:subsubtitle
51 \fromproperty #'header:poet
52 { \large \bold \fromproperty #'header:instrument }
53 \fromproperty #'header:composer
56 \fromproperty #'header:meter
57 \fromproperty #'header:arranger
63 scoreTitleMarkup = \markup { \column {
64 \on-the-fly \print-all-headers { \bookTitleMarkup \hspace #1 }
66 \fromproperty #'header:piece
67 \fromproperty #'header:opus
72 %% Book first page and last page predicates
73 #(define (book-first-page? layout props)
74 "Return #t iff the current page number, got from @code{props}, is the
76 (define (ancestor layout)
77 "Return the topmost layout ancestor"
78 (let ((parent (ly:output-def-parent layout)))
79 (if (not (ly:output-def? parent))
82 (= (chain-assoc-get 'page:page-number props -1)
83 (ly:output-def-lookup (ancestor layout) 'first-page-number)))
85 #(define (book-last-page? layout props)
86 "Return #t iff the current page number, got from @code{props}, is the
88 (and (chain-assoc-get 'page:is-bookpart-last-page props #f)
89 (chain-assoc-get 'page:is-last-bookpart props #f)))
91 #(define (first-page layout props arg)
92 (if (book-first-page? layout props)
93 (interpret-markup layout props arg)
96 #(define (last-page layout props arg)
97 (if (book-last-page? layout props)
98 (interpret-markup layout props arg)
101 #(define (not-first-page layout props arg)
102 (if (not (book-first-page? layout props))
103 (interpret-markup layout props arg)
106 #(define ((on-page nmbr) layout props arg)
107 (if (= (chain-assoc-get 'page:page-number props -1) nmbr)
108 (interpret-markup layout props arg)
111 %% Bookpart first page and last page predicates
112 #(define (part-first-page? layout props)
113 (= (chain-assoc-get 'page:page-number props -1)
114 (ly:output-def-lookup layout 'first-page-number)))
116 #(define (part-last-page? layout props)
117 (chain-assoc-get 'page:is-bookpart-last-page props #f))
119 #(define (part-first-page layout props arg)
120 (if (part-first-page? layout props)
121 (interpret-markup layout props arg)
124 #(define (not-part-first-page layout props arg)
125 (if (not (part-first-page? layout props))
126 (interpret-markup layout props arg)
129 #(define (part-last-page layout props arg)
130 (if (part-last-page? layout props)
131 (interpret-markup layout props arg)
135 #(define (not-single-page layout props arg)
136 (if (not (and (= (chain-assoc-get 'page:page-number props -1)
137 (ly:output-def-lookup layout 'first-page-number))
138 (chain-assoc-get 'page:last? props -1)))
139 (interpret-markup layout props arg)
142 #(define (create-page-number-stencil layout props arg)
143 (if (eq? (ly:output-def-lookup layout 'print-page-number) #t)
144 (interpret-markup layout props arg)
147 #(define (print-page-number-check-first layout props arg)
148 (if (or (not (book-first-page? layout props))
149 (eq? (ly:output-def-lookup layout 'print-first-page-number) #t))
150 (create-page-number-stencil layout props arg)
153 oddHeaderMarkup = \markup
155 %% force the header to take some space, otherwise the
156 %% page layout becomes a complete mess.
158 \on-the-fly #not-part-first-page \fromproperty #'header:instrument
159 \on-the-fly #print-page-number-check-first \fromproperty #'page:page-number-string
162 %% evenHeaderMarkup would inherit the value of
163 %% oddHeaderMarkup if it were not defined here
164 evenHeaderMarkup = \markup
166 \on-the-fly #print-page-number-check-first \fromproperty #'page:page-number-string
167 \on-the-fly #not-part-first-page \fromproperty #'header:instrument
171 oddFooterMarkup = \markup {
174 %% Copyright header field only on first page in each bookpart.
175 \on-the-fly #part-first-page \fromproperty #'header:copyright
178 %% Tagline header field only on last page in the book.
179 \on-the-fly #last-page \fromproperty #'header:tagline
184 %% As long as evenFooterMarkup is unset, it inherits the value of
185 %% oddFooterMarkup, as if this were declared here:
186 % evenFooterMarkup = \oddFooterMarkup