0

I want the list of figures and the list of tables to appear in my table of contents as sections instead of as chapters. A bit like the elements right above (from summary to acronyms)

A quick reminder that I used

\listoftables

\listoffigures

To automatically generate the list of tables and figures

I also used

\section*{Summary} \label{sec:summary} \addcontentsline{toc}{section}{\nameref{sec:summary}}

To create and and the sections to the table of contents

Table of contents

3
  • \usepackage{etoolbox}\patchcmd{\listoffigures}{\chapter}{\section}{}{} and similarly for \listoftables
    – Ivan
    Jun 6 at 15:11
  • It's not working Jun 6 at 15:17
  • I think that I'll have to use \renewcommand Jun 6 at 15:22
1

Suggestion using package tocbasic:

\documentclass{book}
\usepackage{blindtext}% only for dummy text

\usepackage{tocbasic}
\renewcommand*{\listoffigures}{\listoftoc[\listfigurename]{lof}}
\renewcommand*{\listoftables}{\listoftoc[\listtablename]{lot}}
\setuptoc{lof}{leveldown,totoc}
\setuptoc{lot}{leveldown,totoc}

\begin{document}
\listoffigures
\listoftables

\tableofcontents
\blinddocument
\begin{table}
  \caption{A table}
\end{table}
\begin{figure}%
  \caption{A figure}%
\end{figure}
\end{document}

enter image description here

Remark: tocbasic can not be used together with package tocloft or titletoc.

1
1

Try this, no need to change any pre-existing code.

% loftoc.tex  SE 600162
\documentclass{report}
\begin{document}
\tableofcontents
\clearpage
\addcontentsline{toc}{section}{List of Figures}
\listoffigures

\chapter{First}

\begin{figure}
\centering
\caption{A figure}
\end{figure}

\end{document}

The macro \addcontentsline is basic LaTeX.

enter image description here

3
  • The problem is that \listoffigures automatically adds the content line to the table of content Jun 6 at 21:21
  • I get the list of figures repeated twice in the table of contents: one being showed as section and one being shown as chapter Jun 6 at 21:24
  • 1
    @PenielAdounkpe As you have not bothered to show what documentclass you are using then why should I bother to try and help? My solution works for the report, and book classes. With a minor adjustment, use listoffigures* it works for the memoir class. Jun 7 at 16:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.