# Table of contents using article and report classes

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}

-

## 2 Answers

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.

-
1. The report class has been designed for typesetting large documents with chapters in contrary to the article class which doesn't support chapters. That's why reports may contain more extensive TOCs containing more sectioning levels, thus a different layout could be meaningful.

2. Consider to use a package to design the table of contents, for instance tocloft or titletoc.

-
By default, in the report class, the tocdepth counter is set to 2 (so that the "lowest-ranking" heading going into the TOC is \subsection), while in the article class tocdepth is 3 (so that a \subsubsection will make it into the TOC). It seems Leslie Lamport didn't have different TOC layouts for report vs. article in mind. –  lockstep Nov 6 '10 at 21:40
@lockstep: good point :) at least the report's TOC has a "chapter look" regarding heading and its spacing. –  Stefan Kottwitz Nov 6 '10 at 22:08