[Tex/LaTex] Removing Header from Chapter in a Thesis Written in LaTeX

header-footerthesis

I am writing a thesis using the LaTeX template files that seem to have been used at my department for a while. The problem is, when I compile the code, I get a header with chapter number and title on the page where chapter 2 starts.

Chapter 2 Title and Header

It doesn't happen though on the page where chapter 1 begins.

Chapter 1 Title and Header

I want to remove the header from the start page of chapter 2 but despite trying a lot, I could not figure out what is causing it to appear there (and not on start page of chapter 1) and how to get rid of it. Will appreciate any help. Here is the MWE for the main LaTeX file:

\documentclass[11pt,a4paper,twoside]{report}
\usepackage[top=3cm, bottom=3cm, left=2.5cm, right=2.5cm]{geometry}
\usepackage[latin1]{inputenc}

% Page number must be in the upper righthand corner
\usepackage{fancyhdr}
\fancypagestyle{phdthesis}{
\fancyhf{} %clear all headers and footers fields
\rhead{\thepage} %prints the page number on the right side of the header
\renewcommand{\headrulewidth}{0pt}
 }
\fancypagestyle{plain}{\pagestyle{phdthesis}}

% to remove page numbers on empty pages (before chapter start)
\makeatletter
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
\hbox{}
\thispagestyle{empty}
\newpage
\if@twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

 %% TITLE PAGE AND DECLARATION
 \pagestyle{empty}
 \begin{titlepage}
 \end{titlepage}

 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %% CONTENTS
 \tableofcontents

 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %% CHAPTERS
 \newpage
 \pagenumbering{arabic}

 %% INCLUDE TEXT OF CHAPTER 1 IN THE FILE chp1.tex 
 \include{chp1}

 %% INCLUDE TEXT OF CHAPTER 2 IN THE FILE chp2.tex 
 \include{chp2}

 %% INCLUDE TEXT OF CHAPTER 3 IN THE FILE chp3.tex 
 \include{chp3}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% BIBLIOGRAPHY
\bibliography{mybib}

\end{document}

Here is the code for all the 3 chapters which are saved separately as chp1.tex, chp2.tex and chp3.tex in the same directory:

\chapter{{\it Chapter 1 Title}}\label{chp1}
\thispagestyle{myheadings}
{\it Text for Chapter \ref{chp1}}

\chapter{{\it Chapter 2 Title}}\label{chp2}
\thispagestyle{myheadings}
{\it Text for Chapter \ref{chp2}}

\chapter{{\it Chapter 3 Title}}\label{chp3}
\thispagestyle{myheadings}
{\it Text for Chapter \ref{chp3}}

Please help.

Best Answer

Remove the \thispagestyle{myheadings} after the \chapter commands.

Then your own pagestyle phdthesis will be used on chapter pages, because of

\fancypagestyle{plain}{\pagestyle{phdthesis}}
Related Question