0

In a document, I have equation numbers like (3.4)=(2.1) to show that the equation was already used previously. When I then reference this equation with \eqref, it shows up exactly like this. How can I achieve defining the second part as optional, so that I can tag the equation as (3.4)=(2.1), but have a reference to it only show (3.4)?

\documentclass{article}

\usepackage{amsmath}
\usepackage{lipsum}

\begin{document}

\lipsum[1]
\begin{equation}\label{eq:1.1}
  a+b=c \tag*{(1.1)=(2.2)}
\end{equation}
\lipsum[2]
\eqref{eq:1.1}

\end{document}
0

1 Answer 1

1

You can put pretty much anything into a label if you know how.

It should be noted that amsmath redefines label to make it impossible to set it to anything else INSIDE the environment.

\documentclass{article}

\usepackage{amsmath}
\usepackage{lipsum}

\makeatletter
\newcommand{\mytag}[2]% #1 = tag, #2 = label
  {\def\@currentlabel{#1}\label{#2}}
\makeatother

\begin{document}

\lipsum[1]
\mytag{1.1}{eq:1.1}
\begin{equation}
  a+b=c \tag*{(1.1)=(2.2)}
\end{equation}
\lipsum[2]
\eqref{eq:1.1}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .