# Indents of section*{} name in TOC

I have some sections (e.g. References) that don't have a section number. However, I'd like to include them in the TOC with \addcontentsline{toc}. But how can this manually added section be aligned to all other sections in the TOC. So probably I need the indentatoin space that is reserved for the section numbers and at it to \addcontentsline{toc}{section}{\hspace{definedspace}Test Section One Three}.

\documentclass{scrreprt}

\begin{document}

\tableofcontents

\chapter{Test Chapter One}
\section{Test Section One One}
\section{Test Section One Two}

\addcontentsline{toc}{section}{Test Section One Three}
\section*{Test Section One Three}

\end{document}

• \addcontentsline{toc}{section}{\protect\numberline{}Test Section One Three} Apr 16 '14 at 13:48
• Note also that \addcontentsline should go after \section*, because otherwise the entry in the table of contents could be off by one. Apr 16 '14 at 14:12

## 1 Answer

Use option toc=indentunnumbered to setup the table of contents to indent entries without number and command \addsec to add such sections automatically to the table of contents:

\documentclass[toc=indentunnumbered]{scrreprt}

\begin{document}

\tableofcontents

\chapter{Test Chapter One}
\section{Test Section One One}
\section{Test Section One Two}

\addsec{Test Section One Three}

\end{document}


Maybe you need current KOMA-Script version to be able to use option toc=indentunnumbered.