I have this MWE:
\documentclass{article}
\usepackage{hyperref}
\usepackage{enumerate}
\begin{document}
\begin{enumerate}[\label=(X1)]
\item\label{i1} Hu
\item\label{i2} Pu
\end{enumerate}
Hello \ref{i1}.
\end{document}
In the PDF, I expected to see, "X1" as a hyperlink, but instead only "1" is coming:
How can I get "X1" automatically in the reference?


enumeratemanual:\refonly produces the counter value, not the whole label. So I think it is not possible to acheive your goal using theenumeratepackage. An alternative is to use theenumitempackage. – Ruixi Zhang Sep 25 '18 at 16:40[\label=(X1)]only works by pure accident and you indeed fine warnings aboutLabel `=' multiply defined– egreg Sep 25 '18 at 16:42