# Chapter list in TOC whilst using \chapter{} only

I have a fiction book to typeset and I am using scrbook class as I thought that it is very flexible. For every chapter beginning I am using \chapter{} command and leave the field inside {} empty, so the command gives me only the text "Chapter 1." and so on.

However, if there is no name for a chapter, it does not appear in TOC. Is it possible to make them appear?

I hope this explains what I'm trying to achieve.

EDIT1: I am strongly considering to use memoir class, so if somebody knows how to do this in memoir class, please, let me know.

EDIT2: I just noticed, that with memoir class it happens automatically, but I am still interested in scrbook class hacks.

-

With scrbook you can get what you want with the following:

\documentclass{scrbook}
\renewcommand{\numberline}[1]{\chaptername~#1}
\begin{document}
\tableofcontents
\chapter{\null}
abc
\chapter{\null}
def
\end{document}


I assume that you don't use sections; in that case the trick must be different.

For using also parts, one can take a different approach:

\documentclass{scrbook}
\usepackage{etoolbox}

\makeatletter
\def\part@numberline#1{\partname~#1}
\def\chapter@numberline#1{\chaptername~#1}
\patchcmd{\l@part}{\begingroup}{\begingroup\let\numberline\part@numberline}{}{}
\patchcmd{\l@chapter}{\begingroup}{\begingroup\let\numberline\chapter@numberline}{}{}
\makeatother

\begin{document}
\tableofcontents
\part{\null}
\chapter{\null}
abc
\chapter{\null}
def
\end{document}

-
This works if I am using only chapters. Is it possible to do it if I have parts and chapters? Thanks –  gns-ank Aug 10 '12 at 0:12
That's an amazing answer... Thank you so much! –  gns-ank Aug 10 '12 at 14:33

You can use the two lines code before every chapter to do it:

\chapter[]{}


Minimal example:

\documentclass{scrbook}

\begin{document}
\tableofcontents
\chapter[]{}

\end{document}


But before every chapter you will not get the word chapter, only the chapter number.

-

And here's a solution for the book document class. It relies on using the tocloft package.

\documentclass{book}
\usepackage{tocloft}
\renewcommand\cftchappresnum{Chapter }
\begin{document}
\frontmatter
\tableofcontents
\mainmatter
\chapter{}
\chapter{}
\end{document}


-