GeneralInclude list of figures and tables in table of contents

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
iperten
Posts: 40
Joined: Thu Jul 12, 2007 1:53 pm

Include list of figures and tables in table of contents

Post by iperten »

Hi folks!

What do I have to do if I want to include both list of figures and tables in the table of contents?

And if I want the table of contents as well?

Finally, how can I change the type of page number for the table of contents and lists (i.e.: i, ii, iii, etc in place of 1, 2, 3, etc)?

Thank you.
Cheers.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Include list of figures and tables in table of contents

Post by localghost »

I assume your are using one of the standard classes. So you have to add these lists manually to the TOC. This may solve as an example for the report class.

Code: Select all

\documentclass{report}
…
\begin{document}
  …
  \pagenumbering{roman}                             % small roman letters as page numbers
  \tableofcontents\newpage
  \pagenumbering{arabic}                            % back to normal page numbers
  …
  \addcontentsline{toc}{chapter}{List of Figures}
  \listoffigures\newpage
  \addcontentsline{toc}{chapter}{List of Tables}
  \listoftables\newpage
  …
\end{document}
For the article class, which doesn't support chapters, you have to replace chapter with section. But what should the entry of the TOC in the TOC do (or did i misunderstand that)?

For easier handling of such things, take a look at the KOMA-Script Bundle. It provides extended documentclasses with many features.
User avatar
pumpkinegan
Posts: 91
Joined: Thu May 03, 2007 10:29 pm

Include list of figures and tables in table of contents

Post by pumpkinegan »

Play with these commands, in order to get your preferred style:

Code: Select all

\tableofcontents
\listoffiggures
\listoftables
\pagenumbering{roman}
\pagenumbering{arabic}
Edit: The answer above by localghost is more useful.
iperten
Posts: 40
Joined: Thu Jul 12, 2007 1:53 pm

Re: table of contents

Post by iperten »

Thank you guys!

I'll try to play/work a bit with those commands.

Cheers.
iperten
Posts: 40
Joined: Thu Jul 12, 2007 1:53 pm

Include list of figures and tables in table of contents

Post by iperten »

I still have some problems: in the output pdf file, there is no correspondence between the pages where contents, list of figure s and list of tables are and the numbers that appear near those entries in the TOC.

This is what I'm writing now, without the \newpage command:

Code: Select all

\tableofcontents
\listoffigures
\listoftables
\addcontentsline{toc}{chapter}{Contents}
\addcontentsline{toc}{chapter}{List of Figures}
\addcontentsline{toc}{chapter}{List of Tables}
Thank you.
iperten
Posts: 40
Joined: Thu Jul 12, 2007 1:53 pm

Include list of figures and tables in table of contents

Post by iperten »

My fault! The \newpage command is unavoidable! ;)
Post Reply