# Header for frontmatters using scrpage2

How to set page numbers for front matters similar to main matters. Main matters header need to have chapter title also. Not added in MWE. Front matters must have only page number as in main matters of MWE.

%
\documentclass[12pt]{scrbook}

\usepackage{scrpage2}
\usepackage{amsmath}
\usepackage{graphicx}

\author{You}

\begin{document}
\frontmatter
\maketitle
\tableofcontents

\mainmatter
\chapter{First}
\section{Introduction}
Text

\section{Some Examples}
Text

\subsection{Sections}
Text

\clearpage
\subsection{Tables and Figures}
Text

\end{document}


Use the scrplain pagestyle for \frontmatter, and switch to scrheadings for \mainmatter. Optionally, redefine the \chapterpagestyle command at \mainmatter. If you want the first pages of frontmatter and mainmatter chapters to show no header/footer at all, add \renewcommand*{\chapterpagestyle}{empty} to the preamble.

\documentclass[12pt]{scrbook}

\usepackage{scrpage2}

\renewcommand*{\chapterpagestyle}{empty}

\begin{document}

\frontmatter
\pagestyle{scrplain}

\author{You}
\maketitle

\tableofcontents

\mainmatter

\chapter{First}
\section{Introduction}
Text

\section{Some Examples}
Text

\subsection{Sections}
Text

\clearpage
\subsection{Tables and Figures}
Text

\end{document}

• How to remove page number in chapter title page. Jul 2, 2013 at 6:52
• @sandu In that case one may need more than two page styles. To be sure: How exactly should the first page of frontmatter chapters (e.g., the ToC) look like, and how the first page of main matter chapters? Jul 2, 2013 at 6:57
• The first page of frontmatter chapters (e.g., the ToC) and the first page of main matter chapters both look similar. No header or footer in the first page of chapter. Jul 2, 2013 at 7:02
• @sandu I'll assume they should be empty (without page number and without chapter title). Jul 2, 2013 at 7:05
• yes they should be empty. Jul 2, 2013 at 7:08