I am having problems with a custom footer in my document. On pages "v" and "x" in the front matter, the text shifts up slightly. The best I can figure is that the whitespace above those two page numbers is being absorbed for some reason. How do I force the page numbers to occupy the full height of a character, so that the footer does not shift from page to page?

Currently my footer is defined in a custom page style as:

        \hrule width\textwidth height 1pt%
        \vskip 3bp%
        \hrule width\textwidth height 1.5bp}

    \scriptsize Version X\hfill\small\thepage

    \hfill\textbf{\large Boilerplate}\hfill\null

I previously tried creating this footer with fancyhdr, but was unable to figure out how to get everything in the right place on the page. This approach works, other than the slight vertical shift on the two pages in question. (This is a reproduction of someone else's MS Word template.)


1 Answer 1


Use \small\strut\thepage: TeX doesn't add interline skip between a rule and a box (and the \smallskip doesn't influence this decision). So when the page number is v or x its height is less than when it's 1. Therefore the

\scriptsize Version X\hfill\small\thepage

line will appear slightly higher on page v than on page 1.

With \scriptsize Version X\hfill\small\strut\thepage you force this line to always have the same height.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .