Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
3  
Consider using the varioref package, which has facilities just for that purpose. –  egreg Sep 28 '11 at 10:10
    
awesome, thank you! –  tim riffe Sep 28 '11 at 10:32

1 Answer 1

The varioref package is intended just for similar things. Its command \vref adds suitable words to the number, depending on the context. For example, in twosided printing, it might resolve a reference see Figure~\vref{x} to

see Figure 1.1 on the facing pages

if this is the case. It's very customizable and provides support for different languages than English.

share|improve this answer
1  
The varioref package is indeed the way to go IMHO, but I made the experience that some people (like Ph.D. supervisors) are not used to such things and tend to dislike it. A simple "see Figure N.M" does it mot of the time. –  Martin Scharrer Sep 28 '11 at 11:18
    
@MartinScharrer thanks for the input. Indeed it's for my dissertation. Appreciate style tips as well. –  tim riffe Sep 28 '11 at 12:02
    
I believe, IMHO, it is due to the fact that a dissertation formally is oral and "above" and "below" are not eloquent, having no meanings. Should use "the before mentioned" and "the next." –  Peter Jones Oct 5 '11 at 21:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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