\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{prettyref-compat}

\def\newrefformat#1#2{%
  \@namedef{pr@#1}##1{#2}}
\newrefformat{eq}{\textup{(\ref{#1})}}

\def\prettyref#1{\@prettyref#1|}
\def\@prettyref#1|#2|{%
  \expandafter\ifx\csname pr@#1\endcsname\relax%
    \PackageWarning{prettyref}{Reference format #1\space undefined}%
    \ref{#1|#2}%
  \else%
    \csname pr@#1\endcsname{#1|#2}%
  \fi%
}
%%
%% End of file `prettyref-compat.sty'.
