I wrote a somewhat short post on list of figures and list of tables a few years ago. Nevertheless, it gets quite a bit of traffic, possibly due to the large number of comments. For that reason, I decided to put together another, more informative post on the same topic that includes table of contents.

I use the following common abbreviations throughout the post:

• lof: list of figures
• lot: list of tables

##### Creating content lists, the basic commands

Creating content lists in LaTeX documents is straight forward. Typing these three commands is sufficient to produce a toc, lof, and lot. To produce the lists, the document has to be typeset twice. The first iteration collects all headings and captions and writes them to meta files (*.toc, *.lof, *.lot). The second iteration prints the lists, based on the content of the meta files.

\tableofcontents
\listoffigures
\listoftables

\documentclass[11pt]{article}

\begin{document}

\tableofcontents
\listoffigures
\listoftables

\clearpage

\section{Dummy section 1}
\begin{figure}[ht]
\begin{center}

\caption{Dummy figure 1}
\label{fig:dum1}
\end{center}
\end{figure}

\begin{figure}[ht]
\begin{center}

\caption{Dummy figure 2}
\label{fig:dum2}
\end{center}
\end{figure}

\begin{table}[ht]
\caption{Dummy table 1}
\begin{center}
\begin{tabular}{|c|c|}

\end{tabular}
\end{center}
\label{tab:dum1}
\end{table}

\section{Dummy section 2}

\end{document}

Depending on the document-class employed, page-breaks are added between toc, lof, and lot. Article produces lists without space between them. Report and book insert \clearpage or \cleardoublepage, depending on whether twoside and openright options are set (default for book), to start each list on a blank page. See here for more details on document-class options.

##### Controlling the depth of content added to toc

Depending on the size of your document (length of chapters, sections, etc.), you might want to increase or decrease the level of headings added to toc. To control the depth of content added to toc the counter tocdepth is modified in the preamble as follows:

\setcounter{tocdepth}{level}
%level -1: part, 0: chapter, 1: section, etc.

In the following example all headings are added to toc (level: 5):

\documentclass[11pt]{report}

\setcounter{tocdepth}{5} %shows all levels incl. paragraph
\begin{document}

\tableofcontents

\chapter{Dummy chapter}
\section{Dummy section}
\subsection{Dummy subsection}
\subsubsection{Dummy subsubsection}
\paragraph{Dummy paragraph}

\end{document}

Lists of figures and tables are not automatically added to the table of contents. I will introduce two different approaches here, an automatic and a manual approach.

Automatic approach:

%preamble
\usepackage[nottoc]{tocbibind}

%content
\tableofcontents
\listoffigures
\listoftables

Manual approach:

Lof and lot can be added manually through \addcontentsline. The command takes three arguments: the file (e.g. toc), the level (e.g. chapter), and the text to be added.

%article
\tableofcontents
\listoffigures
\listoftables

%report and book
\tableofcontents
\clearpage %\cleardoublepage %for openright
\listoffigures
\clearpage %\cleardoublepage %for openright
\listoftables
\clearpage %\cleardoublepage %for openright

\listfigurename and \listtablename produce the list headings. This way, toc entries are automatically updated, should the headings be changed for some reason. Adding the lists to toc before the actual command as well as them makes sure the page numbers are set correctly. The document-class option openright (requires twoside in report) always starts chapters on odd pages, which is when \cleardoublepage comes in handy. It adds either one or two page-breaks depending on whether the content ends on an even or odd page.

##### Short captions for lof/lot

Some figures and tables have long captions. It might not always be preferable to reproduce the whole caption in lof/lot. The caption command provides a convenient way to produce a shorter figure/table description in the lof/lot by using its optional argument, without change to the actual figure/table caption.

\caption[short lof/lot caption]{long caption ...}

\documentclass[11pt]{article}
\usepackage{blindtext}
\begin{document}

\tableofcontents
\listoffigures

\section{Dummy section 1}
\begin{figure}[ht]
\begin{center}
\rule{0.5\linewidth}{0.35\linewidth}
\caption[Long caption figure]{\blindtext}
\label{fig:dum1}
\end{center}
\end{figure}

\end{document}

The same works with headings and table of contents. The \chapter and \section commands also take an optional argument which, when used, produce an alternative chapter/section name in toc.

\chapter[Short chapter name]{Long chapter name ...}

##### Linking toc/lof/lot with content using hyperref

Loading hyperref (package documentation) is generally sufficient to link list entries with document content. With some exceptions, the hyperref package usually has to be loaded last. For a better visualisation of links, it is a good idea to change the link font color, e.g. to blue:

\usepackage[colorlinks=true,linkcolor=blue]{hyperref}

##### Further customizations

This earlier post describes 10 ways to customize toc/lof/lot, from basic to more advanced topics.

##### The tocloft package

