title: Is there a way to get LaTeX to place figures in the same page as a reference to that figure?
body: <p>I am using LaTeX and the figure environment.</p>
  
  <p>I am well familiar with the parameters to that environment: [htbp], and I am also generally familiar with the strategies that LaTeX takes, by default, to decide where to put each figure. For example, by placing figures at the top or bottom of the page.</p>
  
  <p>What I am wondering is whether there is a package, macro, or some commands that I can give so that if I have a single-column document and I mostly have a single in-text reference to a figure, that the figure would be more likely to be placed in the same page of the reference?</p>
  
  <p>For example, imagine that I have a long paragraph which in the middle has a \ref{FIG:X}. When rendered, some of the paragraph appears before the page break, and some appears after the page break. I can also place the figure command somewhere before and after the whole paragraph. Is there a way to get it to actually be placed in the same page as the actual reference?</p>