24

I want to have to following text at my figures:

<< FIGURE >>
Figure 1: Title of my figure which is displayed in the list of figures
Here in a new line a long description about the figure, in a smaller text

I've found this one:

\caption[Title of my figure which is displayed...]%
  {Here in a new line a long...}

The problem with the given code is that I get not the title under my figure, only "Figure 1: Here in a new line a long...".

How to solve this? Thank you!

Martin Scharrer
  • 262,582
strauberry
  • 3,255
  • 4
    You got the syntax of \caption wrong. The correct form is: \caption[<short caption using in the list-of-figures>]{<full caption which is displayed under the figure>} – Martin Scharrer Jul 30 '11 at 17:55

4 Answers4

23

Use the \caption macro for the (short) "heading" of the figure and just add the longer description into the figure environment (after the \caption and with proper vertical spacing).

\documentclass{report}

\begin{document}

\listoffigures

\chapter{foo}

\begin{figure}
\centering
\rule{1cm}{1cm}% Placeholder for actual figure
\caption{Title of my figure which is displayed in the list of figures}
\medskip
\small
Here in a new line a long description about the figure, in a smaller text
\end{figure}

\end{document}
lockstep
  • 250,273
  • 1
    The only problem for this is that the small text will be centred, and I prefer it justified. I used the package caption and I quite liked it. – Vivi Jan 23 '13 at 00:44
  • 3
    @Vivi how did the caption package solve the problem of the small text being centred ? – Ciprian Tomoiagă Feb 28 '18 at 15:02
12

The solution is very simple and does not need any vertical adjustment (i.e., \vspace). Instead of

\caption[Short Title]%
{Long Description}

try:

\caption[Short Title]%
{Short Title \par \small Long Description}

Indeed, you only to repeat the title once in the [] and again at the beginning of {}. The title and description should be separated by \par \small (or any other font-size you prefer) to break the line and change the size. This will produce:

<< FIGURE >>
Figure 1: Short Title
Long Description (in a smaller font!)

while only keeps the Short Title in the list of figures.

I usually do not want a new line (I prefer to have the title and description as one paragraph). Therefore, I do:

\caption[Short Title]%
{Short Title- Long Description}

which produces:

<< FIGURE >>
Figure 1: Short Title- Long Description
9

Extension of answer by Borhan (not enough rep to comment so posting as a seperate answer):

Use \newcommand to avoid having to repeat every short title, and to add some decorations. For example, the following works very nicely:

\usepackage{caption}
\captionsetup[table]{labelsep=space}
\captionsetup[figure]{labelsep=space}

\newcommand{\mycaption}[2]{\caption[#1]{\textbar\, \textbf{#1.} #2}}

...

\mycaption{Short Title}{Longer description.}

This shows the short title in the list of figures, and in the actual caption gives (**=in bold):

 << Figure >>
 *Figure 1 | Short Title.* Longer description.

You can easily edit the command to add a break after the short title, make the text smaller, change colors, etcetera.

Scipio
  • 283
-2

In addition to the comment above, you can have a look at the caption package which allows for many customizations.

http://www.ctan.org/pkg/caption

Trefex
  • 1,045