I'm currently writing my thesis, using the book class. I am trying to display the table of contents in this manner:

And each chapter is displayed this way:

I'm fairly new to latex and this is my first time writing a thesis so I don't know exactly how to format it this way. Any ideas would be great!

Thanks!

• okay so the default display for chapter is what i had shown (somehow i missed that), so I'd just like to get an idea about how to modify the toc i think Dec 24, 2013 at 0:51

The following patch of \l@chapter via etoolbox is sufficient:

\documentclass{report}
\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox
\makeatletter
\patchcmd{\l@chapter}% <cmd>
{#1}% <search>
{\def\numberline##1{\@chapapp~##1\hfill\mbox{}\par\nobreak}#1}% <replace>
{}{}% <success><failure>
\makeatother

\begin{document}

\tableofcontents

\chapter{Introduction}

\chapter{Preliminaries}
\section{Problem definition}
\section{Genetic algorithms}
\section{Ant algorithms}
\section{Previous work}
\end{document}

• Wanna tackle the other question of that user? It seems to be based on you code here (guesswork, no MWE). Trouble adding appendix to ToC Feb 8, 2015 at 20:41