%\RequirePackage{xcolor}
\RequirePackage{pdfcomment}

\def\compemph#1{%
  \ifcsname textcolor\endcsname
    \textcolor{blue}{#1}%
  \else
    #1%
  \fi
}
\def\symrefemph#1{%
  \ifcsname textcolor\endcsname
    \textcolor{teal}{#1}%
  \else#1\fi
}
\def\defemph#1{%
  \ifcsname textcolor\endcsname
    \textcolor{magenta}{%
      \ifmmode
      \else\expandafter\textbf
      \fi{#1}%
    }%
  \else
    \ifmmode
    \else\expandafter\textbf
    \fi{#1}%
  \fi
}
\def\varemph#1{\ifcsname textcolor\endcsname\textcolor{gray}{#1}\else#1\fi}

\protected\def\compemph@uri#1#2{%
   \pdftooltip{%
      \srefsymuri{#2}{\compemph{#1}}%
   }{%
     URI:~\detokenize{#2}%
   }%
}
\protected\def\symrefemph@uri#1#2{%
  \pdftooltip{%
    \srefsymuri{#2}{\symrefemph{#1}}%
   }{%
     URI:~\detokenize{#2}%
   }%
 }
\protected\def\defemph@uri#1#2{%
   \pdftooltip{%
     \defemph{#1}%
   }{%
     URI:~\detokenize{#2}%
   }%
}
\protected\def\varemph@uri#1#2{%
   \pdftooltip{%
     \varemph{#1}%
   }{%
     Variable~\detokenize{#2}%
   }%
}
