Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
4  
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 Mar 18 '12 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 Jun 3 '12 at 17:36

1 Answer

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.

share|improve this answer
1  
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 Sep 12 '12 at 9:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.