0

In this answer is proposed a way to color the parentheses when using \eqref. However, the parentheses are now not part of the hyperlink. Is there a way to include them?

Mico
  • 506,678
Zuy
  • 353

1 Answers1

2

Rather than reinvent the proverbial wheel, I would like to suggest that you (a) load the cleveref package with the options nameinlink and noabbrev and (b) use \labelcref and \cref to generate cross-references to equations; the latter command will prefix the object's type -- here: "equation" -- to the object's number.

enter image description here

\documentclass{article} 
\usepackage[colorlinks,allcolors=blue]{hyperref}
\usepackage[noabbrev,nameinlink]{cleveref} % https://ctan.org/pkg/cleveref

\begin{document} \refstepcounter{equation}\label{eq:test} \labelcref{eq:test}, \cref{eq:test} \end{document}

Mico
  • 506,678