# fancyhdr: Wrong page number for chapter* in the prefix [duplicate]

In my thesis I have a list of abbreviations between the list of tables and the first chapter. I want to continue the page numbering from the other prefix parts (roman) and then switch to arabic with the first page of the introduction.

I use fancyhdr and redefined the plain settings, which works great for everything except for my list of abbreviations.

The page right before is the list of tables with page number iii and the first page of the abbreviations has a iv. However, the second page of the list of abbreviations suddenly starts with a 1, followed by a 2 on the next page.

How do I get roman numbers for all pages of the abbreviations? The list is done using longtable. I tested using tabbing too and had the same problem.

My document class is \documentclass[a4paper,11pt,oneside, numbers=noenddot]{scrbook}

Here are my fancyhdr settings:

\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{%

\fancypagestyle{plain}{%
\fancyhf{} % clear all header and footer fields
}

\fancyhf{}


The prefix part of the main document looks like this:

\renewcommand{\contentsname}{Table of contents}
\tableofcontents
\pagenumbering{roman} %start page numbering i, ii, iii, ...
\renewcommand{\listfigurename}{List of Figures}
\cleardoublepage
\addcontentsline{toc}{chapter}{\listfigurename} %list of figures in table of content
\listoffigures
\renewcommand{\listtablename}{List of Tables}
\cleardoublepage
\addcontentsline{toc}{chapter}{\listtablename} %list of tables in table of content
\listoftables
\cleardoublepage
\input{pre/listA.tex}


and the input pre/listA.tex looks like this:

\chapter*{List of Abbreviations}

\markboth{LIST OF ABBREVIATIONS}{List of Abbreviations}
\pagenumbering{roman} \setcounter{page}{4}

\section*{Symbols and units}

\begin{longtable}{lll}

$a_s$ & Angstrom constant - clear-sky days [-]  \\
$b_s$ & Angstrom constant - completely overcast days [-] \\
\end{longtable}

\section*{Abbreviations}

\begin{tabular}{ll}

ASCE & American Society of Civil Engineers \\
\end{tabular}

\renewcommand{\chaptermark}[1]{%


## marked as duplicate by Johannes_B, user13907, Mico, Guido, MasroorNov 7 '14 at 9:16

• Please make your code into a complete, small document which people can copy-paste-compile to reproduce the issue. This is much more useful than mere code fragments. By the way, you would be better advised to use the facilities of Koma's built-in interface for configuring headers etc. rather than loading additional packages which will break various features and probably cause both confusion and inconsistencies. – cfr Nov 7 '14 at 0:39
• You are using a KOMA-class, use it the right way. listof=totoc. Package fancyhdr should not be used with KOMA-script, KOMA provides scrlayer-scrpage itself. If you want unnumbered chapters in the toc use, package unnumberedtotoc or have a look at How to use unnumbered chapters with KOMA-script? directly. You don't have to issue cleardoublepages after/before a new chapter. – Johannes_B Nov 7 '14 at 7:54
• With an up to date version of KOMA script, you can get the pagenumber at the outer head by using ohead*{\pagemark} for plain pages as well. But please be aware, that onesided document only have right-hand pages. – Johannes_B Nov 7 '14 at 7:58

 \cleardoublepage

\newpage