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.

I am using the caption and subcaption packages to create sub-figures in a document. I have two cases of sub-figures:

  1. Two sub-figures side-by-side. For this, the captioning is excellent.
  2. Two sub-figures one below the other. in this case, the first sub-caption appears immediately above the second sub-figure.

How can I configure the sub-captions to include a small space between themselves and the next element in the second case, without messing up the setup for the first case?

The rude way is to stick a vskip explicitly after the first sub-figure. I prefer to avoid this hack.

share|improve this question
1  
I do not think that \vskip is a hack. You want vertical space and that is what \vskip gives you. If you want to separate content from presentation, you can define your own macros, say \horiontalsubfigures[caption1][caption2]{figure1}{figure2} and \verticalsubfigures[caption1][caption2]{figure1}{figure2} and use \hskip and \vskip in the macro definitions. –  Aditya Nov 20 '10 at 15:18
add comment

1 Answer 1

up vote 5 down vote accepted

You can set the length \belowcaptionskip (default value 0pt) as you need it. Either do this locally inside the concerned figure environment as shown below or globally in the preamble.

\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[font=small,labelfont=bf,tableposition=top]{caption}
\usepackage[font=footnotesize]{subcaption}

\begin{document}
  \begin{figure}[!ht]
    \setlength{\belowcaptionskip}{5pt}
    \centering
    \begin{subfigure}[b]{0.75\textwidth}
      \rule{\linewidth}{0.5\linewidth}
      \caption{First sub-figure}\label{fig:first}
    \end{subfigure}
    \begin{subfigure}[b]{0.75\textwidth}
      \rule{\linewidth}{0.5\linewidth}
      \caption{Second sub-figure}\label{fig:second}
    \end{subfigure}
    \caption{Two dummy sub-figures}\label{dummy}
  \end{figure}
\end{document}

The caption manual has the details.

share|improve this answer
    
I have exactly the same problem, but this solution doesn't work for me. Setting \belowcaptionskip adds space after the caption for the whole figure (which I don't want), rather than under the subfigure captions (which is what I do want). Any ideas? –  Roly Jan 7 at 10:28
1  
@Roly: Move the line with \setlength into the first subfigure environment (or insert it in both). –  Thorsten Donig Jan 8 at 8:35
    
Thanks. Actually I had already tried that. Unfortuately, inside the subfigure environment \setlength does nothing for my document. (Moved back to the figure environment it affects only the spacing after the caption of the whole figure.) I'll have to come up with a MWE. –  Roly Jan 8 at 8:50
add comment

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.