I am writing my thesis with scrbook-class in XeLaTex. My figures and tables have to be numbered throughout the document (not within chapters) and I want them to be spelled out ("Abbildung" and "Tabelle" is done by ngerman automatically). I also have to add the abbreviated figure- and tablename ("Abb." and "Tab.") in the list of figures and tables, which I did with listof=entryprefix
and changing the entryname with e.g. \renewcommand*\listoflofentryname{Abb.}
.
Since I have a lot of figures and tables, I would like the chapters to show up in the lists of floats to give it more structure and ease the search, which can be done by chapteratlists=entry
. So, what I want the list of figures/tables to look like is this:
List of Figures
1 Introduction
Abb. 1 Caption of first Figure...........7
Abb. 2 Caption of second figure.......9
2 Second Chapter
Abb. 3 Caption of third Figure........15
However, the problem is that I get this:
List of Figures
Abb. 1 Introduction
Abb. 1 Caption of first Figure..........7
Somehow, the entryprefix
("Abb."/"Tab") and the chapterprefix
("Kapitel"/"chapter" which I don't want to show up) get mixed up and the entryprefix is transferred onto the chapterprefix, whether I change the entryname of figures/tables or not and whether I use chapterprefix=false/true
.
This is my MWE:
\documentclass[ngerman,
listof=totoc,
chapteratlists=entry,
chapterprefix=false,% problem remains even if I choose "true"
listof=entryprefix]{scrbook}
\usepackage[ngerman]{babel}
\usepackage{fontspec}
\usepackage{chngcntr}
\counterwithout{figure}{chapter}
\counterwithout{table}{chapter}
\usepackage{mwe}
\usepackage[hidelinks]{hyperref}%
% caption names
\addtokomafont{captionlabel}{\bfseries}
\renewcommand*\listoflofentryname{\bfseries Abb.}% problem remains even if I remove this line
\renewcommand*\listoflotentryname{\bfseries Tab.}% problem remains even if I remove this line
\begin{document}
\tableofcontents
\listoffigures
\listoftables
\blinddocument
\begin{figure}[!h]
\centering
\rule{5cm}{2cm}
\caption{First figure.}
\end{figure}
\begin{table}[h]
\caption{First table.}
\noindent
\centering
\begin{tabular}{|c|c|}
\hline
a & b\tabularnewline
\hline\hline
1 & 2\tabularnewline
\hline
\end{tabular}
\end{table}
\begin{figure}[!h]
\centering
\rule{5cm}{2cm}
\caption{Second figure.}
\end{figure}
\begin{table}[h]
\caption{Second table.}
\noindent
\centering
\begin{tabular}{|c|c|}
\hline
a & b\tabularnewline
\hline\hline
1 & 2\tabularnewline
\hline
\end{tabular}
\end{table}
\end{document}
Of course I read the KOMA documentation. Although it is so detailed or maybe because I am no expert, I could not find an advice for my problem and would be very glad for any help to get my desired output. Thank you!