I have a rather large file with many chapters, before every chapter I use \cleardoublepage
to get to a new doublepage but flushing all floats beforehand.
In the beginning I also had position specifiers on all floats but I then had the issue that all floats were pushed to the end. This answer suggests to remove the position specifiers, and that worked fine for me.
However, I now have the problem of sometimes seeing the following order
float
chapter title
instead of
chapter title
float
as it is in my document. I know there's a \FloatBarrier
command but if I use it after the \section{chapter title}
command, the float gets pushed to the next page, which is not what I want.
I wonder, how do I properly place floats and prevent them to be before my chapter titles?
A minimum working example is given here:
\documentclass[11pt,a4paper,twoside]{article}
\begin{document}
\section{Section 1}
\cleardoublepage
\section{Section 2}
\begin{table}
\begin{tabular}{|l|}
This is just a table \\
\end{tabular}
\end{table}
\end{document}
book
and switch to chapters accordingly.