Site icon texblog

Table of contents, list of figures and tables as sections in a report

By default, the table of contents (TOC), list of figures (LOF) and list of tables (LOT) are typeset as chapters when using the report document class. However, the level of the heading can be changed. In this post, I will show how to decrease the level of the TOC, LOF, and LOT to section. Similarly, the level can be changed for other LaTeX document classes.

Essentially, we change the heading level, but not the content of the three lists:

\tableofcontents
\listoffigures
\listoftables

To do that, we redefine these commands using renewcommand. For example, to change the TOC heading level to section, we use to following code in the preamble:

\makeatletter
\renewcommand\tableofcontents{%
    \section{\contentsname}%
    \@mkboth{\MakeUppercase\contentsname}%
        {\MakeUppercase\contentsname}%
    \@starttoc{toc}%
}
\makeatother

Similarly, the heading level of LOF and LOT can be changed to section (see the complete code below).

\documentclass[12pt]{report}
 
\makeatletter
\renewcommand\tableofcontents{%
    \section{\contentsname}%
    \@mkboth{\MakeUppercase\contentsname}%
        {\MakeUppercase\contentsname}%
    \@starttoc{toc}%
}
\renewcommand\listoftables{%
    \section{\listtablename}%
    \@mkboth{\MakeUppercase\listtablename}%
        {\MakeUppercase\listtablename}%
    \@starttoc{lot}%
}
\renewcommand\listoffigures{%
    \section{\listfigurename}%
    \@mkboth{\MakeUppercase\listfigurename}%
        {\MakeUppercase\listfigurename}%
    \@starttoc{lof}%
}
\makeatother
 
\begin{document}
\chapter{Some Chapter}
\begin{table}[h]\caption{Some table}\end{table}
 
\chapter{Other Chapter}
\begin{figure}[ht]
\centering\rule{6cm}{4cm}\caption{Some figure}\end{figure}
 
\chapter{Lists}
\tableofcontents
\listoffigures
\listoftables
\end{document}

 
This post was inspired by a reader’s question. Do you have a question? Please get in touch through the comment form below.

Exit mobile version