# markup that allows overlap

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:

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:

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).

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.

• 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.) Oct 5, 2021 at 17:55