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{}
\lhead{\itshape BA TOPIC}
\chead{\itshape{\nouppercase{\leftmark}}}
\rhead{\thepage}
\lfoot{}
\cfoot{}
\rfoot{}
%define header style for chapter pages
\fancypagestyle{chapt}{
\fancyhf{}
\fancyhead[L]{\itshape{BA THEMA}}
\fancyhead[C]{}
\fancyhead[R]{\thepage}
}
\renewcommand*{\chapterpagestyle}{chapt}
\begin{document}
\pagestyle{empty}
\pagenumbering{Roman}
%Titlepage
\input{title.tex}
%ToC etc
{
\hypersetup{linkcolor=black}
\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.
Best Answer
Try this code:
You can define a fancy page style like:
and use it as
\pagestyle{myfancy}
. But if you want to change the page style of chapter pages, you should do it by changing theplain
style as shown above.