I am trying to add a header on the top of each page of my document. I want to have each chapter's name on the left and section name on the right (flushrigt).
\documentclass[12pt, a4paper]{report}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[R]{\itshape \nouppercase \rightmark}
\fancyhead[L]{\itshape \nouppercase Chapter \arabic{chapter}}
\setlength{\headheight}{14.5pt}
\begin{document}
\chapter{This is a chapter}
\section{This is a section}
\eject
ABC
\eject
def
\eject
ghi
\end{document}
Also, I want to have the header starting from the first chapter (no header on the list of figures and similar pages), and no chapter name (but a header with 'bibliography') on bibliography pages.
Thank you.
Best Answer
You have to redefine
\chaptermark
and\sectionmark
to use only the chapter/section name.Also for the second part of the question, start with
\pagestyle{plain}
, and after the TOC,LOF,LOT use\pagestyle{fancy}
(after a\newpage
).