Remove fancyhdr chapter 0 header
Change the \fancyhead[L]{...}
to
\makeatletter
\fancyhead[L]{%
% thank egreg for his help in comment
\ifnum\value{chapter}=0\else\chaptername\ \thechapter\ --\ \fi\leftmark
}
\makeatother
and add
\chaptermark{Introduction}
after \chapter*{Introduction}
help.
With this change,
- the second page of unnumbered chapter "Introduction" will have its left header showing "Introduction", and
- the second page of table of contents will have its left header showing "CONTENTS".
A full example
\documentclass{report}
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{#1}{#1}}
\fancyhead[R]{}
\makeatletter
\fancyhead[L]{%
% thank egreg for his help in comment
\ifnum\value{chapter}=0\else\chaptername\ \thechapter\ --\ \fi\leftmark
}
\makeatother
\begin{document}
\tableofcontents
\chapter*{Introduction}
\chaptermark{Introduction}
\addcontentsline{toc}{chapter}{Introduction}
Text
\newpage
More text
\chapter{The first chapter}
\newpage
text
\end{document}
I'd use a different approach, namely to set the header in \chaptermark
.
\documentclass{report}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{} % clear the headers
\fancyhead[L]{\nouppercase{\leftmark}}
\renewcommand{\chaptermark}[1]{\markboth{\chaptername\ \thechapter\ -- #1}{}}
\newcommand{\uchapter}[1]{%
\chapter*{#1}%
\markboth{#1}{}%
\addcontentsline{toc}{chapter}{#1}%
}
\begin{document}
\tableofcontents
\uchapter{Introduction}
Text
\newpage
More text
\chapter{The first chapter}
Text
\newpage
More text
% check the header of a possible second page in the TOC
\addtocontents{toc}{\protect\newpage\protect\mbox{}}
\end{document}
The \nouppercase
is needed because report
adds \MakeUppercase
to the arguments to \markboth
for special chapters such as the TOC, the lists of figures and tables and the bibliography.
I introduced a \uchapter
command to avoid heavy code in the document body.