1

Using tocloft for my list of figures, I am looking for some method that enables me to select some specific entires (\caption) such as that one further down, which shouldn't goes to the list of figures, but in the content still be counted/numbered in the usual way.

\begin{figure}
\centering
\includegraphics[width=1.0\textwidth]{rhythmus.pdf}
\caption[Own grafic.]{Beispielrhythmus: Ta ta tatata, tata tataa ta taa.}
\label{rhythmus}
\end{figure}

I use the list of figure to show the sources of the figures, but I have many selfmade grafics, where I don't need to specify the source. Respectively I will specifiy them just with one sentence.

I have following settings in the preamble, which might play a role.

\usepackage{tocloft}

\usepackage{etoolbox}
\usepackage{lipsum}

 % This is for using numbering for the sections, chapters, etc. in the content, but not in the table of content.
\makeatletter
\let\oldnumberline\numberline
\patchcmd{\@caption}{\numberline}{\oldnumberline}{}{} %
\renewcommand*{\numberline}[1]{}
\makeatother

Then:

\chapter{List of Figures}
{\makeatletter
%\let\@cftmakeloftitle\relax
\@starttoc{lof}% Print List of Figures
%\listoffigures
\makeatother}
\begingroup\noindent \footnotesize{Abb. 1.1, 1.2 ... here some more.. are made by myself}\endgroup
5
  • Do you want that nothing goes to the list of figures for that particular figure? I'm asking why. Or do you want that no numbering appears in the list?
    – egreg
    Commented Apr 13, 2012 at 12:18
  • What do you mean by "erasing some entries in the list of figures"? Do you want to prevent them from showing up entirely, or do you want them to show up as unnumbered entries?
    – Mico
    Commented Apr 13, 2012 at 12:58
  • The edit made the question even less clear.
    – egreg
    Commented Apr 13, 2012 at 13:29
  • I hope it is more clear now? Commented Apr 13, 2012 at 13:35
  • 1
    I still can't understand why you want this. However, saying \renewcommand{\addcontentsline}[3]{} in the body of the figure environment does what you want.
    – egreg
    Commented Apr 13, 2012 at 13:46

1 Answer 1

4

Doing

\begin{figure}
\renewcommand{\addcontentsline}[3]{}
\centering
\includegraphics[width=1.0\textwidth]{rhythmus.pdf}
\caption[Own grafic.]{Beispielrhythmus: Ta ta tatata, tata tataa ta taa.}
\label{rhythmus}
\end{figure}

will neutralize the writing of anything in the .lof file. The effect of the \renewcommand will disappear at the end of the environment. Of course the optional argument to \caption serves no purpose, in this case.

1
  • 1
    If the caption package is loaded (anyway) one could also use \caption[]{Beispielrhythmus: ...} instead of redefining \addcontentsline. This will suppress the LOF entry, too.
    – user2574
    Commented Apr 14, 2012 at 5:19

You must log in to answer this question.

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