O'Reilly logo

LaTeX Beginners Guide by Stefan Kottwitz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – customizing headers with the fancyhdr package

The default shape of the page headings is slanted. Furthermore, they are written in capital letters. We shall use bold typeface instead and we will use capital letters only for the chapter title. We will load the fancyhdr package and use its commands to achieve that:

  1. Load the first version of our example. Insert the highlighted lines:
    \documentclass[a4paper,12pt]{book}
    \usepackage[english]{babel}
    \usepackage{blindtext}
    \usepackage{fancyhdr}
    \fancyhf{}
    \fancyhead[LE]{\leftmark}
    \fancyhead[RO]{\nouppercase{\rightmark}}
    \fancyfoot[LE,RO]{\thepage}
    \pagestyle{fancy} \begin{document} \chapter{Exploring the page layout} In this chapter we will study the layout of pages. \section{Some filler ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required