# Unnumbered chapter in toc and heading

I'm writing a thesis using scrreprt and want the preface to appear as an unnumbered chapter. When I use

\chapter*{Preface}


I get the correct entry in the table of contents, but the heading is not set correctly by srclayer-scrpage. Instead I get the title of the previous chapter in the heading, which happens to be "List of Figures" in my case.

I guess I could manually refresh the chapter title for the heading as well, but probably there is a more elegant way to solve this problem?

Of course I figured it out a few minutes after posting the question…

The right command to use is \addchap provided by KOMA-Script for scrbook and scrreprt. Using

\addchap{Preface}


Another way is to use the scrbook class and then use the macros \frontmatter, \mainmatter, \backmatter. If you use the first one just before the \begin{document} line then you can use easily chapters without troubles for add them at the toc. Something like this:

\documentclass[]{scrbook}
\usepackage[]{}
\usepackage[]{}
\usepackage[]{}
.
.
.
\usepackage[]{}

\begin{document}
\frontmatter

\chapter{Preface}
\tableofcontents
\listoftables
\listoffigures

\mainmatter

\chapter{One}
\chapter{Two}
\chapter{Three}
.
.
.
\chapter{Last}

\appendix

\chapter{First appendix}
\chapter{Second appendix}

\backmatter

Bibliography

\end{document}


The schematic structure above shows the use of those macros available with the scrbook class that ease the use of different kind of chapters with or without numbers.