I am currently writing a report (documentclass: scrreport) for my University. I'm pretty close to the deadline and I'm only polishing the formatting at the moment but there's one problem I can't get a solution to.
I want to include a list of abbreviations (LOA) (which I have produced manually) in between my TOC and the introduction. But whichever way I try it, there's always a problem. The current setup (the one closest to what I need) is that the LOA is a chapter but without the counting:
\chapter*{List of abbreviations}
The LOA now shows up in my TOC as it should: its page is a roman numeral. However, the problem is that the TOC shows my LOA as chapter 1, but when I click on it, it jumps to the introduction which shows up as "2" in the TOC but still as "1" in the text. Also, the header for the LOA now says "Contents", instead of "List of abbreviations".
I have tried many things, like declaring another
\fancypagestyle{}
and assigning it to only my LOA but it didn't work and the new pagestyle has been adapted to every page - apart from the pages whith new chapters on them, which use the "plain" style afaik.
I've got to say that I don't really understand the fancyhdr package, even though I read the manual. I assume the problem has something to do with this package but I don't see what it could be.
This is the MWE:
\documentclass[a4paper, 11pt]{scrreprt}
\usepackage[url=false, style=ieee]{biblatex}
\usepackage[left=2.5cm, right=2.5cm]{geometry}
\usepackage{fancyhdr}
\renewcommand{\chaptermark}[1]{\markboth {\MakeUppercase{\thechapter.\ #1}}{}}
\fancyhf{}
\fancyhead[R]{ \leftmark}
\fancyfoot[R]{\thepage}
\fancypagestyle{fancy2}{
\fancyhead{}
\fancyhead[R]{\MakeUppercase{List of abbreviations}}
}
\fancypagestyle{plain}{
\fancyhead[R]{ \MakeUppercase{\leftmark}}
\fancyfoot[R]{\thepage}
}
\pagestyle{plain}
\pagestyle{fancy}
\usepackage{hyperref}
\hypersetup{
colorlinks = true
}
%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%
\pagenumbering{Roman}
\tableofcontents
\newpage
\chapter*{List of abbreviations}
This is the kind of text you would expect in a list of abbreviations.
\newpage
\pagenumbering{arabic}
\chapter{Chapter 1}
This is the kind of text you would expect in chapter 1.
\chapter{Chapter 2}
This is the kind of text you would expect in chapter 2.
\end{document}
Note that in the original document I use 'subfiles' which I couldn't implement in this example but might have some effect because now, the LOA doesn't show up in the TOC and the chapter numbering is correct...
\documentclass
and ending with\end{document}
– Jhor Sep 24 '19 at 14:45\phantomsection
just after\chapter*{List of abbreviations}
will fix the problem. – Jhor Sep 24 '19 at 14:49