Home
Random
Log in
Settings
About LilyPond wiki
LilyPond wiki
Search
Editing
Separating footers with a horizontal line
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
Separating footers from the main content of the page using a horizontal line can be done by altering the <code>oddFooterMarkup</code> paper variable (and <code>evenFooterMarkup</code>, if they should be different). However, this requires printing the horizontal line only if any footer is shown on that page; this snippet demonstrates how to program such a condition. <lilypond version="2.24" full> #(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) ;; on-first-page-of-part copied from ly/titling-init.ly (= (chain-assoc-get 'page:page-number props -1) (ly:output-def-lookup layout 'first-page-number))) (and (chain-assoc-get 'header:tagline props) ;; on-last-page (two following conditions) (chain-assoc-get 'page:is-bookpart-last-page props #f) (chain-assoc-get 'page:is-last-bookpart props #f))) (interpret-markup layout props arg) empty-stencil)) \header { tagline = "Special tagline" } \paper { #(set-paper-size "a9landscape") oddFooterMarkup = \markup \center-column { \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. \if \on-first-page-of-part \fill-line { \fromproperty #'header:copyright } %% Tagline only on last page in each book. \if \on-last-page \fill-line { \fromproperty #'header:tagline } } } \bookpart { \markup "(Public Domain content)" } \bookpart { \header { copyright = "Β©" } \markup "(Copyright content)" \pageBreak \markup \column { "(no Copyright statement""on subsequent page)" } } \bookpart { \markup "(final page with tagline)" } </lilypond> [[Category:Non-music]] [[Category:Paper and layout]] [[Category:Stylesheet]] [[Category:Titles]]
Summary:
Please note that all contributions to LilyPond wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Meta:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)