12

Possible Duplicate:
How to remove the top horizontal bar in fancyhdr?

How would I get rid of the line in the header, and the line and page numbering in the footer?

My code is below.

enter image description here

\documentclass[10pt]{article}
\usepackage{array, xcolor, lipsum, bibentry,fancyhdr}
\usepackage[margin=3cm]{geometry}


\pagestyle{fancy}
\lhead{My Name}
\chead{}
\rhead{\thepage}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}



\definecolor{lightgray}{gray}{0.8}
\newcolumntype{L}{>{\raggedleft}p{0.14\textwidth}}
\newcolumntype{R}{p{0.8\textwidth}}
\newcommand\VRule{\color{lightgray}\vrule width 0.5pt}


\begin{document}
\thispagestyle{empty}
\begin{center}\bfseries\Huge John Doe \end{center}
\vspace{1em}
\begin{minipage}[ht]{0.70\textwidth}
Address Line 1\\
Address Line 2\\
Address Line 3\\
Address Line 4\\
Address Line 5
\end{minipage}
\begin{minipage}[ht]{0.48\textwidth}
Mobile: 123-456789\\
Email: myemail@gmail.com\\
Date of Birth: 01/01/2012\\
Citizenship: My citizenship
\end{minipage}
\vspace{2pt}

\section*{Education}
\begin{tabular}{L!{\VRule}R}
2008--2012&MSc in Computer Science, Great University, Country.\vspace{5pt}\\
2006--2008&BSc in Life Science, Great University, Country.\\
\end{tabular}

\section*{Professional Experience}
\begin{tabular}{L!{\VRule}R}
2011--today&{\bf Work at company XY.}Head of Department. Add my job description here. Add my job description here. Add my job description here. Add my job description here.\\
&\begin{itemize}
\item Add my job description here.
\item Add my job description here.Add my job description here.Add my job description here.
\item Add my job description here.Add my job description here.Add my job description here.Add my job description here.
\item Add my job description here.Add my job description here.Add my job description here.Add my job description here.Add my job description here.Add my job description here.Add my job description here.Add my job description here.Add my job description here.
\end{itemize} \vspace{5pt}\\
2008--2010&{\bf Trainee at company ZY.}\\
&\lipsum[66]\\
\end{tabular}

\section*{Awards and Achievements}
\begin{tabular}{L!{\VRule}R}
2008&Gold medal.\vspace{5pt}\\
2006&Silver medal.\\
\end{tabular}

\section*{Organisational Experience}
\begin{tabular}{L!{\VRule}R}
2008&This event.\vspace{5pt}\\
\end{tabular}


\section*{Languages}
English, Spanish, French, German


\end{document} 
David Carlisle
  • 757,742
Gary
  • 2,033
  • 3
    Please have a look at the fancyhdr maual and at the various questions tagged with [tag:fancyhdr], e.g., http://tex.stackexchange.com/questions/13896/how-to-remove-the-top-horizontal-bar-in-fancyhdr – lockstep Aug 08 '12 at 16:39

1 Answers1

19

From your MWE just few changes:

\pagestyle{fancy}
\lhead{My Name}
\chead{}
\rhead{\thepage}
\cfoot{} % get rid of the page number 
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}

By setting the \headrulewidth and \footrulewidth to 0pt you can remove them as described in the documentation of the package fancyhdr.

  • Thanks! Works perfectly. Sorry, might have missed out reading that part in the documention. – Gary Aug 08 '12 at 16:42