Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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...

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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}
share|improve this answer
    
I have a follow up problem described here. –  algomachine Apr 12 '12 at 11:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.