Intelligent references with varioref

A very helpful LaTeX package that not so many people (in my surrounding) seem to know is the varioref package.
The package provides a nicer output for references to labels that appear on different pages.
Among other things, it adds the two commands \vref and \vpageref that can be used like their normal corresponding commands \ref and \pageref. The \v... commands decorate the reference in text with some additions.

Consider an example where a listing is to be found on the following page:

See listing~\vref{list:MyListing} for comparison.

results in the output:

See listing 5 on the following page for comparison.

This works just the same with additions like “on the facing page”, “on page 55”, and so on.
As a side note, this also works in several languages.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s