1

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...

  • Welcome on tex.stackexchange. Please help us to help you, and consider to edit your post to add a fully compilable code starting with \documentclass and ending with \end{document} – Jhor Sep 24 at 14:45
  • May be adding \phantomsection just after \chapter*{List of abbreviations} will fix the problem. – Jhor Sep 24 at 14:49
0

Unfortunaly there is no MWE in the question. And I am not sure, if I have understood, what you want to do.

With the KOMA-Script class scrreprt you can use \addchap to get an unnumbered chapter with TOC and header entries:

\documentclass[numbers=enddot]{scrreprt}
\usepackage{blindtext}% only for dummy text

\usepackage{fancyhdr}
\pagestyle{fancy}% use this before redefining \chaptermark
\renewcommand*{\chaptermark}[1]{\markboth{\ifnumbered{chapter}{\chaptermarkformat}{}#1}{}}
\fancyhf{} 
\fancyhead[R]{\MakeUppercase{\leftmark}}
\fancyfoot[R]{\thepage}

\renewcommand*\chapterpagestyle{fancy}% chapter pages uses page style fancy, too

\usepackage{hyperref}

\begin{document}
\tableofcontents
\addchap{List of abbreviations}
\Blindtext
\blinddocument
\end{document}

Result:

enter image description here

If the chapter prefix should be in header (like in your pictures) then remove the redefinition of \chaptermark:

\documentclass[numbers=enddot]{scrreprt}
\usepackage{blindtext}% only for dummy text

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{} 
\fancyhead[R]{\leftmark}
\fancyfoot[R]{\thepage}

\renewcommand\chapterpagestyle{fancy}% chapter pages uses page style fancy, too

\usepackage{hyperref}

\begin{document}
\tableofcontents
\addchap{List of abbreviations}
\Blindtext
\blinddocument
\end{document}

Result:

enter image description here


It is recommended to use KOMA-Script package scrlayer-scrheadings with a KOMA-Script class. So here is an additional example using scrlayer-scrpage:

\documentclass[numbers=enddot]{scrreprt}
\usepackage{blindtext}% only for dummy text

\usepackage[automark,markcase=upper,headsepline]{scrlayer-scrpage}
\clearpairofpagestyles
\ohead{\leftmark}
\ofoot{\thepage}
\addtokomafont{pageheadfoot}{\normalfont}
%\renewcommand*\chaptermarkformat{\chapapp~\thechapter\autodot\enskip}
\renewcommand\chapterpagestyle{scrheadings}

\usepackage{hyperref}

\begin{document}
\tableofcontents
\addchap{List of abbreviations}
\Blindtext
\blinddocument
\end{document}
  • Man/Woman I could kiss you right now. I was one step away from deserting my academic career and go live as a sheperd somewhere. Thank you so very much! So what helped me here was the following: As suggested, I changed \chapter*{LOA} to \addchap{LOA} and also I used \renewcommand*\chapterpagestyle{fancy} so that chapter pages use the 'fancy' style as well and this did the trick. Amazing! So simple, yet I would have never come up with it because there's just too much information and possibilities with each package I imported. – Viggar Sep 25 at 8:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.