# Tocloft + KOMA, get rid of numberings in table of content, but keep them in the content

I am using the documentclass scrbook (KOMA) with tocloft and would like to get rid of all the numberings of the chapters, sections and subsections in the table of content, but not in the content itself. How can I do that? I searched a lot, but couldn't find anything.

I tried

 \renewcommand{\thechapter}{}


but then all the numberings will disappear...

-

You could simply redefine the LaTeX/scrbook macro \numberline which is responsible for typesetting the number in \contentsline. (Sectioning entries in the header/footer will keep their number.)

\documentclass{scrbook}

\usepackage{tocloft}

\usepackage{lipsum}

\makeatletter

% Original LaTeX definition
% \def\numberline#1{\hb@xt@\@tempdima{#1\hfil}}

% scrbook definition
% \renewcommand*{\numberline}[1]{%
%   \numberline@box{%
%     \numberline@prefix\numberline@numberformat{#1}\numberline@postfix
%   }%
% }

% Variant A -- without number, but with indentation
% \renewcommand*{\numberline}[1]{%
%   \numberline@box{%
%     \numberline@prefix\numberline@numberformat{}\numberline@postfix
%   }%
% }

% Variant B -- without number and indentation
\renewcommand*{\numberline}[1]{}

\makeatother

\begin{document}

\tableofcontents

\chapter{foo}

\section{foobar}

\subsection{foobargnu}

\lipsum

\end{document}

-
I have a follow up problem described here. –  algomachine Apr 12 '12 at 11:04