6

Is there a short way to decrease the indent of the TOC? I think that the indent is too much since I use:

\setcounter{tocdepth}{3}
\setcounter{secnumdepth}{3}

The whole definition is: \documentclass[a4paper,12pt,bibliography=totoc,listof=totoc,toc=indent]{scrreprt}

This is sure an indent TOC. I simply would like to have a "not-so-much" indent version of it. For example, half indent of the current indent of the regular style.

Like so:

\documentclass[a4paper,12pt,bibliography=totoc,listof=totoc,toc=indent]{scrreprt}
\setcounter{tocdepth}{3}
\setcounter{secnumdepth}{3}
\begin{document}
\tableofcontents
\chapter{Chap0}
\section{sec0}
\subsection{subsec0}
\subsubsection{subsubsec0}
\subsection{subsec1}
\section{sec1}
\chapter{Chap1}
\end{document}

Result:

Enter image description here

But I'd prefer half of the indent of this standard style.

5
  • What do you mean? Do you want a flat toc? Please explain yourself with a minimal working example.
    – Johannes_B
    Aug 12, 2015 at 12:21
  • I simply would like to have a "not so much" indent version of it. Added to the question.
    – BennX
    Aug 12, 2015 at 12:24
  • Added an example. Thanks for your attention.
    – BennX
    Aug 12, 2015 at 12:32
  • 1
    You can use \RedeclareSectionCommand[tocindent=2em]{section} and similar for others and choose the values yourself. Up to date KOMA needed.
    – Johannes_B
    Aug 12, 2015 at 12:33
  • Thanks alot! Add it as answer and i'll accept it. Works great and i can indent everything as i whish. I couldn't find the redeclare with any example.
    – BennX
    Aug 12, 2015 at 12:35

2 Answers 2

6

Use the documented interface to change the appearance of structural commands in the toc and mid-document.

bennnKomaTocIndent

\documentclass[a4paper,12pt,bibliography=totoc,listof=totoc,toc=indent]{scrreprt}
\RedeclareSectionCommand[tocindent=1em]{section}
\RedeclareSectionCommand[tocindent=1.5em]{subsection}
\RedeclareSectionCommand[tocindent=2em]{subsubsection}
\setcounter{tocdepth}{3}
\setcounter{secnumdepth}{3} 
\begin{document}
\tableofcontents
\chapter{Walzing Wombat}
\section{Samba Snake}
\subsection{Tango Tiger}
\subsubsection{Dixie Duck}
\subsection{Rock and Roll Racoon}
\section{Limbo Lion}
\chapter{Pogo Penguin}
\end{document}
5

You can redefine the indentation in the table of contents as described here. The example below shows how your code could be modified:

\documentclass[a4paper,12pt,bibliography=totoc,listof=totoc,toc=indent]{scrreprt}
\setcounter{tocdepth}{3}
\setcounter{secnumdepth}{3} 
\makeatletter
 \renewcommand*\l@section{\@dottedtocline{1}{0.5em}{2.3em}}
 \renewcommand*\l@subsection{\@dottedtocline{2}{1.0em}{3.2em}}
 \renewcommand*\l@subsubsection{\@dottedtocline{3}{2.0em}{4.1em}}
\makeatother
\begin{document}
\tableofcontents
\chapter{Chap0}
\section{sec0}
\subsection{subsec0}
\subsubsection{subsubsec0}
\subsection{subsec1}
\section{sec1}
\chapter{Chap1}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .