fancyhdr
works with resume
(which is based on article
), but some adjustments are necessary:
\documentclass[margin,line]{resume}
\usepackage{kantlipsum} % to provide mock text
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\makeatletter
\fancyhead[L]{\textbf{\expandafter\@gobble\@name}}
\makeatother
\fancyhead[R]{\thepage}
\fancyheadoffset[L]{\sectionwidth}
\setlength\headheight{12pt}
\setlength\headsep{3pt}
\addtolength\topmargin{-15pt}
\AtBeginDocument{\thispagestyle{empty}}
\begin{document}
\name{\Large My name}
\begin{resume}
\kant
\end{resume}
\end{document}
Comment out the \fancyheadoffset
line if you don't want that the line on the pages following page 1 are extended on the left. If you want to increase the separation between the rule and the text, modify the value of \headsep
and also the value of \topmargin
.
Note. The mysterious \expandafter\@gobble\@name
is needed because \@name
expands to \Large My Name
, after \name{My Name}
, so we have to remove the unwanted \Large
command.
fancyhdr
package. fancyhdr package