[Tex/LaTex] Custom header/footer rules (fancyhdr?)


I want to be able to customize my header/footer so far that I can change the rules that separate it from the document. Look for example at http://ww1.microchip.com/downloads/en/appnotes/00734b.pdf (second page and further), I want to be able to make header/footer rules like that.

Currently I'm using the fancyhdr package, but that's not necessary.
I already tried to add \hrule in the footer, and that's working, but I'd think there is a neater solution?

The code I used for that:

\hrule width \hsize height 1pt\vskip1pt\hrule width \hsize height 2pt %
\hrule width \hsize height 2pt\vskip1pt\hrule width \hsize height 1pt %
\vskip2pt Some text.
\fancyfoot[C]{\vskip5pt Some text.}
\fancyfoot[R]{\vskip5pt Some text.}

Best Answer

To replace the rules of fancyhdr, you can redefine \headrule and \footrule including just the solution at your question Two rules directly under each other



\usepackage{lastpage} % number of last page 

\hrule width \hsize height 2pt \kern 1mm \hrule width \hsize   

\hrule width \hsize \kern 1mm \hrule width \hsize height 2pt 

\rhead{Section \thesection}
\rfoot{Page \thepage\ of \pageref{LastPage}}

headers and footers.