# More than two figures on one page with text in between (problem with float)

I need to put more than two pictures/figures with text in between on one page. Now I'm having the problem, that more or less always one picture is floating on the next page, even though there would be "optically" place on the same page. I tried it with htb and H, both resulting in either the text or at least one of the images floating to the next page.

Instead of \fbox I use \includegraphics.

        \documentclass[a4paper, openany, oneside, titlepage, toc=bib, toc=listof]{scrbook}
\usepackage[a4paper, left=2.5cm, right=2.5cm, top=2.5cm, bottom=2.2cm, footskip=.8cm]{geometry}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[final]{graphicx}

\begin{document}

\begin{figure}[htb]%
\centering
\caption{Test}
\fbox{\parbox[c][150pt]{0.4\linewidth}{Test}}
\label{fig:Test1}
\end{figure}

Short text. Blahblah. Short text. Blahblah. Short text. Blahblah.

\begin{figure}[htb]%
\centering
\caption{Test}
\fbox{\parbox[c][100pt]{0.4\linewidth}{Test}}
\label{fig:Test2}
\end{figure}

Third short text. Blahblah. Short text. Blahblah. Short text. Blahblah.

\begin{figure}[htb]%
\centering
\caption{Test}
\fbox{\parbox[c][200pt]{0.4\linewidth}{Test}}
\label{fig:Test3}
\end{figure}

\end{document}


Many thanks.

• [!htb] on the third figure puts it all on a single page. – latex user Jun 24 '13 at 11:07
• @LuanResende it does but ! says to ignore the constraint so normally it's better to just change the constraint if you do not want that constraint enforcing. – David Carlisle Jun 24 '13 at 11:19

The class you are using has a constraint that a text page must have at least 20% text not floats with the idea being that if you have that many floats it is better to have a float page with just floats.

That idea is broken as you have used [htb] which excludes p so prevents LaTeX making a float page. (It is almost always a bad idea not to include p).

However in this case I think you just want to allow as little as 10% text so add

\renewcommand\textfraction{.1}


To your preamble and all three will appear on the same page.

A second very helpful command which influences the floats is \setcounter.

\setcounter{totalnumber}{5}


for example limits the floats to 5 per page, so here it's possible to exclude another reason for images/tables floating to the next page.