Support for the refstyle package

The package refstyle (http://www.ctan.org/tex-archive/macros/latex/contrib/refstyle)
let writer define their own ref macros and categorise them,
e.g. \eqnref{newton} will refer to \label{eqn:newton}
whereas \figref{newton} will refer to \label{fig:newton}.