[Tex/LaTex] Table of contents using article and report classes

document-classesformattingtable of contents

When I make a table of contents with the article and report classes the results are different. I have two questions.

  1. Why does this happen?

  2. How can I make the report ToC look like the article one?

Here are a pair of examples:

\documentclass[]{report}
\usepackage{lipsum}
\begin{document}
\tableofcontents
\section{Section}
\lipsum
\end{document}

\documentclass[]{article}
\usepackage{lipsum}
\begin{document}
\tableofcontents
\section{Section}
\lipsum
\end{document}

Best Answer

By default, the "top-level" entries in a table of contents will be typeset in bold and without a dotted line between entry name and page number. For the article class, the "top level" is \section, while for the report (and the book) class it's \chapter. Simply changing \section to \chapter in your first example will result in (roughly) the same TOC layout.