# Formatting headers in the book class

I am using the book class for my thesis. In every page that is not the beginning of a chapter, LaTeX writes the number and name of the chapter in the header. Is there any simple (emphasis on the simple) way to remove it? I'd like to have simple headers, with nothing on them but the page number.

MWE

\documentclass[10pt]{book}
\usepackage{blindtext}
\usepackage[a4paper]{geometry}
\usepackage{fancyhdr}

\fancyfoot{}

\cfoot{} % get rid of the page number

\pagestyle{fancy}

\begin{document}
\blinddocument
\end{document}

• Have you tried fancyhdr? I haven't used it with book class, but it almost certainly does what you want! Apr 10 '14 at 9:30
• Oops, xpost there :) Apr 10 '14 at 9:30

### Solution with nothing

\documentclass[12pt,a4paper]{book}
\usepackage{blindtext} % just for the example

\renewcommand{\chaptermark}[1]{}
\renewcommand{\sectionmark}[1]{}
\makeatletter
\renewcommand{\@mkboth}[2]{}
\makeatother

\begin{document}

\blinddocument

\end{document}


### Explanation

The text in the headers is controlled by the argument given to \chaptermark and \sectionmark, which are emitted automatically when \chapter or \section are processed.

For the “special units” such as the table of contents and the bibliography, LaTeX uses \@mkboth, an internal variant of those commands, so we need to disable it, too.

### Comment

Of course the methods with packages such as fancyhdr, titleps or scrlayer-scrpage (the newer version of scrpage2) are more powerful. But for “no header” this method is much easier.

• I am all for learning the simplest solution to any problem! Apr 10 '14 at 12:18

Solution with fancyhdr

\documentclass[12pt,a4paper]{book}
\usepackage{fancyhdr}
\usepackage{blindtext} % just for the example

\fancyhf{}
\pagestyle{fancy}

% redefine the plain pagestyle
\fancypagestyle{plain}{%
\fancyhf{} % clear all header and footer fields
\fancyhead[R]{\thepage} % except the center
}
\begin{document}

\blinddocument

\end{document}


Solution with titleps

\documentclass{scrbook}

\usepackage{blindtext}

\usepackage[a4paper]{geometry}

\usepackage{titleps}% http://ctan.org/pkg/titleps
\newpagestyle{main}{
{}% center
{\thepage}%       right
}
\pagestyle{main}
\begin{document}
\blinddocument
\end{document}


Solution with scrpage

\documentclass[a4paper,11pt]{scrbook}

%\usepackage{scrlayer-scrpage} %head-foot koma new
\usepackage{scrpage2} % Old package