[Tex/LaTex] put the headers in italic format

header-footeritalic

i am trying to change my headers and footers. i am using this:

\documentclass[12pt,b5paper]{book}
\usepackage{fancyhdr}
\pagestyle{fancy}
    \fancyhf{}
    \fancyhead[LE]{\fontsize{12}{12}\selectfont\nouppercase\thepage}
    \fancyhead[RE]{\fontsize{9}{12}\selectfont\nouppercase\leftmark} 
    \fancyhead[RO]{\fontsize{12}{12}\selectfont\nouppercase\thepage} 
    \fancyhead[LO]{\fontsize{9}{12}\selectfont\nouppercase\rightmark} 
    \fancyfoot[CE,CO]{} 
    \fancyfoot[LE,RO]{} 
    \renewcommand{\chaptermark}[1]{\markboth{\chaptername \ \thechapter \ -\ #1}{}}
    \renewcommand{\sectionmark}[1]{\markright{\thesection \ -\ #1}{}}

where from i got this:

enter image description here

But I want the header (Chapter 4-Tetracoordinate Iron Carbenes) to be italic.

how cand i do so?

thanks in advance.

Best Answer

Why don't you use \small or \footnotesize for the fontsize (depending on the font size option in your document class)?

Here's a possible code:

\documentclass[12pt,b5paper]{book}
\usepackage[utf8]{inputenc}
\usepackage{fancyhdr}
\pagestyle{fancy}
    \fancyhf{}
    \fancyhead[LE]{\thepage}
    \fancyhead[RE]{\fontsize{9}{12}\selectfont\itshape\nouppercase{\leftmark}}
    \fancyhead[RO]{\thepage}
    \fancyhead[LO]{\fontsize{9}{12}\selectfont\itshape\nouppercase{\rightmark}}
    \fancyfoot[CE,CO]{}
    \fancyfoot[LE,RO]{}
    \renewcommand{\chaptermark}[1]{\markboth{\chaptername \ \thechapter \ –\ #1}{}}
    \renewcommand{\sectionmark}[1]{\markright{\thesection \ –\ #1}{}}

\begin{document}
  \setcounter{chapter}{3}

\chapter{Tetracoordinate Iron Carbenes}
\newpage
\setcounter{section}{1}
\section {The reference system}
\end{document} 

enter image description here