# figbib package: How to remove List of Figures from Table of Contents?

I use the figbib package to include images in my document

\fbList{figures} is used to generate the list of figures. Apparently when using this method to generate a list of figures it is included in the table of contents. I could use \listoffigures but then the sources of the images disappear for the list of figures .

How do I remove the List of Figures from my table of contents without removing the sources in list of figures?

• Welcome to TeX.SX! What document class are you using? – egreg May 30 '15 at 10:20

## 1 Answer

Warning: The figbib package was last updated in 2004 and makes use of the outdated epsfig package.

It does support only .eps files and can't be used with pdflatex.

However, the sample file figbib_sample.tex and it's .bib file can be compiled still.

I used this sample file and modified it a little bit. The \fbList command is necessary to provide the references to the figures correctly -- however, it adds the List of Figure title to the ToC, which is not wanted by the O.P.

The main culprit for this is the code (from figbib.sty)

\@ifundefined{chapter}
{\def\figbib@section{%
\section*{\figbibListHeader}%
\addcontentsline{toc}{section}{\figbibListHeader}}}%
{\def\figbib@section{%
\chapter*{\figbibListHeader}%
\addcontentsline{toc}{chapter}{\figbibListHeader}}}


I changed this in the driver file and added a \iffigbibintoc switch which defaults to false here -- if the entry is requested, say \figbibintoctrue (before \fbList is used).

\documentclass{article}

\usepackage[center,xpart]{figbib}

\newif\iffigbibintoc

\makeatletter

\@ifundefined{chapter}
{\def\figbib@section{%
\section*{\figbibListHeader}%
\iffigbibintoc
\addcontentsline{toc}{section}{\figbibListHeader}%
\fi
}}%
{\def\figbib@section{%
\chapter*{\figbibListHeader}%
\iffigbibintoc
\addcontentsline{toc}{chapter}{\figbibListHeader}%
\fi
}}
\makeatother

\begin{document}
\tableofcontents

\section*{The Text}

In the first paragraph, we introduce the smiley in
\fbref{smiley1}.

\fbEpsfig{smiley1}{2cm}{b!} % a simple figure definition

In the second paragraph, nothing happens.

\begin{fbFloat}[b!] % a more complex figure definition
\begin{fbMinipage}{6cm}
\fbEps{smiley2}{2cm}
\end{fbMinipage}
\fbhspace{3cm}
\fbEpsM{smiley3}{2cm}
\end{fbFloat}

\section*{The Figures}
\fbTheFigs

\fbList{figbib_sample}

\end{document}


Here is the unchanged figbib_sample.bib (as provided by the package author)

@fig{smiley1,
main = {This is a smiley},
add = {The additional description is meaningless},
caption = {Smiley},
file = {smiley}
}

@fig{smiley2,
main = {Here is the smiley again},
file = {smiley}
}

@fig{smiley3,
main = {Yet another smiley},
file = {smiley},
source = {(top secret)}
}


I've omitted a screenshot -- it will show an empty ToC` ;-)

Compilation

Use following sequence

1. latex foo
2. bibtex foo.figbib % Note the extension
3. latex foo
4. latex foo
5. latex foo

i.e. up to four compilations are necessary.