# Chaptername in header except for Chapter page using fancyhdr

I am trying to achieve a header that displays topic, chapter and page number on every page except on pages where a new chapter begins. In that case the chapter space should be empty.

I use fancyhdr and tried the following:

\documentclass[fontsize=12pt, paper=a4, headinclude, twoside=false, parskip=half+, pagesize=auto, numbers=noenddot, open=right, toc=listof, toc=bibliography]{scrreprt}

\usepackage{fancyhdr}
\fancyhf{}
\lfoot{}
\cfoot{}
\rfoot{}

%define header style for chapter pages
\fancypagestyle{chapt}{
\fancyhf{}
}

\renewcommand*{\chapterpagestyle}{chapt}

\begin{document}
\pagestyle{empty}
\pagenumbering{Roman}

%Titlepage
\input{title.tex}

%ToC etc
{
\pdfbookmark[1]{Inhaltsverzeichnis}{toc}
\tableofcontents
\listoffigures
\listoftables
}

\clearpage
\pagestyle{fancy}

% actual Content
\chapter{Einleitung}
\pagenumbering{arabic}

\end{document}


now i get the topic+pagenumber header for my chapter pages, but also for the ToC, and more important - i dont get any of the following pages to display the corresponding chapter name in its header.

Any help would be appreciated.

-

Try this code:

\documentclass{book}
\usepackage{fancyhdr}
\fancyhf{}
\lfoot{}
\cfoot{}
\rfoot{}
\renewcommand{\footrulewidth}{0pt}

\usepackage{bookmark}
\usepackage{lipsum}    %% for dummy text

\begin{document}
\frontmatter
\pagestyle{plain}

%Titlepage
%\input{title.tex}

%ToC etc
\tableofcontents
\listoffigures
\listoftables

\cleardoublepage
\pagestyle{fancy}

%define header style for chapter pages and put it here
\fancypagestyle{plain}{%
\fancyhf{}
}
\mainmatter
% actual Content
\chapter{Einleitung}
\lipsum[1]
\section{Some section}
\lipsum[2-8]
\chapter{Second}
\lipsum[1]
\section{Some other section}
\lipsum

\end{document}


You can define a fancy page style like:

\fancypagestyle{myfancy}{%
\fancyhf{}
\renewcommand{\footrulewidth}{0pt}
}


and use it as \pagestyle{myfancy}. But if you want to change the page style of chapter pages, you should do it by changing the plain style as shown above.

-
Thanks, that code gives the right headers. Now just out of curiosity could you define an extra pagestyle and not change the plain-style as i tried? –  voiDnyx Jan 28 '13 at 10:30
@voiDnyx See the edit. But for chapters the page style plain has to be changed. –  Harish Kumar Jan 28 '13 at 13:57