Separating footers with a horizontal line: Difference between revisions
New snippet: Separating footers with a horizontal line |
remove spurious comment, add new comment for documentation |
||
| Line 3: | Line 3: | ||
<lilypond version="2.24" full> | <lilypond version="2.24" full> | ||
#(define (separator-condition layout props arg) | #(define (separator-condition layout props arg) | ||
;; only print `arg' if copyright and/or tagline is printed on that page | |||
(if (or (and (chain-assoc-get 'header:copyright props) | (if (or (and (chain-assoc-get 'header:copyright props) | ||
;on-first-page-of-part copied from ly/titling-init.ly | ;; on-first-page-of-part copied from ly/titling-init.ly | ||
(= (chain-assoc-get 'page:page-number props -1) | (= (chain-assoc-get 'page:page-number props -1) | ||
(ly:output-def-lookup layout 'first-page-number))) | (ly:output-def-lookup layout 'first-page-number))) | ||
(and (chain-assoc-get 'header:tagline props) | (and (chain-assoc-get 'header:tagline props) | ||
;on-last-page | ;; on-last-page (two following conditions) | ||
(chain-assoc-get 'page:is-bookpart-last-page props #f) | (chain-assoc-get 'page:is-bookpart-last-page props #f) | ||
(chain-assoc-get 'page:is-last-bookpart props #f))) | (chain-assoc-get 'page:is-last-bookpart props #f))) | ||
| Line 21: | Line 22: | ||
#(set-paper-size "a9landscape") | #(set-paper-size "a9landscape") | ||
oddFooterMarkup = \markup \center-column { | oddFooterMarkup = \markup \center-column { | ||
\on-the-fly \separator-condition \with-color #grey \override #'(span-factor . 1/3) \draw-hline | \on-the-fly \separator-condition \with-color #grey \override #'(span-factor . 1/3) \draw-hline | ||
%% Copyright header field only on first page in each bookpart. | %% Copyright header field only on first page in each bookpart. | ||