# Modifying toc in KOMA-Script

I have found out that, in KOMA-Script, I can modify the TOC (see the KOMA-manual, page 72). It can be done by using the option toc.

However, how do I use this option? To which command do I have to add it? And (teaching a man to fish) - how can I find this out from the manual?

You can add option toc=<value> as class option

\documentclass[toc=<value>]{<KOMA-Script class>}


or later using

\KOMAoptions{toc=<value>}


or you can use

\KOMAoption{toc}{<value list>}


Examples:

\documentclass[toc=flat,toc=listof]{scrartcl}
\usepackage{blindtext}
\begin{document}
\tableofcontents
\listoffigures
\Blinddocument
\end{document}


or

\documentclass{scrartcl}
\KOMAoptions{toc=flat,toc=listof}
\usepackage{blindtext}
\begin{document}
\tableofcontents
\listoffigures
\Blinddocument
\end{document}


or

\documentclass{scrartcl}
\KOMAoption{toc}{flat,listof}
\usepackage{blindtext}
\begin{document}
\tableofcontents
\listoffigures
\Blinddocument
\end{document}


results all in

There is a table with all possible values of option toc in the documentation (»Table 3.5.: Available values of the toc option to set the format and contents of the table of contents«).

More information regarding the setting of KOMA-Script options can be found eg in section »3.1. Early or Late Selection of Options«.

Note that the KOMA-Script classes load and use package tocbasic for the TOC, LOF, LOT and maybe other lists. So you could also use the macros and settings of tocbasic to modify TOC entries. See »Chapter 15: Managing Content Lists with tocbasic« in »Part II. KOMA -Script for Advanced Users and Experts«.

Well, in chapter 3.9 you can read:

The last sentence tells it to you: chapter 3 discussed the main classes and toc is a class option for them ...

So try the follwing MWE

\documentclass[%
fontsize=12pt,
div=12,
toc=left % <==========================================================
]{scrreprt}

\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{blindtext} % dummy text

\usepackage{lmodern}

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

\begin{document}

\tableofcontents
\Blinddocument

\end{document}


you get the toc:

Change the option for toc=bibliographynumbered you get the following resulting toc: