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!

1
  • 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>} Commented Jul 30, 2011 at 17:55

4 Answers 4

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}
2
  • 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
    Commented Jan 23, 2013 at 0:44
  • 3
    @Vivi how did the caption package solve the problem of the small text being centred ? Commented Feb 28, 2018 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
5
  • When using this solution 'short title' just doesn't appear for me.
    – par
    Commented Feb 20, 2019 at 12:02
  • Have you repeated the short title twice? Commented Feb 20, 2019 at 23:18
  • @BorhanKazimipour Yeah, because the content of [] goes in the list of figures. And better create an own command that warps this around to ensure similar behaviour in all figures. Commented Feb 20, 2019 at 23:22
  • Thank you @OlegLobachev for the wrapper suggestion. Commented Feb 21, 2019 at 1:02
  • In my first comment, I asked if @par followed my suggestion and actually repeated the short title twice. Commented Feb 21, 2019 at 1:02
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.

-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

1
  • 3
    -1 :( because it doesn't offer a solution. Can you please give an example how the problem could be solved with the caption package ? Commented Feb 28, 2018 at 15:38

You must log in to answer this question.

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