Consider the following simplified TOC style (yes, the real-life version does look better than this MWE). Thing looks okay except for the fact that the first TOC line lies one line below where it should be. Compare page 1 and 2.
This is a result of the space between the chapter entries in TOC being implemented via \addvspace{\baselineskip}
as a ›before-code‹ (as the titletoc doc calls it): before every chapter entry, an empty line is produced. Which is good except before the very first entry. How do we get rid of it? My experiments with negative space haven't been too successful, and using the titlesec ›after-code‹ isn't an option either, as it's not invoked after the entire chapter chunk, but after that chunk's chapter line (option B in this MWE).
Note that \addvspace{\baselineskip}
is the vertical spacing method officially endorsed by titlesec
. It seems odd that apparently extra work has to be done in order to restore LaTeX's standard behavior: the problem disappears if we don't redefine the TOC chapter style or unload titlesec
entirely.
\documentclass{scrreprt}
\usepackage{blindtext,titletoc}
\titlecontents{chapter}[0em]%
{\addvspace{\baselineskip}}% (A)
%{}% (B)
{\thecontentslabel\enskip}%
{}%
{\quad\emph{\thecontentspage}}%
[]% (A)
%[\addvspace{\baselineskip}] % (B)
\titlecontents{section}[0em]{}
{\thecontentslabel\enskip}%
{}%
{\quad\emph{\thecontentspage}}%
[]
\begin{document}
\tableofcontents
\chapter{Lorem}\blindtext
\chapter{Lorem}\blindtext
\chapter{Lorem}\blindtext
\section{Ipsum}\blindtext
\section{Ipsum}\blindtext
\section{Ipsum}\blindtext
\end{document}
\AfterTOCHead[toc]{\vspace*{-\baselineskip}}
in the preamble will help.