I am experiencing a very strange issue. I am using scrlayer-scrpage to generate headers and footers. For headers, everything works great, but for footers, on every next page the footer height is getting larger (see example). What could be the reason for this?..
\documentclass{scrartcl}
\usepackage[headsepline]{scrlayer-scrpage}
\ifoot[\the\footheight\quad\rule{2px}{\footheight}]{\the\footheight\quad\rule{2px}{\footheight}}
\usepackage{lipsum}
\title{test}
\begin{document}
\lipsum[1-40]
\end{document}
Best Answer
\footheight
is total height of the foot, including height (space above the baseline) and depth (space below the baseline) of the foot.Your rule starts on the baseline. So the height of the foot must be at least the height of your rule plus the depth of a
\strutbox
. Thereforescrlayer-scrpage
enlarges the former\footheight
by\dp\strutbox
. On the next page your rule starts again on the baseline and soscrlayer-scrpage
enlarges the\footheight
from the last page by\dp\strutbox
again ...You can shift the rule down by
\dp\strutbox
:Or you have to shorten the rule
\dp\strutbox
Or you can hide the height of the rule using
\smash
Note that
is a short version of