I'm working in the \appendix environment of a memoir-class document. In the appendix, I have a number of tables:

  1. \begin{table} \begin{tabular} ... \end{tabular} \end{table}
  2. \begin{table} \begin{tabular} ... \end{tabular} \end{table}
  3. \begin{landscape} \begin{longtable}{...} ... \end{longtable} \end{landscape}
  4. \begin{landscape} \begin{longtable}{...} ... \end{longtable} \end{landscape}
  5. \begin{table} \begin{tabular} ... \end{tabular} \end{table}

After that, I'd like to display a figure: \begin{figure} ... \end{figure}. I definitely want that shown after all the tables in the document. However, it always appears between tables 4 and 5 in the PDF, even though it would fit very nicely.

I've already tried forcing things with \begin{figure}[h!] and/or \begin{table}[h!] for table 5. \pagebreak and \newpage in front of \begin{figure} won't do the trick either.

How can I fix this problem?

  • 1
    Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Have you tried using a \clearpage command? This will flush floats waiting to be output. – Andrew Swann Aug 8 '13 at 14:55

You can use the flafter package (part of the base LaTeX distribution) then floats will always appear after their position in the source. So if the source of your figure is on or after the page with the last table, it will not move "back" to the top of that page, even if t floats are allowed.

  • That looks like an interesting package. Does it switch off floating completely or can the author choose (e.g. in the form of an environment) in which part of the document the floating shall be disabled? – Roman Aug 8 '13 at 16:47
  • 1
    @Roman no it just modifies the float algorithm not to allow t on the first attempted page, which is the only time a float ever moves "backwards" – David Carlisle Aug 8 '13 at 16:58

Putting \FloatBarrier between the figures and tables should also prevent them from floating. The function is provided by the package placeins.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.