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.

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}
share|improve this question
add comment

2 Answers

up vote 9 down vote accepted

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.

share|improve this answer
add comment
  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.

share|improve this answer
    
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
add comment

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.