Consider the following MWE
\documentclass{article}
\usepackage{caption}
\usepackage{subcaption}
\begin{document}
\begin{figure}
\begin{subfigure}[t]{.5\linewidth}
\centering
\rule{3cm}{3cm}
\caption{First subfigure}
\end{subfigure}%
\begin{subfigure}[t]{.5\linewidth}
\centering
\rule{3cm}{3cm}
\caption{Second subfigure}
\end{subfigure}
\caption{A figure}
\end{figure}
\end{document}
How do I reduce from the preamble (either as a package option or a setting) the separation between the caption of the subfigures and the caption of the figure?
Best Answer
It is mostly an optical effect. The vertical space is the same as the one used between figure and caption, but it is measured from the bottom, which in the case of subfigures is at the lowest point in the parentheses.
Here's the proof:
I added rules to show the spacing; the rule in the upper figure almost touches the black box; in the bottom case, it almost touches the level of the parentheses. Actually there is 1pt more in the bottom case, due to
\lineskip
.If you want that the vertical spacing is measured from the baseline of the subfigures and your subcaptions are always one liners, then you might add
and the result would be
However, the backing up would be too much if a subcaption breaks across lines.
A much easier method would be
adjusting the
3pt
to suit in the cases where this seems necessary. This will reduce the skip between the objects (subfigures and caption) by the stated amount.