I used a customized command \myref (From a previous question here) that allows me to include in the hyperref link the word, say, Equation, before the reference. Unfortunatly, it does not seems to happy when used with \usepackage{showkeys}, especially when labels contain math symboles like underscores.
Is there a possible fix for the code that would allow then to work nicely together ?
The MWE:
\documentclass[10pt,a4paper]{report}
\usepackage{fontspec}
\usepackage{hyperref}
\usepackage{twoopt}
\hypersetup{colorlinks=true,linkcolor=blue}
\newcommandtwoopt*{\myref}[3][][]{%
\hyperref[{#3}]{%
\ifx\\#1\\%
\else
#1~%
\fi
\ref*{#3}%
\ifx\\#2\\%
\else
\,#2%
\fi
}%
}
\usepackage{showkeys}
\begin{document}
\begin{equation}
x - 3 = 7
\label{eq:too_complicated}
\end{equation}
\myref[Equation]{eq:too_complicated} is so complicated that it does not admit any analytical solution.
\end{document}

hyperrefinstead of before? – Werner Oct 16 '15 at 02:07