How can I add a horizontal line in the footer which spans the entire width of the page?
\renewcommand{\footrulewidth}{0.4pt}
is giving a line which is inside the margin only.
fancyhdrheader-footerrules
How can I add a horizontal line in the footer which spans the entire width of the page?
\renewcommand{\footrulewidth}{0.4pt}
is giving a line which is inside the margin only.
Best Answer
You need to update the
\footrule
macro provided byfancyhdr
. Here's a possible way:In a regular document, this should jump left (negative
\hspace
) far enough to land outside the page border, then set a horizontal\rule
of width\footrulewidth
that is twice the width of the paper (ensuring it spans across the entire page).Here's a working example showing a regular page and the updated footer rule on page 2 (the above change is done mid-document, but you'll want to add it to your preamble for a global effect on your document):