[Tex/LaTex] How to change the font of header

fontsizeheader-footer

When I am typing in latex, I find that the name of the chapter is too long. In order to avoid the header getting too crowded (as shown),
header overfull

I intend to reduce the font size of the header, but I do not know how to do that. Can anyone provide a solution to this?

\documentclass{book}
\usepackage{blindtext}
\title{Lecture Notes}
\author{Terry}
\date{}
\begin{document}
\maketitle
%I wonder what I can put here to reduce the size of the headers for chapter name
\mainmatter
\chapter{Cauchy's Integral Formula and Consequences}
\blindtext
\end{document}

Best Answer

You have two main options. Starting with the simpler one:

  1. Use the \chapter[short title]{long title} device.

    E.g., in your case, you might write

    \chapter[Cauchy's Integral Formula]{Cauchy's Integral Formula and Consequences}
    

    I've noticed that you've commented that you would prefer not use use this device and, instead, to reduce the running header's font size. Nevertheless, I think you should give it some serious thought. Especially if you have very long chapter titles, if you don't use the short-title device you may need to reduce the font size so drastically (in order to make the title fit in the running header) that the material will become undecipherable -- unless you provide magnifying glasses with each book you sell.

  2. Load a package that makes it straightforward to customize the headers and footers; among these packages are fancyhdr, titleps and scrlayer-scrpage. For instance, if you were to work with the fancyhdr package, you might write

    \usepackage{fancyhdr}
    \fancyhead{}
    \fancyfoot{}
    \renewcommand{\headrulewidth}{0pt}
    \fancyhead[RO,LE]{\footnotesize\thepage}
    \fancyhead[RE]{\footnotesize\slshape\leftmark}
    \pagestyle{fancy}
    

    Why \footnotesize? Assuming "Cauchy's Integral Formula and Consequences" is a representative-length chapter name, and assuming you're using standard page block parameters, using \small wouldn't be enough to fit the whole string comfortably on one line.