I am having a bit of a problem with fancyhdr footers. If I set the footer at the end of a paragraph occupying no more than a single line on the current page, the footer gets placed from the previous page on which the footer is set. If I set the footer at the end of a paragraph occupying more than a single line on the current page, it is placed on the same page on which the footer is set. I would like the header to be placed always on the same page on which it is set.
The following is an MWE:
Code: Select all
\documentclass{article}
\usepackage{lipsum}
\usepackage{fancyhdr}
\pagestyle{fancy} \fancyhf{}
\renewcommand{\footrulewidth}{0.1pt}
\begin{document}
\lipsum[1-5]
If this paragraph occupies only one line on the following page, and the fancyhdr footer is set, the footer appears from the previous page onwards. %If you uncomment this part to let the text occupy more than a single line on the second page, the footer will begin appearing from the second page, as it should.
\fancyfoot[L]{Test}
\end{document}
Many thanks in advance.