2

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

enter image description here

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

enter image description here

But I would like to write it in a shorter form

enter image description here

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}
    \begin{equation}
    \label{1}
    \tag{$E_\lambda$}
    -u'' = \lambda u.
    \end{equation}

    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}
  • 1
    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
2

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}
    \begin{equation}
    \label{1}
    \tag{$E_{\lambind}$}
    -u'' = \lambda u.
    \end{equation}

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

    But I would like to write: Consider {\renewcommand\lambind{\lambda_1}\eqref{1}} and {\renewcommand\lambind{\lambda_2}\eqref{1}}.
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.