# Header and footer not on 1st page?

My header and footer do not appear on the first page. I hope they do. The solution of a duplicate question is not working for me. That is why I still decided to post my question. I will make the tile more informative once I have known the cause.

# MWE

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[margin=1in]{geometry}
% For custom spacing
\usepackage{setspace}
\setstretch{1.2}
% For the symbols
\usepackage{wasysym}
\usepackage{marvosym}
\usepackage[alpine]{ifsym}

\usepackage{fancyhdr}

\pagestyle{fancy}
\fancyhf{}
}
\MVAt\enspace \href{mailto:e@gmail.com}{e@gmail.com}
}
\cfoot{\thepage/2}

\usepackage{lipsum}

\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\newcommand{\Hrule}{\rule{\linewidth}{0.3mm}}

\makeatletter% since there's an at-sign (@) in the command name
\renewcommand{\@maketitle}{%
\parindent=0pt% don't indent paragraphs in the title block
\centering
{\LARGE \bfseries\textsc{\@title}}
\HRule\par%
\textit{\@author \hfill \@date}
\par
}
\makeatother% resets the meaning of the at-sign (@)

\title{Statement of Purpose}
\author{X}
\date{\today}

\begin{document}
\maketitle% prints the title block
\thispagestyle{empty}
\vspace{12pt}

\lipsum
\end{document}


\maketitle defines the current page style as plain. Hence you have to define the plain page style.

\fancypagestyle{plain}{%
\fancyhf{}
}
\MVAt\enspace \href{mailto:e@gmail.com}{e@gmail.com}
}
\cfoot{\thepage/2}
}


Full code:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[margin=1in]{geometry}
% For custom spacing
\usepackage{setspace}
\setstretch{1.2}
% For the symbols
\usepackage{wasysym}
\usepackage{marvosym}
\usepackage[alpine]{ifsym}

\usepackage{fancyhdr}

\pagestyle{fancy}
\fancyhf{}
}
\MVAt\enspace \href{mailto:e@gmail.com}{e@gmail.com}
}
\cfoot{\thepage/2}

\fancypagestyle{plain}{%
\fancyhf{}
}
\MVAt\enspace \href{mailto:e@gmail.com}{e@gmail.com}
}
\cfoot{\thepage/2}
}

\usepackage{lipsum}

\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\newcommand{\Hrule}{\rule{\linewidth}{0.3mm}}

\makeatletter% since there's an at-sign (@) in the command name
\renewcommand{\@maketitle}{%
\parindent=0pt% don't indent paragraphs in the title block
\centering
{\LARGE \bfseries\textsc{\@title}}
\HRule\par%
\textit{\@author \hfill \@date}
\par
}
\makeatother% resets the meaning of the at-sign (@)

\title{Statement of Purpose}
\author{X}
\date{\today}

\begin{document}
\maketitle% prints the title block
%\thispagestyle{empty}
\vspace{12pt}

\lipsum
\end{document}


• Thanks a lot! It works. \fancypagestyle{plain} is a paradox, though. LOL – Sibbs Gambling Oct 12 '14 at 14:15
• Why not just \makeatletter\let\ps@plain\ps@fancy\makeatother? – Sveinung Oct 12 '14 at 15:48
• @Sveinung That is also a possibility. I wanted to show it in fancyhdr way. – user11232 Oct 12 '14 at 23:42

If you want the same headers and footers on the title page as on the other pages, a simple solution is redefine the plain-pagestyle to have the same content as the pagestyle you use in the rest of the document (i.e. \pagestyle{fancy}).You may use the the \let-command to do that.

\let\ps@plain\ps@fancy


Since it contains the @you have to enclose it in a \makeatletter\makeatother pair. You already have such a pair where you redefine the @\maketitle-command, so add the \let either at the beginning or end of that code:

\makeatletter% since there's an at-sign (@) in the command name

\let\ps@plain\ps@fancy %% ---> change the headers and footer at the title-page

\renewcommand{\@maketitle}{%
\parindent=0pt% don't indent paragraphs in the title block
\centering
{\LARGE \bfseries\textsc{\@title}}
\HRule\par%
\textit{\@author \hfill \@date}
\par
}
\makeatother% resets the meaning of the at-sign (@)