In the following MWE, the second float (within a multicols
environment) is moved to page 4 while there is (seems to be) enough place where its code is given (on page 3). Why?
\documentclass{article}
\usepackage{graphicx}
\usepackage{mwe}
\usepackage{dblfloatfix}
\usepackage{fixltx2e}
\usepackage{multicol}
%
\newcommand{\test}{%
\lipsum[1-3]
\begin{figure*}
\centering
\includegraphics[width=4cm]{example-image}
\caption{Foo bar}
\end{figure*}
\lipsum[5-6]
}
%
\begin{document}
\section{A section}
\subsection{A First Subsection}
\begin{multicols}{2}%
\test
\end{multicols}
\subsection{A Second Subsection}
\begin{multicols}{2}%
\test
\end{multicols}
\end{document}
Best Answer
See Frank Mittelbach's answer to How to influence the position of float environments like figure and table in LaTeX?
Here's the relevant passage from that answer
(Emphasis in the second paragraph added by me).
Indeed, if I change your example and pull the
figure*
environment up, so the code appears when TeX is processing page 2, the float will go to the top of page 3.