Do you know how I can call a reference to an equation using \ref
or \eqref
and obtain the (name of the equation)
instead of the standard counter?
2 Answers
If you use the amsmath
package you can do
\begin{equation}
\tag{*}
\int_{\partial\Omega} \omega = \int_\Omega d\omega
\label{eqn:Stokes}
\end{equation}
By \eqref{eqn:Stokes} ...
Is that what you want?
-
4@Matthew: I'd always recommend using
\eqref{eqn:Stokes}
instead of(\ref{eqn:Stokes})
. By the way, there's a closing brace missing ... Commented Nov 4, 2010 at 16:03 -
Yeah, this is what i was searching for, but unfortunately it doesn't seem to work with 'eqnarray'– AbramoCommented Nov 4, 2010 at 17:42
-
5Don't use
eqnarray
, it is horrible. Useamsmath
'salign
and friends instead. Commented Nov 4, 2010 at 17:48 -
@Hendrik: For some reason I never got into the habit of
\eqref
although I agree it's better. Thanks also for pointing out my missing brace (and to Khaled I guess for fixing it). Commented Nov 4, 2010 at 17:57 -
2@Hendrik: I like using the
fncylab
package and then\labelformat{equation}{(#1)}
so that I can just write\ref{eqn:Stokes}
. Though then it requires more work NOT to get the parentheses. Commented Nov 9, 2010 at 11:14
The \tag{your name here}
construct can be used inside \begin{equation} .. \end{equation}
and the amsmath \begin..end{align}
constructs in order to give equations visible names instead of numbers:
\begin{equation}
\tag{Super Fun Equation}
y = 3x
\end{equation}
Labels can then be used to refer to names in references:
\begin{equation}
\tag{Super Fun Equation}
y = 3x
\label{eqn:super}
\end{equation}
...
See \eqref{eqn:super} for an awesome equation % See Super Fun Equation for ...
-
1I seem to be getting (??) instead of the name. Are there any dependencies I should add? Commented Oct 17, 2023 at 6:24
\eqname{eqn:Stokes}
to produce something likeStokes equation
in the document (instead of\eqref{eqn:Stokes}
which produces(1)
). Abramo, am I right?