2

I have the problem that the space between the part number and the part name in my table of contents is too small. I tried a lot of solutions which I found on the internet but nothing happened.

Could you help me with the space between part number and part name of the table of contents?

Here is a small example of my problem with the settings used by me. I prefer not to change the document class.

Thanks a lot Latex community :)

Here the example with part "Audi" making the problem:

enter image description here

\documentclass[a5paper,pagesize,14pt,bibtotoc,pointlessnumbers,
normalheadings,DIV=9,twoside=true]{scrbook}

\KOMAoptions{DIV=last}

\setlength{\parindent}{0pt}

\usepackage{trajan}

\usepackage{graphicx}

\usepackage[ngerman]{babel}

\usepackage[utf8]{inputenc}

\usepackage[T1]{fontenc}

\usepackage[babel,german=guillemets]{csquotes}

\usepackage[sc]{mathpazo}

\linespread{1.05} 

\usepackage{verbatim} % for comments

\usepackage{listings} % for comments

\usepackage[justification=centering]{subfig}

\usepackage{blindtext}

\setlength{\parindent}{0pt} %Wenn Absatzabstand, dann Einzug unnötig

\usepackage{vmargin}

\usepackage{here}

\usepackage{chngcntr}

\begin{document}
%=========================================

\setcounter{tocdepth}{0} % Show sections

\tableofcontents

\thispagestyle {empty}

%=========================================

\part{Porsche}

\part{Mercedes}

\part{Volkswagen}

\part{BMW}

\part{Toyota}

\part{Fiat} 

\part{McLaren} 

\part{Audi}

\part{Opel}

\end{document}
zyy
  • 2,146

1 Answers1

2

To change with KOMA-Script the distance between number and text you can use

\RedeclareSectionCommand[tocnumwidth=2.5em]{part}

Your used options for KOMA-Script are old ones. With an current version of KOMA-Script you should use the following options (check your log file for warnings!):

\documentclass[%
  paper=a5,
  pagesize,
  fontsize=14pt,
  bibliography=totoc,
  numbers=noenddot,
  headings=normal,
  DIV=9,
  twoside=true
]{scrbook}

Some of the packages you use are obsolete and schould not be used any longer.

Please have a look to the following MWE

\documentclass[%
  paper=a5,
  pagesize,
  fontsize=14pt,
  bibliography=totoc,
  numbers=noenddot,
  headings=normal,
  DIV=9,
  twoside=true
]{scrbook}

\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{trajan} % <============================================= ???
\usepackage[sc]{mathpazo}

\usepackage{graphicx}
\usepackage[babel,german=guillemets]{csquotes}

\usepackage{verbatim} % for comments
\usepackage{listings} % for comments
\usepackage[justification=centering]{subfig} % caption/subcaption ??
\usepackage{blindtext}

%\usepackage{vmargin} % <===== obsolete, use geometry or KOMA-Script
%\usepackage{here}    % <===== obsolet, use float
%\usepackage{chngcntr}

%\setlength{\parindent}{0pt} %Wenn Absatzabstand, dann Einzug unnötig
\linespread{1.05} 
\RedeclareSectionCommand[tocnumwidth=2.5em]{part} % <===================


\begin{document}

\setcounter{tocdepth}{0} % Show sections

\tableofcontents

\thispagestyle {empty}

%=========================================

\part{Porsche}

\part{Mercedes}

\part{Volkswagen}

\part{BMW}

\part{Toyota}

\part{Fiat} 

\part{McLaren} 

\part{Audi}

\part{Opel}

\end{document}

with the resulting toc:

enter image description here

Mensch
  • 65,388
  • You could also use tocdynnumwidth instead tocnumwidth=2.5em, but this would need an additional run. – esdd Nov 05 '18 at 10:16