How do I place vertical spacing between the chapter header and the first section entry (report document class). For example, I would like:
Chapter 1 Title
1.1 Title
1.2 TitleChapter 2 Title
1.1 Title
1.2 Title
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityHow do I place vertical spacing between the chapter header and the first section entry (report document class). For example, I would like:
Chapter 1 Title
1.1 Title
1.2 TitleChapter 2 Title
1.1 Title
1.2 Title
You can use redefine \cftchapafterpnum
from the tocloft
package to add vertical space after the chapter entries:
\documentclass{report}
\usepackage{tocloft}
\renewcommand\cftchapafterpnum{\vskip15pt}
\begin{document}
\tableofcontents
\chapter{Test Chapter One}
\section{Section One One}
\section{Section One Two}
\chapter{Test Chapter Two}
\section{Section Two One}
\section{Section Two Two}
\end{document}
Without using additional packages, a redefinition of the internal command \@chapter
(implemented in report.cls
) will do the job (see the line marked with a%NEW
):
\documentclass{report}
\makeatletter
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter.}%
\addcontentsline{toc}{chapter}%
{\protect\numberline{\thechapter}#1}%
\else
\addcontentsline{toc}{chapter}{#1}%
\fi
\chaptermark{#1}%
\addtocontents{toc}{\protect\addvspace{15\p@}}% NEW
\addtocontents{lof}{\protect\addvspace{10\p@}}%
\addtocontents{lot}{\protect\addvspace{10\p@}}%
\if@twocolumn
\@topnewpage[\@makechapterhead{#2}]%
\else
\@makechapterhead{#2}%
\@afterheading
\fi}
\makeatother
\begin{document}
\tableofcontents
\chapter{Test Chapter One}
\section{Section One One}
\section{Section One Two}
\chapter{Test Chapter Two}
\section{Section Two One}
\section{Section Two Two}
\end{document}