Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have done this with figures before using.

\ref{}

Where you give the image an associated name so that it does not matter whether you change up the order, (i.e. latex will automatically number your referenced figure correctly).

I am sure it is possible for equations but I have not been able to find out how to do it. This would be very handy to be able to achieve as I am often dealing with lots and lots of equations and moving them about.

Here is a snippet of what I have been writing for my equations:

\begin{align}
\begin{split}
E_{k}={m  {\langle v^2 \rangle} \over 2 } = \frac{3k_{B}T}{2}
\end{split}
\end{align} 

I tried messing about with other ways but could not find the right way to use \ref{} or similar to get the desired result! Can anyone advise?

share|improve this question
    
May I ask why you put a split into an align? Is that a strongly simplified example or do you actually use it like that? –  Max Jan 3 '13 at 4:15
    
This works by default. Please provide a minimal working example (MWE) that shows what you're looking at that is problematic. Code snippets doesn't provide a wide enough scope for what you mentioned "doesn't work." –  Werner Jan 3 '13 at 4:54
2  
You have to insert \label{id} in the equation, and then use \ref{id} (where id is the identifier of the equation) to refer to it. –  Guido Jan 3 '13 at 5:11
    
@max I have been using it but I am not quite sure the meaning to be honest.I am just about to try '\label' now... –  Magpie Jan 3 '13 at 6:19

1 Answer 1

up vote 8 down vote accepted

This MWE show references to equations with \ref, \eqrefand some other alternative commands, as well as page references:

MWE

\documentclass{article}
\usepackage{amsmath}
\usepackage{varioref}
\usepackage[colorlinks=true,linkcolor=blue]{hyperref}
\usepackage{cleveref}
\begin{document}

The equation \ref{a} on page \pageref{a} 
showed a simple $a$ 
formula with simple references. 
The next equation \eqref{Ek} is more complicated, 
as the reference, that need the package \texttt{amsmath}. 
For intelligent references see the commands for these
references to \cref{Ek} \vpageref{Ek} using
\texttt{cleveref} and \texttt{varioref} packages. 
You can also hyperlik \hyperref[Ek]{this equation} 
with \texttt{hyperref} as well as most previous references. 
There are more packages for references, but don't use all 
at once (even only these in the wrong order are a source 
of problems).

\begin{equation} 
\label{a} a = b + c
\end{equation}

\begin{equation}
\label{Ek} E_{k}={m {\langle v^2 \rangle} \over 2 }%
= \frac{3k_{B}T}{2}
\end{equation}

\end{document}
share|improve this answer
1  
if amsmath is used, the command \eqref{...} places the reference in parentheses, and is always upright even in an italic environment (such as theorem). –  barbara beeton Jan 3 '13 at 15:23
1  
@barbarabeeton, Good point, I updated the example with \eqref and some others referencing methods. –  Fran Jan 3 '13 at 18:56
    
I know some wouldn't worry about this but I wouldnt start a sentence with (2) followed by a lowercase letter. I'd always rephrase the sentence. Equation 2, In (2), etc. –  Marc van Dongen Jan 3 '13 at 20:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.