2

I have a two column document that features a couple of high aspect ratio (tall) floats which, including the caption, take up more than half, but not a full column. When I compile Latex always seems to give the figures their own full column and pad around them with white space. Is there a way I can "push up" the text after the floats to fill in the column and minimize this white space?

From suggestions in the comments I have tried:

    \setlength{\intextsep}{1 pt}

and

    \setlength{\belowcaptionskip}{1 pt}

but this did not seem to change the whitespace above the figure and below the caption.

Here is a MWE:

\documentclass[10pt,twocolumn]{article}
\usepackage[margin=0.5in,showframe]{geometry}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}


\usepackage{lipsum}
\begin{document}
    \lipsum[1-10]
    \begin{figure}
    \begin{center}
    \includegraphics[width=50 pt, keepaspectratio]{./1x6.pdf}
    \caption{\lipsum[2]}
    \end{center}
    \end{figure}

    \lipsum[1-10]
    \begin{figure}
    \begin{center}
    \includegraphics[width=50 pt, keepaspectratio]{./1x6.pdf}
    \caption{\lipsum[2]}
    \end{center}
    \end{figure}
    \lipsum[1-20]
\end{document}

A screenshot of the output is shown below, where the black boxes are the 1x6.pdf that I want to include. Sorry, I couldn't figure out how to include the 1x6.pdf in this post for the community to reproduce this.

enter image description here

  • There are a number of predefined spaces padded around floats, such as \intextsep [h] and \textfloatsep [tb]. You can always redefine them to be smaller. – John Kormylo Apr 27 '19 at 03:36
  • Thanks. Do you know where I can find a list of them and an explanation of what they are? – Canaryyellow Apr 27 '19 at 03:39
  • How about this answer: https://tex.stackexchange.com/a/29144/121799 ? –  Apr 27 '19 at 03:46
  • See source2e.pdf (https://ctan.org/pkg/source2e?lang=en), page 314. – John Kormylo Apr 27 '19 at 03:47
  • I tried \setlength{\intextsep}{1 pt} and \setlength{\belowcaptionskip}{1 pt}, but these didn't help. This answer contains a useful visualization of the definitions: https://tex.stackexchange.com/questions/60477/remove-space-after-figure-and-before-text – Canaryyellow Apr 27 '19 at 04:23
  • also use \centering not \begin{center} in a float that accounts for most of the extra space around the float – David Carlisle Apr 27 '19 at 07:45
  • I didn't notice that you were taking an entire column. That is a separate problem which is addressed by Leandriis below. – John Kormylo Apr 27 '19 at 14:07

1 Answers1

4

Maybe you are satisfied with the following result that can be obtained by changing the \floatpagefraction from the default value to 0.75. With this value, a float only occupies an own page (in case of a twocolumn document an own column) if it is larger than 75% of the page.

enter image description here

\documentclass[10pt,twocolumn]{article}
\usepackage[margin=0.5in,showframe]{geometry}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\renewcommand{\floatpagefraction}{.75}%

\usepackage{lipsum}
\begin{document}
    \lipsum[1-10]
    \begin{figure}
    \centering
    \includegraphics[width=50 pt,  height=300pt]{example-image}
    \caption{Some very long text text text text text text text text text text 
text text text text text text text text text text text text text 
text text text text text text text text text text text text text 
text text text text text text text text text text text text text 
text text text text text text text text text text text text text 
text text text text text text text text text text text text text 
text text text text text text text text text text text text text 
text text text text text text text text text text.}
    \end{figure}

    \lipsum[1-10]
    \begin{figure}
    \centering
    \includegraphics[width=50 pt,  height=300pt]{example-image}
    \caption{Some very long text text text text text text text text text text 
text text text text text text text text text text text text text 
text text text text text text text text text text text text text 
text text text text text text text text text text text text text 
text text text text text text text text text text text text text 
text text text text text text text text text text text text text 
text text text text text text text text text text.}
    \end{figure}
    \lipsum[1-20]
\end{document}
leandriis
  • 62,593