# Contents in heading where I want preface

I'm trying to start a book in LaTeX, and I have a preface, which is in the frontmatter of the book. Unfortunately, it keeps showing 'Contents' in the header after the table of contents.

Basically, what I want is for it to show 'Contents' in the first two pages of the front matter (the pages actually devoted to the table of contents), and then the chapter title in the headings after that.

My main document:

\documentclass[12pt]{book}

\begin{document}
\frontmatter
\title{A Book}
\author{Jwir3}

\maketitle

\tableofcontents
\include{preface}

\mainmatter

\end{document}


My preface.tex document (included):

\cleardoublepage

\chapter*{Preface}

Blah blah blah.. rambling for a couple of pages...

-

Don't use \chapter* but \chapter. Since you are using \frontmatter every thing will be taken care of and no chapter number will be used.

\documentclass[12pt]{book}

\begin{document}
\frontmatter
\title{A Book}
\author{Jwir3}

\maketitle

\tableofcontents
\cleardoublepage