I am trying to remove section names in headers. I am using fancyhdr
package. When I try to specify new text in \lhead{}
, text is just overlayed on section name. P.S. 3 hours of googling did not help.
Here is the section of code that I want to make work.
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{Student ID: 1123123/1}
\chead{University}
\rhead{}
\lfoot{}
\cfoot{}
\rfoot{Page \thepage\ of \pageref{LastPage}}
UPDATE: \fancyhf{}
is not working - nothing changes.
Edit by Speravir – Example taken from http://pastebin.com/W6V9GUCs
(link given by OP in comment to Gonzalo’s answer):
\documentclass{report}
\usepackage[a4paper]{geometry}
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{fullpage, graphicx, wrapfig, subcaption, setspace}
\usepackage[T1]{fontenc}
\usepackage[font=small, labelfont=bf]{caption}
\usepackage{fourier}
\usepackage[protrusion=true, expansion=true]{microtype}
\usepackage[english]{babel}
\newcommand{\HRule}[1]{\rule{\linewidth}{#1}}
\onehalfspacing
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% HEADER & FOOTER
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagestyle{fancy}
\fancyhf{}
\fancyhead[L]{Student ID: 1123123/1}
\fancyhead[C]{University}
\fancyfoot[R]{Page \thepage\ of \pageref{LastPage}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TITLE PAGE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\title{ \normalsize \textsc{SUBTITLE}
\\ [2.0cm]
\HRule{0.5pt} \\
\LARGE \textbf{\uppercase{TITLE}}
\HRule{2pt} \\ [0.5cm]
\normalsize \today
}
\date{}
\author{\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\
SID: \\
University \\
Department of Life Sciences
}
\maketitle
\pagebreak
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% BODY
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{\textsc{SECTION}}
\end{document}
\fancyhf{}
before\lhead{Student ID: 1123123/1}
.