[ACCEPTED]-In LaTeX, is there a way to put a float automatically after where it is first referenced?-figures

Accepted answer
Score: 22

The LaTeX Companion says that the flafter package 14 can be used to ensure that floats are never 13 placed before their references. To use this, add 12 the following to your document's preamble:

\usepackage{flafter}

Note 11 that, according to this thread, what flafter does is ensure 10 that the float never appears before its 9 position in the LaTeX source code.

This may 8 work well if your document only has a few 7 floats. For documents with lots of floats, placement 6 becomes much more difficult, and you may 5 find that all your floats appear together 4 at the end of the document or chapter, or 3 you may receive a "Too many unprocessed 2 floats” error. I suggest reading this page and this page in 1 the UK TeX FAQ for more suggestions.

More Related questions