[Tex/LaTex] Small-caps headers with no standard uppercase letters (fancyhdr)

fancyhdrheader-footersmall-caps

Using fancyhdr to format my headers, I want them to display the current chapter name in small caps. So with no surprise I’ve ended up doing something like this:

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{} % Clears the standard fancy style header
\fancyhead[CO]{\textsc{\nouppercase{\leftmark}}} % Displays current chapter name in small-caps on odd-numbered pages

Which of course works quite well, but the point is that I want no standard uppercase at all in the headers: in other words, I want a chapter called “The Chapter ABC” to be treated as “the chapter abc” during the small-caps-isation process. Is there any way to achieve this? I tried different solutions with things such as \MakeLowercase or \MakeTextLowercase, but they all appear ineffective within \fancyhead{}.

I’m obviously looking for a solution easier and more “automatic” than the one consisting in manually renaming the header with \fancyhead{} after each \chapter{}, which is the one I’m currently using…

Thanks a lot to everyone willing to help me!

Best Answer

Redefine \chaptermark to avoid \MakeUppercase; I also instruct to use \footnotesize for the number, or it would appear too big.

\documentclass{book}
\usepackage{fancyhdr}
\usepackage{lipsum} % just for the example

\pagestyle{fancy}
\fancyhead{} % Clears the standard fancy style
\fancyhead[CO]{\scshape\MakeLowercase{\leftmark}}

\makeatletter
\renewcommand{\chaptermark}[1]{%
  \markboth{%
    \ifnum\c@secnumdepth>\m@ne
      \@chapapp\ {\footnotesize\thechapter}. \ %
    \fi
  #1%
  }{}%
}
\makeatother

\begin{document}

\chapter{This title has Upper Case Letters}

\lipsum[1-30]

\end{document}

enter image description here