1

So I need a different line above the footer for every page in the fancyhdr package. It has to look something like

enter image description here

This is what I did to create the line

\rule{\linewidth}{3pt}

\vspace{-0.85\baselineskip}
\rule{\linewidth}{1pt}

I tried using the code from Custom Footer Line, namely this one

\renewcommand\footrule{\makebox[\textwidth]{\shadowfill}\\[-.2\baselineskip]}

but I've replaced \shadowfill with my code so it looks like this

\renewcommand\footrule{\makebox[\textwidth]{\rule{\linewidth}{3pt}

\vspace{-0.9\baselineskip}
\rule{\linewidth}{1pt}}\\[-.2\baselineskip]}

Unfortunately, it doesn't seem to show up as expected in the footer. I get this instead. It seems to have split up into two separate portions. How do I fix this?

enter image description here

  • While code snippets are useful in explanations, it is always best to compose a fully compilable MWE that illustrates the problem including the \documentclass and the appropriate packages so that those trying to help don't have to recreate it. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem. – Peter Grill Oct 04 '18 at 06:32
  • Fair enough. Will do that next time. – Chung Ren Khoo Oct 27 '18 at 12:56

1 Answers1

2

it seems to work with this

\renewcommand\footrule{\begin{minipage}{1\textwidth}
\hrule width \hsize height 2pt \kern 1mm \hrule width \hsize   
\end{minipage}\par}%

found here.

MWE:

\documentclass{article}
\usepackage{lipsum}
\usepackage{fancyhdr}

\renewcommand{\footrule}{\begin{minipage}{1\textwidth}
\hrule width \hsize height 2pt \kern 1mm \hrule width \hsize
\end{minipage}\par}

\begin{document}
  \pagestyle{fancy}

  \lipsum
\end{document}

enter image description here

T. Pluess
  • 1,040