Short cut for ref in latex

This form with ( ) is usually used for equation numbers and amsmath provides \eqref which does exactly what you ask. Or more exactly it uses the same format as the package uses for equation numbers, so ( ) by default but if you change that then both the equation and the reference will use the same formatting.


As the accepted answer by @DavidCarlisle says, \eqref from amsmath is the way to go, since it takes care of the format such that it matches amsmaths equation numbering. However, you could make your own:

% Make a new command that makes your \refp
\newcommand{\refp}[1]{(\ref{#1})}

The square brackets [1] is how many arguments the command takes, and the #1 is the argument itself. So now when you do \refp{some:ref} it replaces it with (\ref{some:ref}) All you have to do to use it is then

\refp{some:ref}