title: In LaTeX, is there a way to put a float automatically after where it is first referenced?
body: <p>I am currently writing a long one-column document that contains a lot of floats (figures and tables). I know the usual b/h/p/t options for placing floats in latex. However, I was wondering if there exists a package or macro that would let me do the following automatically: place a float automatically right after it was first reference. So if the reference appears on the top of page x, then the float would most likely appear at the bottom of page x, or maybe at (the top of) page x+1. In any case it should <em>not</em> occur <em>before</em> the reference.</p>
  
  <p>I know that this may be hard to achieve but then I am not a latex guru either...</p>
  
  <p>(Note that this question is different from <a href="https://stackoverflow.com/questions/448768/is-there-a-way-to-get-latex-to-place-figures-in-the-same-page-as-a-reference-to-t">this one</a>.)</p>