6

I have the following MWE:

\documentclass[a4paper,10pt]{article}
\usepackage{graphicx}
\usepackage{subfig}

\makeatletter
\newbox\sf@box
\newenvironment{SubFloat}[2][]%
{\def\sf@one{#1}%
\def\sf@two{#2}%
\setbox\sf@box\hbox
\bgroup}%
{ \egroup
\ifx\@empty\sf@two\@empty\relax
\def\sf@two{\@empty}
\fi
\ifx\@empty\sf@one\@empty\relax
\subfloat[\sf@two]{\box\sf@box}%
\else
\subfloat[\sf@one][\sf@two]{\box\sf@box}%
\fi}
\makeatother


\begin{document}

\begin{figure}[!ht]
\centering
% \captionsetup[subfigure]{labelformat=empty} % Removes a), b) labels
%
\begin{SubFloat}
{\label{fig:1} }
\includegraphics[width=0.42\textwidth]{fig.png}%
\end{SubFloat}
\vspace{1cm}
\qquad
\begin{SubFloat}
{\label{fig:2} }
\includegraphics[width=0.42\textwidth]{fig.png}%
\end{SubFloat}

\begin{SubFloat}
{\label{fig:3} }
\includegraphics[width=0.42\textwidth]{fig.png}%
\end{SubFloat}
\qquad
\begin{SubFloat}
{\label{fig:4} }
\includegraphics[width=0.42\textwidth]{fig.png}%
\end{SubFloat}

\caption{Caption blah blah.}
\label{figure-temp}
\end{figure}

\end{document}

which gives me this:

output

I need some way to add vertical space between the caption of each figure ("X AXIS") and the letter assigned to it (a, b, c, d) Not to the whole article, but to this figure in specific. Cheers!

4

Set the captionskip key in the figure environment:

\begin{figure}[!htp]
\centering
\captionsetup[subfigure]{captionskip=20pt} % adjust the value
%
\begin{SubFloat}
...
\end{Subfloat}

\caption{Caption blah blah.}
\label{figure-temp}
\end{figure}

Using [!ht] with so large a float is a bound to troubles, better [!htp].

  • Great, that did it! The [!htp] advice is duly noted. Thank you! – Gabriel Dec 4 '12 at 18:44

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.