Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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)

share|improve this question
add comment

2 Answers

up vote 9 down vote accepted
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt} % optional
\fancyhead[L]{\nouppercase{\leftmark}}
\fancyhead[R]{\thepage}
share|improve this answer
    
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
add comment

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}{%
  \headrule\sethead{\chaptername\ \thechapter. \chaptertitle}{}{}
  \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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.