4

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}
pfnuesel
  • 642
  • Could you post a MWE (or two) where both cases are demonstrated. Normally, floats should be shipped out before chapters start -- I did not observe the behaviour you described up to now. –  Feb 26 '14 at 18:21
  • Updated my question. – pfnuesel Feb 26 '14 at 18:38
  • You are using sections, not chapters, there is no automatic shipout of floats and new page before a new section starts. Perhaps, you have to change documentclass to book and switch to chapters accordingly. –  Feb 26 '14 at 18:42

1 Answers1

4
\documentclass[11pt,a4paper,twoside]{article}
\makeatletter
\renewcommand\fps@table{htbp}
\makeatother

\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}
David Carlisle
  • 757,742