I want to have a custom header like the following:
Chapitre5 (Chapter5) in the left and the name of the chapter in the right(Mise en oeuvre)
I used this in my root .tex file:
\usepackage{fancyhdr}
\pagestyle{fancy}
%clears header & footer
\fancyhf{}
\renewcommand{\chaptermark}[1]{ \markboth{#1}{} }
\rhead{\leftmark}
\lhead{
\ifnum\value{chapter}>0
\chaptername \thechapter
\fi
}
But it doesn't take into account unnumbered chapters after the first chapter, i.e \thechapter
>0. So when i add a chapter with \chapter*{annexe}
right after chapter5, i get the same header as in the picture and i expect it to be empty in the left and have the chapter name annexe in the right side of the header.
Can you, please, tell me how to do it? explaining what the code does would be very nice. As i am actually new to Latex.