Equation number with an apostrophe
a method that will allow both equation numbers to be referenced outside the align
uses labels and \ref
:
\begin{align}
x^2+y^2=z^2, \label{firsteq}\\
x^2=7, \tag{\ref*{firsteq}'} \label{primeq}
\end{align}
the job needs to be run three times to resolve the numbers.
the *
on \ref*
in the \tag{...}
will prevent the equation number in the display
from being treated as a link. however, the label for the number with the prime can still be referenced in text by \eqref
, and that will be linked.
(not part of the answer, but a suggestion: prime is more usual than an apostrophe; the apostrophe in this context will automatically be set as a prime.)
I would recommend using the \tag
macro to directly insert the equation number.
\documentclass{article}
\usepackage{amsmath,amssymb}
\numberwithin{equation}{section}
\begin{document}
\section{Section A}
\begin{align}
z^2&= x^2 + y^2 \\
z^2 &= x^2 + y^2 \tag{\theequation'}
\end{align}
\end{document}
As per @barbarabeeton 's answer, the '
should be \prime
as:
\documentclass{article}
\usepackage{amsmath,amssymb}
\numberwithin{equation}{section}
\begin{document}
\section{Section A}
\begin{align}
z^2&= x^2 + y^2 \\
z^2 &= x^2 + y^2 \tag{\theequation${}^\prime$}
\end{align}
\begin{equation}
z^2= x^2 + y^2
\end{equation}
\end{document}
Incidentally, the \theequation
is the way to access directly the formatted equation
counter. This works with any counter you're using, \the<counter_name>
will call the formatted counter. This is the reason \theequation
resulted in 1.1
and not just 1
, which is the value of the counter equation
.