The tocloft package provides means of controlling the typographic design of table of contents, list of figures and list of tables (copied from its documentation). Introducing the package would go beyond the scope of this article. However, I am happy to help should you have any specific question. Just drop me a comment below.

• Giannis

• tom

Add \setcounter{tocdepth}{0} to your preamble. The tocdepth counter controls the level of headings added to TOC (0: chapter, 1: section, etc.).

• Ciaran Mulloy

Hi Tom, Excellent article on TOC.
One question I have is, is there a way to suppress the toc title, i.e. ‘Contents’ as I am already using a fancyhead

\fancyhead[RO,RE]{\includegraphics[width=1.5cm]{logo.pdf}}

• tom

Hi Ciaran,

The easiest way would be to redefine the title and leave it empty3:

\renewcommand*{\contentsname}{}

Best, Tom

• Romain

Hi Tom,

I’m using hyperref for my TOC. The issue I have is that the link is only on the chapter title and not the whole line. Because I also would like that if I click on page number, then I’m directed to that page.

Rom

• tom

Hi Romain,

There is an package option which does exactly that. See the hyperref documentation for more details.

\documentclass[11pt]{article}
\usepackage{blindtext}
\begin{document}
\tableofcontents
\blinddocument
\end{document}
• Igor

Hi Tom, I need to obtain this on my LOF in the pdf file:

I’m sorry if became a little confuse but I’m brazilian.

Thanks

• tom

Hi Igor,

You’ll have to be a little more specific what your question is about, e.g. no line-breaks in long captions. Please also give a minimal example to illustrate the problem.

Thanks, Tom.

• Ricky

Hi Tom, I found your blog when I was looking for any answers about how not enumerate the page of lof/lot/loc? \pagestyle{empty}, \thispagestyle{empty} didn’t work as well.
Thanks

• tom

Hey Ricky,

Try the following:

\documentclass[11pt]{report}

\begin{document}
\pagenumbering{gobble}
\tableofcontents

\listoffigures

\listoftables
\clearpage

\pagenumbering{arabic}
\chapter{Test chapter}
\section{Test section}

\end{document}
• James

Hi Tom,

I am trying to follow your example above. I want the LOF and LOT entries in the TOC to be sections. As it is below.. I get two LOF and LOT entries in the TOC (one as a section, one as a chapter) yet the hyperlink on the section entry is wrong??? Thanks

\usepackage{tocloft}
\newlength\mylena
\settowidth\mylena{Figure}
\newlength\mylenb
\settowidth\mylenb{Table}
\renewcommand\cftfigpresnum{Figure }
\renewcommand\cfttabpresnum{Table }

\tableofcontents
\cleardoublepage

\clearpage %\cleardoublepage %for openright
\listoffigures
\clearpage %\cleardoublepage %for openright
\listoftables
\clearpage %\cleardoublepage %for openright
• tom

Hi James,

Thanks for this question. You can use a little trick, by adding phantomsection before addcontentsline, the links are set properly.

Best, Tom

\documentclass[11pt]{report}
\usepackage{tocloft}
\usepackage{hyperref}

\begin{document}

\tableofcontents
\cleardoublepage

\clearpage %\cleardoublepage %for openright
\phantomsection
\listoffigures
\clearpage %\cleardoublepage %for openright
\phantomsection
\listoftables
\clearpage %\cleardoublepage %for openright

\end{document}
• James

Great thanks Tom. I now have an issue with the sectioning…. The chapters are labeled correctly e.g Chapter 1, Chapter 2…
But the sections are also labelled section 1, section 2 … not section 1.1, 1.2

Weirdly the subsections are labelled 1.1 and the figures/tables are also labelled 1.1,1.2 etc

Would really appreciate any help

\usepackage[nottoc]{tocbibind}    % Potentially important for sectioning

\renewcommand\thesection{\arabic{section}}  % very important for structure ?
\pagenumbering{roman}
\doublespacing
\baselineskip=15.5pt

\tableofcontents
\cleardoublepage

\listoffigures
\cleardoublepage

\listoftables
\cleardoublepage

\baselineskip=20pt
\pagenumbering{arabic}
\renewcommand{\chaptermark}[1]{\markboth{\chaptername\ \thechapter:\ #1}{}}
\renewcommand{\sectionmark}[1]{\markright{\S\thesection\ #1}}

\renewcommand\thesection{\arabic{chapter}}
• tom

Hi James,

It’s the second line of your code where you define sections to be labeled with just the section number instead of chapter and section. Also, delete the last line. I’m not sure why you change it there. Commenting it out should fix the problem. Alternatively, you could replace it with:

\renewcommand\thesection{\thechapter.\arabic{section}}

Also, please provide a full minimal working example next time. It’s much easier to reproduce your issue that way.

Cheers, Tom.