# Set Section name as a mark for Fancyhdr header

I am using the fancyhdr package in my code and the preamble looks like this

\fancyhf{}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}


Question is I want to add the Section name on the header of the odd pages on the left with the title not being all in uppercase. For short, how can I change the \rightmark layout to appear not in all uppercases the same way I did for the \chaptermark? I can't access the manual for some reason, I would really appreciate any help, thanks in advance.

• Maybe: \renewcommand{\sectionmark}[1]{\markright{#1}} and \fancyhead[LO]{\bfseries\rightmark}? – esdd Dec 15 '19 at 14:20
• Yeah sorry @esdd, I completely forgot to be specific about what I wanted to change of the default section layout? Got it right now, thanks. – Davide Papapicco Dec 15 '19 at 14:27

\renewcommand{\sectionmark}[1]{\markright{#1}}


to the preamble. Note that both \leftmark and \rightmark are still uppercased for header entries in TOC, LOF, LOT, bibliography etc. To avoid this use \nouppercase in \fancyhead:

\fancyhead[RE]{\bfseries\nouppercase{\leftmark}}


Example:

\documentclass{book}
\usepackage{blindtext}% only for dummy text
\usepackage{fancyhdr}
\fancyhf{}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}