Take the 2-minute tour ×
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.

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
share|improve this question
    
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 Apr 13 '12 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 Apr 13 '12 at 12:58
    
The edit made the question even less clear. –  egreg Apr 13 '12 at 13:29
    
I hope it is more clear now? –  algomachine Apr 13 '12 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 Apr 13 '12 at 13:46

1 Answer 1

up vote 4 down vote accepted

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.

share|improve this answer
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. –  Axel Sommerfeldt Apr 14 '12 at 5:19

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.