0

I would like to customize the table of content (KOMA-Script class scrbook). I would like to (1) reduce the space between the chapter entries, (2) indent the chapter entries and (3) make the font for the parts entry larger. How can this be achieved? I read the KOMA-Script guide, but got confused with the options in tocbasic.

\documentclass{scrbook}
\KOMAoptions{paper=      
    128.5mm:198.4mm, %(5,06" x 7,91")  %ziel
    DIV=9,  %ziel kleines buch 
    fontsize=12pt,
}


%%%% Sprache
\usepackage[german]{babel}  %scheint 

%%%% table of content
\setcounter{tocdepth}{0} %   1 gibt parts und chapter und sections

%%% schrift fuer alle eintraege
\setkomafont{disposition}{\rmfamily\normalcolor}
%conflict with specific settings 

%
%%for table of content
\setkomafont{partentry}{\mdseries\scshape\lowercase} %\LARGE loop
\setkomafont{chapterentry}{\mdseries\scshape\lowercase}
%

\usepackage{fontspec}

%%%%% FONTS 
\newfontfamily{\titlefont}{CormorantGaramond}   %for the titles



\begin{document}
    \frontmatter
        \tableofcontents

    \mainmatter

\part{ Philosophie}
\chapter{  \textit{Vom Schreiben}}

Man spricht davon, dass es heute schwierig sei zu schreiben. 

\end{document}
1

Either use \DeclareTOCStyleEntry

\DeclareTOCStyleEntry[
  entryformat=\mdseries\scshape\LARGE,
  pagenumberformat=\normalfont\normalsize
]{tocline}{part}
\DeclareTOCStyleEntry[
  indent=2em,
  beforeskip=0pt plus .2pt,
  entryformat=\scshape
]{tocline}{chapter}

or \RedeclareSectionCommand (same options but with prefix toc):

\RedeclareSectionCommand[
  tocentryformat=\mdseries\scshape\LARGE,
  tocpagenumberformat=\normalfont\normalsize
]{part}
\RedeclareSectionCommand[
  tocindent=2em,
  tocbeforeskip=0pt plus .2pt,
  tocentryformat=\scshape
]{chapter}

Additional remark: Do not use \lowercase in the second argument of \setkomafont or \addtokomafont, because \lowercase not a font changing command.

Suggestion:

\documentclass{scrbook}
\KOMAoptions{
  paper=128.5mm:198.4mm,
  DIV=9,
  fontsize=12pt
}
\usepackage[ngerman]{babel}% ngerman
\usepackage{fontspec}
%\newfontfamily{\titlefont}{CormorantGaramond}% \titlefont is already defined!

\setkomafont{disposition}{\rmfamily\normalcolor}

\RedeclareSectionCommand[
  tocentryformat=\mdseries\scshape\LARGE,
  tocpagenumberformat=\normalfont\normalsize
]{part}
\renewcommand*{\addparttocentry}[2]{%
  \addtocentrydefault{part}{\lowercase{#1}}{\lowercase{#2}}%
}
\RedeclareSectionCommand[
  tocindent=2em,
  tocbeforeskip=0pt plus .2pt,
  tocentryformat=\scshape
]{chapter}
\newcommand*{\originaladdchaptertocentry}{}
\let\originaladdchaptertocentry\addchaptertocentry
\renewcommand*{\addchaptertocentry}[2]
  {\originaladdchaptertocentry{#1}{\lowercase{#2}}}

\begin{document}
\frontmatter
\tableofcontents

\mainmatter
\part{ Philosophie}
\chapter{\textit{Vom Schreiben}}
Man spricht davon, dass es heute schwierig sei zu schreiben.
\chapter{Weiteres Kapitel}

\end{document}

enter image description here

1
  • Thank you - this is a very helpful answer and I am impressed how clearly you expressed the necessary steps (more steps than what I expected)! - I will use the first (DeclareTOCStyleEntry) solution as I expect it to be more flexible for future adaptations. – user855443 Apr 19 '20 at 8:26
1

Even if it is not recommended for use with KOMA-Script classes, I've found the tocloft package easy to use and efficient to get a good toc for a book in short time. I never had problems in combination with the scrbook class.

You could use something like this:

\usepackage{tocloft}
\setlength{\cftaftertoctitleskip}{0cm}
\renewcommand{\cftdot}{\normalfont\normalsize.}

\setlength{\cftbeforepartskip}{0.5cm}
\setlength{\cftpartnumwidth}{1em}
\renewcommand{\cftpartdotsep}{\cftnodots}
\renewcommand{\cftpartfont}{\mdseries\scshape\large}
\renewcommand{\cftpartpagefont}{\normalfont}

\setlength{\cftbeforechapskip}{0.1cm}
\setlength{\cftchapindent}{1em}
\renewcommand{\cftchapdotsep}{\cftnodots}
\renewcommand{\cftchapfont}{\mdseries\scshape}
\renewcommand{\cftchappagefont}{\normalfont}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.