I am writing a book with several parts and chapters that has a general introduction. I defined a header style for most of the book, that I can easily locally disable for a few pages with \pagestyle{empty}
. The header has my name in even pages and the chapter mark (Chapter XX) in odd pages.
Now I would like to have a different kind of header for the introduction to avoid having an ugly "Chapter 0" as a header. I want the header to have my name in even pages and "introduction" in odd pages.
I defined a new style using fancyhdr. However nothing seems to work. After a few pages, I get the "Chapter 0" back in the introduction, and it lasts until the next chapter, although I have cleared the page. Can you please tell me wat is wrong in my MWE?
\documentclass[12pt, A4]{book}
\usepackage{tocbibind}
\usepackage{blindtext}
\usepackage{emptypage}
%%%%% Header
\usepackage{fancyhdr}
\fancypagestyle{style1}{
\fancyhead[CO]{Introduction}
\fancyfoot[CE]{Me}
\fancyfoot[CE,CO]{\thepage}
\renewcommand{\headrulewidth}{0pt}
}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[CE]{Me}
\fancyhead[CO]{\chaptername \ \thechapter}
\fancyfoot[CE,CO]{\thepage}
\renewcommand{\headrulewidth}{0pt}
\begin{document}
{\pagestyle{empty}
\tableofcontents
\clearpage}
\clearpage
{\pagestyle{style1}
\chapter*{Introduction}
\Blindtext
\Blindtext
\Blindtext
\Blindtext
}
\clearpage
\pagestyle{fancy}
\part{Thing}
\Blindtext
\Blindtext
\Blindtext
\Blindtext
\Blindtext
\chapter{Thing thing}
\Blindtext
\Blindtext
\Blindtext
\Blindtext
\Blindtext
\chapter{thingthingthing}
\Blindtext
\Blindtext
\Blindtext
\Blindtext
\Blindtext
\end{document}
A4
option for book class it'sa4paper
. – touhami Jun 23 '16 at 21:34