4

I'm using the report class, and because of this, my table of contents is also displayed as a chapter (i.e. using a chapter heading for "Contents"). This is overly large, and just causes my ToC to wrap to a new page.

Instead, I would like to use the regular heading from \section. What would be the best way to achieve this?

1 Answer 1

1

You can take the definition of \tableofcontents from report.cls and change chapter to section, see the following example:

\documentclass{report}

\makeatletter
\renewcommand\tableofcontents{%
    \if@twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
    \section*{\contentsname
        \@mkboth{%
           \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
    \@starttoc{toc}%
    \if@restonecol\twocolumn\fi
    }
\makeatother

\begin{document}
\tableofcontents
\chapter{A chapter}
\section{A section}
\subsection{A subsection}
\end{document}
2
  • 1
    I ended up doing something similar by using {\let\chapter\section\tableofcontents}, effectively doing it the other way around: in that case, chapter becomes section in this scope.
    – Joost
    May 22, 2015 at 10:36
  • Using {\let\chapter\section\tableofcontents} doesn't work for me. I use the scrreprt class.
    – matthieu
    Jan 15, 2020 at 15:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .