\veqref{} command like \vref...from varioref package
Section 2.3 of the documentation details that you can use
\labelformat{equation}{(#1)}
so that \vref
works as you would want it to for equations.
In fact, following egreg's comment, one should have the reference typeset upright, even if it is contained in environment that is (for example) italic.
A complete MWE follows.
\documentclass{article}
\usepackage{amsmath}
\usepackage{varioref}
% this bit makes sure that the number is typeset upright- needs amsmath
\makeatletter
\labelformat{equation}{\tagform@{#1}}
\makeatother
\begin{document}
\begin{equation}\label{eq:myequation}
f(x)=x^2+\sin(x)
\end{equation}
Here is a reference: \vref{eq:myequation}.
\emph{Here is another reference: \vref{eq:myequation}.}
\end{document}
I recommend you to take a look at the package cleveref. According to its description:
[t]he package enhances LaTeX's cross-referencing features, allowing the format of references to be determined automatically according to the type of reference. The formats used may be customised in the preamble of a document.
I use it myself, and it is very flexible and configurable.
And here is a MWE, showing the use of cleveref
:
\documentclass{article}
\usepackage{cleveref}
\begin{document}
\begin{equation}\label{eq:myequation}
f(x)=x^2+\sin(x)
\end{equation}
Here is a reference to \cref{eq:myequation}.
Here is a reference to the number alone:
\labelcref{eq:myequation}.
\emph{Here is another reference, see the upright
reference number without any additional commands or
packages:
\cref{eq:myequation}.}
\end{document}
The use of labelformat
in varioref
has some limitations, which are described on page 5 in cleveref’s manual. cleveref
has its own labelformat
, also described in the manual (for more advance users).
You do not need to name the figure, tables or the page. A reference to an equation on another page in your manuscript is written:
See \cref{eq:myequation} on \cpageref{eq:myequation}