I am using a template from someone else to write my statement of purpose. The header looks cool, but how can I make it appear for every page?
\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{geometry}
\usepackage{times}
\usepackage{setspace}
\usepackage[hidelinks]{hyperref}
\usepackage{xcolor}
\renewcommand\thefootnote{\textcolor{blue}{\arabic{footnote}}}
\geometry{left=2.5cm,right=2.5cm,top=1.5cm,bottom=2cm}
\setlength{\parskip}{0.5em}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\newcommand{\Hrule}{\rule{\linewidth}{0.3mm}}
\makeatletter
\renewcommand{\@maketitle}{ \textit{ \vspace{-0.2 cm}\@author \hfill \@date}
\HRule
\parindent=0pt \centering
\vspace{0.5cm}
{\Large \bfseries\textsc {\@title}}
\par
}
\makeatother
\begin{document}
\title{Statement of Purpose}
\author{ \textbf{My Name}}
\date{{\normalsize {Applicant for PhD program in XXX at XXX School}}%}
\maketitle
This is my statement of purpose.
\newpage{empty}
\end{document}
Best Answer
There is an easier way to achieve the same result, I think. You can use the package
fancyhdr
and work on it. I'll give you here a replica of what you were trying to achieve in your question, but there are more options you can use.For example:
E for even pages, O for odd pages, R for right, L for left, C for center.
New version
If you want to change the properties of the rule, you can add a couple of commands. I also fixed the top margin a bit. If you want to push text down, add this command before the text you want to push (including the title):
\vspace*{<length>}
. Here's the full code:And the result...
Old version
First page
Second page
Code