# \ref, make figure/table reference automatically toggle between “above” or “below”

Is it possible to automatically include a reference to the position of a labeled object (Table, Figure) in text? By this I mean the following:

Say I have labeled a figure in chapter 1:

\label{fig:one}

Then I refer to it in text by using:

See Figure~\ref{fig:one}

Which produces "See Figure 1.1" as desired. I'd like to be able to have it produce: "See Figure 1.1, above" or "See Figure 1.1, below", automatically detecting whether to produce "above" or "below" depending on whether the figure will be placed above that position on the final page.

• Consider using the varioref package, which has facilities just for that purpose. – egreg Sep 28 '11 at 10:10