2

How do I make my footer allow overlapping with other markup?


I have defined my footer to show page numbering:

\paper {
  oddFooterMarkup = \markup 
    \fill-line { "" \on-the-fly #print-page-number-check-first \fromproperty #'page:page-number-string }
}

And I have a page that is completely full with markup (vertically). I added a \box for the footer and the last line of the stanza just for the picture, to show how full it is:

enter image description here

In order to keep the page number, I need to move it upwards (else it will be cropped away by the book printing service). But if I just add some vertical space below my footer, like this

oddFooterMarkup = \markup 
  \column {
    \fill-line { "" \on-the-fly #print-page-number-check-first \fromproperty #'page:page-number-string }
    \null % or \vspace #1.0
  }

, then it will overlap with the stanzas markup and mess up everything (since there is no space to evade to). Again I added a \box before the footer just for the picture:

enter image description here

So I need a way to tell my footer that it's okay to overlap with other markup. Or alternatively, make the area that it occupies smaller - it doesn't really need the whole width of the page, it'd be okay if the \box would just be around the page number (and the space below it).

2

I'm not sure if this will do what you want, but I would suggest trying the \with-dimensions markup command. So instead of using

\markup\fill-line{... your footer here ...}

for your footer markup, I would try

\markup\with-dimensions #'(0 . 0) #'(0 . 0) \fill-line{... your footer here ...}

It should essentially tell Lilypond that the markup takes up zero space in both X and Y directions, but I'm not sure if it will do what you want, and I don't have the time to test it. Let me know whether it worked.

1
  • I used \with-dimensions #'(0 . 0) #'(-2.1 . 0) which moved the footer upwards to a position that is alright to me. The \box around the footer has still the full width as before, and if I change to -2.2 or less, the page gets messed up as well. So it seems that your solution does not allow overlap in general. But it solved my actual problem, so I'm happy! (I don't mark it as the correct answer (yet) because I'd like to wait if someone knows a way to explicitly make overlap possible.)
    – Kjara
    Oct 5 '21 at 17:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.