[Tex/LaTex] No caption or title but entry in list of figures

captionstable of contents

Now, there are many 'solutions' for this problem on the internet, but they all seem a bit messy to me.

Like for e.g. this one: Link to ' Community'

Is there a proper solution for this? As this is something very common to do (for example if you have an image on your titlepage and you need it to show up in the list of figures, but you don't want a caption for aesthetical reasons), I think this question is not just pointless.

Thanks for your help in advance.

Best Answer

A more elegant way to do this is to use the caption package, which allows you to specify special formats for an individual figure. Here's an example:

\documentclass{article}
\usepackage{caption}
\usepackage[demo]{graphicx}
\DeclareCaptionLabelFormat{blank}{}
\begin{document}
\listoffigures

\begin{figure}[hpb]
\includegraphics[width=2cm,height=1cm]{foo}
\caption{A regular caption}
\end{figure}

\begin{figure}[hpb]
\includegraphics[width=2cm,height=2cm]{foo}
\captionsetup{textformat=empty,labelformat=blank}
\caption{A caption that doesn't appear under the figure}
\end{figure}

\begin{figure}[hpb]
\includegraphics[width=2cm,height=1cm]{foo}
\caption{The third figure}
\end{figure}
\end{document}

output of code