Is there a way to prevent extra space being added between the figure and its caption when using \subfigure?
I am using a command posted in this topic where a \subfigure is added using the \phantomsubfigure command.
When using this command it adds extra space between my figure and its caption. Is there a way to suppress it?
Here is my MWE:
\documentclass[
DIV=11,
%fontsize=12,
twoside=semi,
headinclude=false,
titlepage=firstiscover,
abstract=true,
headsepline=true,
footsepline=true,
chapterprefix=true,
headings=big,
bibliography=totoc,
captions=tableheading
]{scrreprt}
\usepackage[left=2.5cm,right=2.5cm,top=3cm,bottom=3cm]{geometry}
\usepackage{setspace}
\usepackage{afterpage} %to float a figure onto its own page
\usepackage[draft]{graphicx}
\usepackage[labelformat=empty,skip=0pt]{subcaption}
%%%%%%%%%%% PHANTOM SUBFIGURE COMMAND
% Used for adding subfigure referencing capabilities to composite figure images
\newcommand*\phantomsubfigure[1]{\begin{subfigure}[]{0pt}\caption{}\label{#1}\end{subfigure}} %<---- this is the command
\renewcommand\thesubfigure{(\alph{subfigure})}
\begin{document}
\begin{figure}[htb]
\centering
\includegraphics[width=16cm,height=23cm]{myPictureName.png}
\caption{Figure without subfigures.}
\label{fig:1}
\end{figure}
\begin{figure}[htb]
\centering
\includegraphics[width=16cm,height=23cm]{myPictureName.png}
\phantomsubfigure{fig:S01+04-xrd_a}
\phantomsubfigure{fig:S01+04-xrd_b}
\phantomsubfigure{fig:S01+04-xrd_c}
\phantomsubfigure{fig:S01+04-xrd_d}
\phantomsubfigure{fig:S01+04-xrd_e}
\caption{Figure with subfigures.}
\label{fig:2}
\end{figure}
\end{document}
\phantomsubfigureand after the second\includegraphicsor you put all that stuff on just one line. – LaRiFaRi Jun 17 '15 at 10:13