[OS X TeX] LaTeX brain puzzle

Morten Høgholm morten.hoegholm at gmail.com
Wed Sep 14 14:08:17 CEST 2005


On Wed, 14 Sep 2005 13:52:21 +0200, Geoff Vallis <gkv at Princeton.EDU> wrote:

> I need to reference a table by page number. If the table has a label in  
> it called mylabel then I can write: 'See the table on page \pageref 
> {mylabel}.'
> But if the table is on the same page, or the next page, as the  
> referencing sentence this looks  bit silly. In that case I would like to  
> say, for example, 'see the table at the top of this page.' Thus, I would  
> like a macro, let's say called \cleverref{}, that I use instead of  
> \pageref{} that does the following:
>   1.  If the label is on the same page as \cleverref{} itself, it expands
>       to 'at the top of this page'.
>   2.  If the label is on the next page as \cleverref{} itself, it expands
>       to 'on the next page'.
>   3.  Otherwise it expands to 'on page \pageref{}'.

That's the varioref package from the tools bundle. Note that your first  
requirement isn't that easy to implement; the varioref documentation has  
something on that topic.
-- 
Morten
--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the macostex-archives mailing list