# Remove appendix tables and figures from list of figure/tables

I'm writing a thesis and I have over hundred figures and tables in the appendix. But I don't want them to appear in List of figures / List of tables. - But I want the appendices and sections to appear in the table of content.

\documentclass[a4paper,12pt,icelandic]{report}
\usepackage[toc,page]{appendix}

\begin{document}
\tableofcontents

\listoffigures
\addcontentsline{toc}{chapter}{List of Figures}

\listoftables
\addcontentsline{toc}{chapter}{List of tables}

\chapter{Chapter 1}
\section{Section 1, chapter 1}
\section{Section 2, chapter 1}

\appendix
\addcontentsline{toc}{chapter}{Appendices}
\chapter{First appendix}
\section{Section 1}
\begin{figure} % DON'T WANT THIS TO APPEAR IN LIST OF FIGURES
\centering
\includegraphics[width=1\linewidth]{figure.png}
\caption{Caption of figure}
\label{Label of figure}
\end{figure}

\begin{table}   % DON'T WANT THIS TO APPEAR IN LIST OF TABLES
\begin{tabular}{|c|c|}
\hline One & Two \\
\hline Three & Four \\
\hline
\end{tabular}
\caption{Caption of table}
\label{Label of table}
\end{table}

\end{document}


## 2 Answers

Right before the appendix, I redefine \addcontentsline to intercept {figure} and {table} calls and excise them, as follows (requires ifthen package):

\let\svaddcontentsline\addcontentsline
\renewcommand\addcontentsline[3]{%
\ifthenelse{\equal{#1}{lof}}{}%
{\ifthenelse{\equal{#1}{lot}}{}{\svaddcontentsline{#1}{#2}{#3}}}}


Here is my MWE (note: I added a body figure and table to demonstrate ability to discern report body from appendix)

\documentclass[a4paper,12pt,icelandic]{report}
\usepackage[toc,page]{appendix}
\usepackage{graphicx,ifthen}

\begin{document}
\tableofcontents

\listoffigures
\addcontentsline{toc}{chapter}{List of Figures}

\listoftables
\addcontentsline{toc}{chapter}{List of tables}

\chapter{Chapter 1}
\section{Section 1, chapter 1}

\begin{figure} % DO WANT THIS TO APPEAR IN LIST OF FIGURES
\centering
\includegraphics[width=1\linewidth]{example-image}
\caption{Body figure}
\end{figure}
\begin{table}   % DO WANT THIS TO APPEAR IN LIST OF TABLES
\begin{tabular}{|c|c|}
\hline One & Two \\
\hline Three & Four \\
\hline
\end{tabular}
\caption{Body table}
\end{table}

\section{Section 2, chapter 1}

\let\svaddcontentsline\addcontentsline
\renewcommand\addcontentsline[3]{%
\ifthenelse{\equal{#1}{lof}}{}%
{\ifthenelse{\equal{#1}{lot}}{}{\svaddcontentsline{#1}{#2}{#3}}}}

\appendix
\addcontentsline{toc}{chapter}{Appendices}
\chapter{First appendix}
\section{Section 1}
\begin{figure} % DON'T WANT THIS TO APPEAR IN LIST OF FIGURES
\centering
\includegraphics[width=1\linewidth]{example-image}
\caption{Caption of figure}
\label{Label of figure}
\end{figure}
\begin{table}   % DON'T WANT THIS TO APPEAR IN LIST OF TABLES
\begin{tabular}{|c|c|}
\hline One & Two \\
\hline Three & Four \\
\hline
\end{tabular}
\caption{Caption of table}
\label{Label of table}
\end{table}

\end{document}


ADDENDUM

A version of the redefinition that does not require the ifthen package:

\let\svaddcontentsline\addcontentsline
\renewcommand\addcontentsline[3]{%
\edef\qtest{#1}%
\def\qmatch{lof}%
\ifx\qmatch\qtest\else%
\def\qmatch{lot}%
\ifx\qmatch\qtest\else%
\svaddcontentsline{#1}{#2}{#3}%
\fi\fi%
}

• Thanks. This works just as I wanted to. Thank you very much. :) – Bjartmar Nov 23 '14 at 3:33

Load caption package and use \caption*:

\documentclass[a4paper,12pt,icelandic]{report}
\usepackage[toc,page]{appendix}
\usepackage{caption}
\usepackage[demo]{graphicx}

\begin{document}
\tableofcontents

\listoffigures
\addcontentsline{toc}{chapter}{List of Figures}

\listoftables
\addcontentsline{toc}{chapter}{List of tables}

\chapter{Chapter 1}
\section{Section 1, chapter 1}
\section{Section 2, chapter 1}

\appendix
\addcontentsline{toc}{chapter}{Appendices}
\chapter{First appendix}
\section{Section 1}
\begin{figure} % DON'T WANT THIS TO APPEAR IN LIST OF FIGURES
\centering
\includegraphics[width=1\linewidth]{figure.png}
\caption*{Caption of figure}
\label{Label of figure}
\end{figure}

\begin{table}   % DON'T WANT THIS TO APPEAR IN LIST OF TABLES
\begin{tabular}{|c|c|}
\hline One & Two \\
\hline Three & Four \\
\hline
\end{tabular}
\caption*{Caption of table}
\label{Label of table}
\end{table}

\end{document}


• Thanks for the answer. I'm going to use Steven's method. To use your method I would have to open over 100 files to add the star. – Bjartmar Nov 23 '14 at 3:31
• Thank you for the solution! It solved my problem immediately without adding many new rules in premable! : ) – Vivian Jan 8 '17 at 20:48
• Minor improvement suggestion: use \captionsetup{list=no} at the start of wherever you need to disable listing, such as the start of your appendices, instead of \caption*. The former is meant for skipping the LoT and LoF, while the latter will (by default) eat up any numbering you may have, e.g., Table E.4 for the fourth table in appendix E. – Christopher Corley Jul 5 '17 at 2:03