# Labels and tags with parametric dependence

Suppose there is an equation with a parameter, and the parameter is represented in equation's tag:

I'm looking for a way how to refer to this equation using two different \lambda, say, \lambda_1 and \lambda_2. It is possible to write

But I would like to write it in a shorter form

in such a way that $(E_{\lambda_1})$ and $(E_{\lambda_2})$ refer to the equation, as in the variant above.

Here is a MWE:

\documentclass[12pt,a4paper]{article}
\usepackage{amsmath}
\usepackage{hyperref}

\begin{document}
$$\label{1} \tag{E_\lambda} -u'' = \lambda u.$$

It is possible to write: Consider \eqref{1} with $\lambda=\lambda_1$ and $\lambda=\lambda_2$.

But I would like to write: Consider $(E_{\lambda_1})$ and $(E_{\lambda_2})$.
\end{document}

• with your referencing i will look for two equations: E_{\lambda_1} and E_{\lambda_1}, but you have only one tagged with \lambda_1 ... don't do this, you will only make a mess in your document. – Zarko May 6 '18 at 18:09
• @Zarko In variety of situations such way provides a simplification for the reader without causing any mess. In fact, in my real text, there is only one equation (main one), at the very beginning of the text, tagged like E_\lambda. All other equations have usual numbering. It would be very convenient to refer to this equation with different \lambda's. (In my case, it is as clear as to vary a subindex in the definition of some function, i.e., f_{n_1}, f_{n_2}, etc.) – Voliar May 6 '18 at 19:05
• sorry, i disagree with you. however, some one can provide solution which you like to have. technically this is possible. but i will not do this. – Zarko May 6 '18 at 19:21

One possible simple solution which fits me is based on this answer and looks as follows:

\documentclass[12pt,a4paper]{article}
\usepackage{amsmath}
\usepackage{hyperref}

\DeclareRobustCommand\lambind{\lambda}

\begin{document}
$$\label{1} \tag{E_{\lambind}} -u'' = \lambda u.$$

It is possible to write: Consider \eqref{1} with $\lambda=\lambda_1$ and $\lambda=\lambda_2$.

\end{document}