1

I am doing a test on subfloat. I have found that subfloat needs more vertical space than normal floats. I do not know why. The test code is shown below. Could you help me to remove the additional vertical space in subfloat figures?

\documentclass{IEEEtran}
\usepackage{amsmath}
\usepackage{lipsum}

\usepackage{graphicx}


\ifCLASSOPTIONcompsoc
  \usepackage[caption=false,font=normalsize,labelfont=sf,textfont=sf]{subfig}
\else
  \usepackage[caption=false,font=footnotesize]{subfig}
\fi

%-------------------------------- show page layout, only for test
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%


\begin{document}
\lipsum[1-9]

\begin{figure*}
\centering
\includegraphics[width=0.32\linewidth]{example-image-a}\hfill
\includegraphics[width=0.32\linewidth]{example-image-a}\hfill
\includegraphics[width=0.32\linewidth]{example-image-a}
\caption{
  A test. balabala balabala balabala balabala balabala balabala 
  balabala balabala balabala balabala balabala balabala balabala 
  balabala. balabala balabala balabala balabala balabala balabala 
  balabala balabala balabala balabala balabala balabala balabala balabala.
}
\end{figure*}

\section{New section}
\lipsum

\begin{figure*}
\centering
\subfloat[]{\includegraphics[width=0.32\linewidth]{example-image-a}}\hfill
\subfloat[]{\includegraphics[width=0.32\linewidth]{example-image-a}}\hfill
\subfloat[]{\includegraphics[width=0.32\linewidth]{example-image-a}}
\caption{
  A test. balabala balabala balabala balabala balabala balabala 
  balabala balabala balabala balabala balabala balabala balabala 
  balabala. balabala balabala balabala balabala balabala balabala 
  balabala balabala balabala balabala balabala balabala balabala balabala.
}
\end{figure*}
\lipsum[1-10]


\end{document}

Parts of the output. enter image description here enter image description here

  • 3
    The skip is farskip and you can get rid of it with \usepackage[caption=false,font=footnotesize,farskip=0pt]{subfig}. The docu claims that it is not inserted at page breaks, but the test doesn't work correctly with figure*. Side remark: the showframe package disturbs the test too. – Ulrike Fischer Sep 18 '17 at 13:48
3

The skip is farskip and you can get rid of it with

\usepackage[caption=false,font=footnotesize,farskip=0pt]{sub‌​fig}

The package documentation claims that this skip is not inserted at page breaks but this test seems not to work correctly with figure*.

  • thanks for your answer. do you know how to apply for a single figure* environment? – aban Nov 21 '17 at 2:52

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.