I'd like to have a version of \eqref
that treats equations with a custom tag differently from the usual numbered equation. In particular, if I assign a tag to an equation, I'd like \eqref
not to put parens around the reference. Below is an example.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\label{eq:normal}
a = b
\end{equation}
\begin{equation}
\label{eq:tagged}
y = max\{1,x\} \tag{$P(x)$}
\end{equation}
Equations \eqref{eq:normal} will display as "(1)" (i.e., with parens)
and \eqeref{eq:tagged} will display as "$P(x)$" (i.e., without parens).
\end{document}
How would I modify the \eqref
command?