7

I want my equation's number to be "1'". I have done so through \tag{1'}. But now I don't know how to refer it in my document. Is there a method to call it or numbering equations like 1, 1', 1''?

diabonas
  • 25,784
Cagatay
  • 103
  • 1
  • 1
  • 4
  • I would suggest using \tag{$1^\prime$} rather than \tag{1'} - the \prime is a little cleaner. – Werner Oct 27 '11 at 18:09
  • @Werner: No, that is still not good. The number 1 should be obtained by a \ref to equation 1. I'll update my answer to show the technic. – Leo Liu Oct 27 '11 at 18:11
  • @LeoLiu: Oh, so the \prime should be added automatically? – Werner Oct 27 '11 at 18:14
  • @Werner: I mean the number. There should not be any manual serial numbers in LaTeX. \prime is still typed manaully. – Leo Liu Oct 27 '11 at 18:23

1 Answers1

15

Use \label and \eqref (or \ref) as usual. I don't think there is any difference.

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation}
1+1=2 \tag{A}\label{eq:simple}
\end{equation}

Eq.~\eqref{eq:simple} is simple.

\end{document}

(To make this question more useful)

To make a equation as a variant of another one, you can use this:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation}
a+b = b+a \label{eq:comm}
\end{equation}

\begin{equation}
1+2 = 2+1 \tag{\ref{eq:comm}$'$}\label{eq:comm:inst}
              % if hyperref is used, replace \ref with \ref*
\end{equation}

Commutative law \eqref{eq:comm} and an instance \eqref{eq:comm:inst}.

\end{document}
Leo Liu
  • 77,365
  • when i use them, equations are numbered like 1, 2, 3 and so on. What i need is 1, 1', 1''

    when i use \tag, i am unable to refer it back. this is the problem

    – Cagatay Oct 27 '11 at 18:04
  • Note that you have to use both \tag{<stuff>} and \label{<lab>}, and then you can refer to <lab> with either \eqref{<lab>} or (\ref{<lab>}). Also note the brackets around \ref{<lab>} which is automatically inserted when using \eqref{<lab>}. – Werner Oct 27 '11 at 18:06
  • Well, then I recover the example I've just deleted. – Leo Liu Oct 27 '11 at 18:07
  • 1
    If the "equation variant" version is to be used with hyperref, I wonder whether using \tag{\ref*{eq:comm}$'$} would be better. Otherwise only a portion of the tag will be hyperlinked. It may also be personal preference at this point. – Werner Oct 27 '11 at 18:22
  • @Werner: Then we can use (\ref{eq:comm}$'$) (maybe \vareqref{eq:comm} with a user-defined macro) instead of \eqref{eq:comm:inst}. We needn't change the labels. – Leo Liu Oct 27 '11 at 18:34
  • This seems extra work (adding a \label in addition to the \tag) for no clear gain. One could just use (A) or something, if one cares only about the printed appearance. – ShreevatsaR Apr 17 '19 at 17:06