94

Is it possible to create a list of all the figures at the end of a document (this I can do) and make it appear in the table of contents?

So in the the table of content there will be a line saying List of figures ... 19 for example?

lockstep
  • 250,273
lpostula
  • 1,391

3 Answers3

121

The List of Figures is produced with \listoffigures; you have to manually add it to the table of contents, so it should be preceded by \cleardoublepage in order to ensure that the page reference is correct. Uncomment the \phantomsection line if you're using hyperref:

\cleardoublepage
% \phantomsection
\addcontentsline{toc}{chapter}{\listfigurename}
\listoffigures
egreg
  • 1,121,712
  • 8
    I prefer loading the tocbibind package (or using special class faetures) because the LoF shouldn't be always preceded by a page break if one uses the article class. – lockstep Mar 18 '12 at 17:30
  • This work but is there a way to change the \listfigurename to something else? – lpostula Mar 18 '12 at 17:32
  • 1
    @kasmanit Have a look at http://tex.stackexchange.com/questions/28516/how-to-change-the-title-of-toc – lockstep Mar 18 '12 at 17:35
  • @kasmanit That's why I used \listfigurename, so that you can change its meaning as outlined in the question which lockstep pointed to. – egreg Mar 18 '12 at 17:42
  • 7
    Whoever reads this - remember if your document doesn't have chapters (e.g. an article) - you'll need to replace {chapter} with {section} or something similar. – einpoklum Sep 13 '17 at 18:08
  • In case you want to do the same for the tables, use \listtablename and \listoftables instead. – Heribert Mar 06 '20 at 15:56
  • Why use \cleardoublepage instead of \clearpage? Is there any difference if you aren't working with a two-sided document? – TakingItCasual Jul 08 '20 at 06:10
  • @TakingItCasual Maybe you change your mind and decode to go for a two-side document – egreg Jul 08 '20 at 07:30
46

This answer depends on your document class and some related packages.

  • If you are using a standard class you can use the package tocbibind
  • If you are using a KOMA-script class you can use the option listof=totoc.
  • If you want to add the entry manual you can use the command \addcontentsline
  • If you are using the class memoir the command \listoffigures creates an entry in the table of contents.
Marco Daniel
  • 95,681
1

There's a really simple way to do this. Maybe the last comment meant that, but I'm not sure. Change the name of \listofigures by using \renewcommand\listfigurename{}. So you can easy use \section{Abbildungsverzeichnis} to insert the list in your table of contents.

Torbjørn T.
  • 206,688
Benni
  • 27
  • 6
    This is very risky, since it depends on the document class. For example, report prints \listoffigures as a \chapter*, not a \section. Moreover, your approach will provide a numbered section (not common with the LoF/LoT/ToC front matter). Finally, even if you remove \listfigurename, you'll be setting a sectional unit twice with your approach. – Werner Jan 02 '14 at 19:33