15

How do I prevent figures in the Appendix from appearing in the list of figures?

It seems that after the command \appendix the numbering automatically starts.

I've tried leaving the first part in the caption command blank like this:

\caption[ ]{First figure caption.}

but I still get a number in the List of Figures:

A.1 ........................23

I have also tried \captionsetup{list=no} which seems to have no effect at all. I want nothing in the list of figures for appendix material.

2
  • 5
    Hi Wes, Welcome to tex exchange! I edited your code by using the {} button to format the snippets. In regard to your question, if you load the caption package, then your approach should work fine. If not, please strip your code down to a MWE and include it in your question.
    – cmhughes
    Commented Mar 18, 2012 at 21:13
  • Once you've loaded caption, you can also use caption*{} to completely suppress the numbering of a caption, which effectively also prevents it from appearing in the list of figures. This seems to be what you tried to achieve with \caption[ ]{the caption}. The solutions by @lockstep / @cmhughes however seem better-suited for your scenario and moreover can more easily be applied for all appendix captions.
    – dgs
    Commented Jun 3, 2012 at 17:36

4 Answers 4

16

Set the tocdepth counter to 0 for the appendix. (See also the answers to Numbered section hidden from the ToC.)

Note that while I use the article class in the following MWE, the solution also works for classes featuring the \chapter command (notably, book and report) because figure and table floats always feature LoF/LoT level 1.

\documentclass{article}

\begin{document}

\listoffigures

\section{foo}

\begin{figure}[ht!]
\centering
\rule{1cm}{1cm}
\caption{A figure}
\end{figure}

\appendix 
\addtocontents{lof}{\protect\setcounter{tocdepth}{0}}

\section{bar}

\begin{figure}[ht!]
\centering
\rule{1cm}{1cm}
\caption{An appendix figure}
\end{figure}

\end{document}

enter image description here

EDIT: As cmhughes points out, an alternative is to load the caption package and to replace

\addtocontents{lof}{\protect\setcounter{tocdepth}{0}}

with

\captionsetup{list=no}

in the above example.

2
  • 2
    Unfortunately \addtocontents{lof}{\protect\setcounter{tocdepth}{0}} somehow deletes the complete content of my listoftables (not just the tables in the appendix) while it works perfectly with the listoffigures. However \captionsetup{list=no} works just as expected.
    – Rough Dude
    Commented Sep 12, 2012 at 9:25
  • 1
    The use of \addtocontents{lof}{\protect\setcounter{tocdepth}{0}} also breaks the index/bookmarks if outputting to pdf. Again, \captionsetup{list=no} works as desired.
    – Hayden
    Commented Apr 10, 2014 at 8:55
0

I found \captionsetup{list=no} works great for suppressing figures, however, my sub-figures still appeared in the list of figures. This looked very odd to see list of subfloats with no main figure in the lof. The only solution I found was to change

\usepackage[lofdepth, lotdepth]{subfig}

to:

\usepackage[lofdepth=1, lotdepth]{subfig}

(as per another thread on removing subfigures from the lof.)

However, this removes all the subfigures in the document.

0

To prevent figures in the Appendix from appearing in the list of figures, you could simply comment out the line \label{This text appears in the List of Figures in front matter} which appears below the caption, by using %.

This includes the figure in the stipulated place, but does not make reference to it in the List of Figures. Good for grouping images (e.g. figure 3.1 a-f) which may be spread over multiple pages but only require one figure caption.

Similarly, captions can be commented out of tables in this way and will not be included in list of tables in front matter.

0
0
\begin{figure}[H]
    \centering
    \includegraphics[width=1.0\linewidth]{Figures/Actual Cost by Category.png}
    \caption*{Actual cost by category.}
    \label{fig:CostCategory}
\end{figure}

If you add the star right after the caption before the curly brackets, that will also remove the figure from the list of figures table.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .