I am trying to customize my resume template and I want to have contact info on every page of the document. I tried to use fancyhdr achieve this but however it introduced some extra space/margin on my second page which is unwanted, and now I have been stuck here for a while. Any idea what could be the cause and suggestion for a fix would be greatly appreciated!

PS: in my code I have written the comment %THE PROBLEM!!!!!!!!!! where I introduced the fancyhdr header.

The issue


\ProvidesClass{resume}[2010/07/10 v0.9 Resume class]

\LoadClass[11pt,letterpaper]{article} % Font size and paper type

\usepackage[parfill]{parskip} % Remove paragraph indentation
\usepackage{array} % Required for boldface (\bf and \bfseries) tabular columns
\usepackage{ifthen} % Required for ifthenelse statements

% My custom packages

% My custom definitons

\pagestyle{empty} % Suppress page numbers

%   HEADINGS COMMANDS: Commands for printing name and address

\pagestyle{plain}% Set page style to plain.
\def \name#1{\def\@name{#1}} % Defines the \name command to set name
\def \@name {} % Sets \@name to empty by default

\def \addressSep {\space\textbar\space}
% \def \addressSep {$\diamond$} % Set default address separator to a diamond

% One, two or three address lines can be specified 
\let \@addressone \relax
\let \@addresstwo \relax
\let \@addressthree \relax

% \address command can be used to set the first, second, and third address (last 2 optional)
\def \address #1{
    \def \@addresstwo {#1}
  \def \@addressthree {#1}
     \def \@addressone {#1}

% \printaddress is used to style an address line (given as input)
\def \printaddress #1{
    \def \\ {\addressSep\ }

% \printname is used to print the name as a page header
\def \printname {
    \hfil{\MakeUppercase{\namesize\bf \@name}}\hfil


% THE PROBLEM!!!!!!!!!!
\renewcommand\headrulewidth{0pt} % remove the header rule

  \ori@document  % Begin document
    \pagestyle{fancy} % the default page style for the document
        \printname % Print the name specified with \name
          \@ifundefined{@addressone}{}{ % Print the first address if specified
          \@ifundefined{@addresstwo}{}{ % Print the second address if specified
             \@ifundefined{@addressthree}{}{ % Print the third address if specified



% Defines the rSection environment for the large sections within the CV
\newenvironment{rSection}[1]{ % 1 input argument - section name
  \textcolor{MyBlue}{\MakeUppercase{\bf #1}} % Section title
  \hrule % Horizontal line
  \begin{list}{}{ % List for each individual item in the section
    \setlength{\leftmargin}{1.5em} % Margin within the section


\newenvironment{rSubsection}[4]{ % 4 input arguments - company name, year(s) employed, job title and location
 {\bf #1} \hfill {#2} % Bold company name and date on the right
 \ifthenelse{\equal{#3}{}}{}{ % If the third argument is not specified, don't print the job title and location line
  {\em #3} \hfill {\em #4} % Italic job title and location
  \begin{list}{$\cdot$}{\leftmargin=0em} % \cdot used for bullets, no indentation
   \itemsep -0.5em \vspace{-0.5em} % Compress items in list together for aesthetics
  \vspace{0.5em} % Some space after the list of bullet points

% The below commands define the whitespace after certain things in the document - they can be \smallskip, \medskip or \bigskip
\def\namesize{\huge} % Size of the name at the top of the document
\def\addressskip{\smallskip} % The space between the two address (or phone/email) lines
\def\sectionlineskip{\medskip} % The space above the horizontal line for each section 
\def\nameskip{\bigskip} % The space after your name at the top
\def\sectionskip{\medskip} % The space after the heading section


\documentclass{resume} % Use the custom resume.cls style

\usepackage[left=0.75in,top=0.6in,right=0.75in,bottom=0.6in]{geometry} % Document margins

% header
    {{\faPhone} {\fontsize{10}{10} \selectfont (+00)00000000}} \\
    {{\faEnvelope} {\fontsize{10}{10} \selectfont \href{mailto:[email protected]}{[email protected]} }} \\
    {{\faLinkedin} {\fontsize{10}{10} \selectfont \href{https://www.linkedin.com}{name} }}


\begin{rSection}{section 1}


\begin{rSection}{section 2}


\begin{rSection}{section 3}

\begin{rSection}{section 4}

  • 2
    your header is too large for the reserved space, either change the page geometry so that the content can fit, or smash the content so that its actual height is hidden. May 1, 2021 at 13:51
  • I tried playing around with the geometry parameters, but it didn't seem to affect the space between the header and the body.
    – Enigma
    May 1, 2021 at 14:56
  • I am not entirely sure how to use the \smash, will have to investigate a bit more.
    – Enigma
    May 1, 2021 at 14:58
  • In my system there is no such extra space on page 2. Your posted code woks fine. May 1, 2021 at 15:09
  • 1
    fancyhdr changed its behaviour here in the last release @SimonDispa May 1, 2021 at 15:22

1 Answer 1


Thanks to the comments I solved it. The problem was that the header took up a too much space as Ulrike mentioned, and I had to make up for it by adding the geometry parameter headheight and give it a greater value. However Simon noticed for some reason rendering it in TeXworks instead of Overleaf seemed to automatically take care of the issue.

  • Overleaf probably uses an older version of fancyhdr which causes the second and following pages to shift down. May 1, 2021 at 17:06
  • @PietervanOostrum Yes, I also believe that is the reason! Overleaf will probably do an update later.
    – Enigma
    May 1, 2021 at 17:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .