I have a problem when using subfigures: When there is not enough space for the two side-by-side subfigures they are put on the next page, which is fine of course, but then the text following the subfigures(not captions) are put up ahead of the subfigures, so that the text meant to come after the subfigures now is ahead of them.
The code i am using is:
\begin{figure}[hbt]
\centering
\begin{subfigure}{.5\textwidth}
\centering
\includegraphics[scale=0.8]{test}
\caption{test}
\label{fig:test}
\end{subfigure}%
\begin{subfigure}{.5\textwidth}
\centering
\includegraphics[scale=0.8]{test}
\caption{test}
\label{fig:test}
\end{subfigure}
\caption{test}
\label{fig:test}
\end{figure}
Does anybody know what might be causing my problem?
figureis a floating environment. If you don't want this stuff to float around, put it into a non-floating environment (and put a\captionsetup{type=figure}at its beginning). See also: https://tex.stackexchange.com/a/139907/2574 (Point 6) – Oct 13 '15 at 20:47\FloatBarrier(angeboten vom placeins-Paket) arbeiten. – Oct 14 '15 at 08:28