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''?
Asked
Active
Viewed 1.8k times
7
1 Answers
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 -
-
1If 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
\labelin 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
\tag{$1^\prime$}rather than\tag{1'}- the\primeis a little cleaner. – Werner Oct 27 '11 at 18:09\refto equation 1. I'll update my answer to show the technic. – Leo Liu Oct 27 '11 at 18:11\primeshould be added automatically? – Werner Oct 27 '11 at 18:14\primeis still typed manaully. – Leo Liu Oct 27 '11 at 18:23