# How to get only “Chapter 1. The title of the chapter” in the left of header

I am trying to use fancyhdr, but I can't get it to not show the section and to keep the normal case for title and 'Chapter'.

How can I have my heading to be "Chapter 1. The title of the chapter" (left aligned on all pages)

-

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}

-
Thanks! I removed the \thepage as I already have the page number in the bottom. I now found out that removing the section is just a matter of overwriting it with this commands. –  Peter Smit May 26 '11 at 10:28

The titlesec package offers a very good alternative to the fancyhdr package for designing page styles; here's a little example doing what you need:

\documentclass{book}
\usepackage[pagestyles]{titlesec}
\usepackage{lipsum}% to generate filler text

\newpagestyle{mystyle}{%
\setfoot{}{\thepage}{}}
\pagestyle{mystyle}

\begin{document}

\chapter{Test chapter}
\section{Test section}
\lipsum[1-40]

\end{document}


delete \headrule if you don't need the rule below the headline.

-