10

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.

12

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

5

caption has a dedicated command to create (numbered) entries. And you can always use \addcontentsline:

\documentclass[]{article}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{caption}

\begin{document}
\listoffigures

\section{section}
\captionlistentry[figure]{a figure caption}
\addcontentsline{lof}{figure}{another figure caption}%
and here the figure



\end{document}
1

Here's an MWE using the captionpackage:

\documentclass{scrreprt}
\usepackage[demo]{graphicx}
\usepackage[labelformat=empty]{caption}

\begin{document}
    \begin{figure}[p]
        \includegraphics{test}
        \caption[My TOC Caption]{~}
    \end{figure}

    \listoffigures
\end{document}
  • Well, what Alan said :-) – Ingmar Dec 6 '13 at 7:17
  • Not quite: your version gives all the captions an empty label, which wasn't quite what was requested. – Alan Munn Dec 6 '13 at 7:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.