1

I got a problem with the table of contents. I can not see the list of figures or tables include it. They are not present, even when they are before the Introduction and have the roman numeration.

What can I do to include them?

  • 8
    Nobdy here is omniscient... well, maybe egreg is. Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – jub0bs Dec 2 '13 at 15:12
  • Real quick: Did you provide the commands \listoffigures and \listoftables? I assume you did, but since you don't mention having done so... You refer to "roman numeration" -- of what: pages? or something else? Do you load a package such as tocloft to influence the creation of the Table of Contents? Please provide an MWE – Mico Dec 3 '13 at 9:17
4

The simplest method I can think of is to use the »tocbibind« package.

\documentcetholass[11pt]{report}
\usepackage[T1]{fontenc}
\usepackage{caption}
\usepackage[nottoc]{tocbibind}

\begin{document}
  \tableofcontents
  \listoffigures
  \listoftables

  \chapter{Foo}

  \begin{figure}[!htb]
    \centering
    \rule{4in}{2.25in}
    \caption{Dummy figure}
    \label{fig:dummy}
  \end{figure}

  \begin{table}[!htb]
    \caption{Dummy figure}
    \label{tab:dummy}
    \centering
    \rule{4in}{2.25in}
  \end{table}
\end{document}

enter image description here

3

This is typically the case in the default document class since both the LoF and LoT (including the ToC) is issued as a \chapter* (unnumbered chapter). And, as is apparent, these don't make their way into the ToC. Why? See the definition of \@schapter in comparison to that of \@chapter (from report.cls):

\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
                         \refstepcounter{chapter}%
                         \typeout{\@chapapp\space\thechapter.}%
                         \addcontentsline{toc}{chapter}% Add \chapter to ToC
                                   {\protect\numberline{\thechapter}#1}%
                    \else
                      \addcontentsline{toc}{chapter}{#1}%
                    \fi
                    \chaptermark{#1}%
                    \addtocontents{lof}{\protect\addvspace{10\p@}}% Insert gap in LoF
                    \addtocontents{lot}{\protect\addvspace{10\p@}}% Insert gap in LoT
                    \if@twocolumn
                      \@topnewpage[\@makechapterhead{#2}]%
                    \else
                      \@makechapterhead{#2}%
                      \@afterheading
                    \fi}
\def\@schapter#1{\if@twocolumn
                   \@topnewpage[\@makeschapterhead{#1}]%
                 \else
                   \@makeschapterhead{#1}%
                   \@afterheading
                 \fi}

\@chapter (associated with \chapter) goes through great lengths to set up the numbering and include it in the ToC (via \addcontentsline{toc}{chapter}{...}). None of that appear in \@schapter (associated with \chapter*). So, if you wish to make this happen, you can insert the appropriate line of code manually:

enter image description here

\documentclass{report}
\begin{document}
\tableofcontents
\clearpage\addcontentsline{toc}{chapter}{List of Figures}% Add LoF to ToC
\listoffigures
%\clearpage\addcontentsline{toc}{chapter}{List of Tables}% Add LoT to ToC
\listoftables
\chapter{A chapter}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\end{document}

In the above MWE, I've only added the LoF to the ToC to show the difference. The usage of \addcontentsline{<file>}{<style>}{<stuff>} inserts <stuff> with style <style> into the file \jobname.<file>. Each sectional unit (or sometimes a floating object) has a different style/formatting. In this case, since \listoffigures (and \listoftables) are both \chapter*s, I'm formatting with the same <style> as chapter.

  • 2
    Based on the OP's very minimal (pej.) question, I consider your answer a (praiseworthy) shot in the dark. – jub0bs Dec 3 '13 at 1:13

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.