KOMA-Script Wiki (English)
KOMA-Script is a bundle of versatile LaTeX classes and packages
Brought to you by:
kohm
scrreprt
or scrbook
without spacing for new chaptersThe scrreprt
and scrbook
classes normally insert a small vertical space into floating environment directories when starting a new chapter. In particular, if you change the numbering of the floating environments, for example using:
\counterwithout{figure}{chapter}
\counterwithout{table}{chapter}
independently of the chapter numbering and thus being continual throughout the document, it can be useful to switch off this spacing. The easiest way to do this with the two KOMA-Script classes is with the option listof=nochaptergap
:
\documentclass[listof=nochaptergap]{scrbook}
\usepackage{mwe}
\counterwithout{figure}{chapter}
\counterwithout{table}{chapter}
\begin{document}
\tableofcontents
\listoffigures
\listoftables
\chapter{The first chapter}
\blindtext
\begin{figure}
\centering
\includegraphics{example-image-a}
\caption{Example A image in chapter \thechapter}
\end{figure}
\begin{table}
\caption{Example for a missing table}
\end{table}
\blindtext
\begin{table}
\caption{Example for another missing table}
\end{table}
\begin{figure}
\centering
\includegraphics{example-image-b}
\caption{Example B image in chapter \thechapter}
\end{figure}
\chapter{One more chapter}
\blindtext
\begin{figure}
\centering
\includegraphics{example-image-a}
\caption{Example A image in chapter \thechapter}
\end{figure}
\begin{table}
\caption{Example for a missing table}
\end{table}
\blindtext
\begin{table}
\caption{Example for another missing table}
\end{table}
\begin{figure}
\centering
\includegraphics{example-image-b}
\caption{Example B image in chapter \thechapter}
\end{figure}
\end{document}
Note: After changing option listof
you need at least two LaTeX runs to see the difference in the resulting PDF.