1

This script:

\documentclass{article}
\usepackage{lipsum}
\usepackage{graphicx}
\usepackage{subfig}                                                                                                                                                                                
\begin{document}
\lipsum[1-5]
\begin{figure}
  \centering
  \subfloat[]{
    \includegraphics[width=0.5\textwidth]{example-image-a}
  }\\                                                                                                                                                                                           
  \subfloat[]{
    \includegraphics[width=0.5\textwidth]{example-image-b}
  }
\end{figure}
\lipsum[6-10]
\end{document}

produces the output:

![enter image description here

There is a lot of empty space around the figure that could be economically filled with text. How to solve this problem?

Viesturs
  • 7,895
  • 1
    I think increasing the \floatpagefraction (default=0.5) should do: \renewcommand{\floatpagefraction}{0.8}... – Phelype Oleinik Apr 05 '19 at 19:13
  • 1
    Have a look at this question: avoid that figure gets its own page, especially the last answer, for more information. – barbara beeton Apr 05 '19 at 19:31
  • 1
    David showed it. You have to understand how the floats are placed. There is real "must read" about here. The you can fill the entire page with text without leaving a free space. Now the question is: why the hell? You spend the same number of pages and the text is worse distributed, and the figure is left in a less prominent place. Not an improvement, IMHO. – Fran Apr 05 '19 at 19:53
  • 1
    @Fran in the example it stays at three pages but it's likely to be more compact in other documents, if there had been a few more lines of text then this example would already have gone from 4 to 3 pages by forcing a top float here. – David Carlisle Apr 06 '19 at 10:44
  • @DavidCarlisle Of course. I was referring to this specific MWE. It is clear that in another document this can help to save trees, and depending of how big is the figure, even in a elegant way. – Fran Apr 06 '19 at 16:14

1 Answers1

2

enter image description here

\documentclass{article}
\usepackage{lipsum}
\usepackage{graphicx}
\usepackage{subfig}                                                                                                                                                                                
\begin{document}
\lipsum[1-5]
\begin{figure}[t]
  \centering
  \subfloat[]{
    \includegraphics[width=0.5\textwidth]{example-image-a}
  }\\                                                                                                                                                                                           
  \subfloat[]{
    \includegraphics[width=0.5\textwidth]{example-image-b}
  }
\end{figure}
\lipsum[6-10]
\end{document}
David Carlisle
  • 757,742