# Changing TOC spacing and adding words to TOC using scrbook

• First the word "Chapter" must be inserted above the first chapter and aligned with the numerals.

• Second, I need to insert an empty line between different levels, i.e. one line between a chapter entry and a section, but not between multiple sections and so on.

• Also, I'd like to capitalize all the chapter titles. Right now, I've done this by naming the chapters in all caps in their own files, but I feel there must be a better way.

Here's my MWE.

\documentclass[oneside,11pt,paper=letter,listof=nochaptergap]{scrbook}

\usepackage[right=1in,top=1in,bottom=1in,left=1.5in]{geometry} % margins

\KOMAoptions{bibliography=totoc}

\DeclareTOCStyleEntry[
beforeskip=\baselineskip,
indent=0pt
]{default}{figure}
\DeclareTOCStyleEntry[
beforeskip=\baselineskip,
indent=0pt
]{default}{table}
\DeclareTOCStyleEntry[
beforeskip=\baselineskip,
indent=0pt
]{default}{chapter}

\begin{document}

\frontmatter % start roman numerals on title page

\chapter{Abstract}
this is an abstract.

\tableofcontents % (required)

\renewcommand{\listtablename}{LIST OF TABLES}
\listoftables % (when appropriate)

\renewcommand{\listfigurename}{LIST OF FIGURES}
\listoffigures % (when appropriate)

\mainmatter

\chapter{First Chapter}
this is a chapter
\captionof{figure}{Figure in first chapter}
\section{Section}
\section{No Space Between Us}
\subsection{But I Need a Space}

\chapter{Second Chapter}
this is a chapter
\section{Section}
\section{No Space Between Us}
\subsection{But I Need a Space}

\end{document}


Edit:

I managed to get the spacing right by adding:

\DeclareTOCStyleEntry[
onstarthigherlevel= \vspace{\baselineskip},
onstartlowerlevel= \vspace{\baselineskip}
]{default}{section}
\DeclareTOCStyleEntry[
onstarthigherlevel= \vspace{\baselineskip},
onstartlowerlevel= \vspace{\baselineskip}
]{default}{subsection}


Also, it looks like I can add the word "Chapter" with \addxcontentsline, however it comes with a page number that I can't figure out how to remove. Any ideas what to do about this?

You can declare an own entry style for the chapter prefix and patch \addchaptertocentry and \addchapterlinesformat:

\documentclass[oneside,paper=letter]{scrbook}
\usepackage{blindtext}% only for dummy text
\usepackage[margin=1in,left=1.5in]{geometry}

\KOMAoption{listof}{totoc,nochaptergap}
\KOMAoptions{bibliography=totoc}

\DeclareTOCStyleEntry[
level=\chaptertocdepth,
numwidth=0pt,
indent=0pt,
entryformat=\usekomafont{chapterentry},
pagenumberformat=\phantom,
linefill=\hfill
]{default}{chapterprefix}

\DeclareTOCStyleEntries[
beforeskip=\baselineskip,
indent=0pt
]{default}{chapterprefix,chapter,figure,table}

\DeclareTOCStyleEntries[
onstarthigherlevel= \vspace{\baselineskip},
onstartlowerlevel= \vspace{\baselineskip}
]{default}{section,subsection}

\usepackage{xpatch}
\xpatchcmd{\chapterlinesformat}
{#3}
{\MakeUppercase{#3}}
{}{\PatchFailedI}
{%
}
{}{\PatchFailedII}

\begin{document}
\frontmatter
\chapter{Abstract}
This is an abstract.
\tableofcontents
\listoftables
\listoffigures

\mainmatter
\chapter{First Chapter}
This is a chapter
\captionof{figure}{Figure in first chapter}
\section{Section}
\section{No Space Between Us}
\subsection{But I Need a Space}
\chapter{Second Chapter}
This is a chapter
\section{Section}
\section{No Space Between Us}
\subsection{But I Need a Space}
\blinddocument
\blinddocument
\end{document}