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 two equations in an align block:

\begin{align}
4x-3y&=2\\ 
3x+2y&=1 
\end{align}

Both of these equations are numbered (1) and (2) respectively. In a sentence beneath this align block I want to reference these two equations by referring to their labelled numbers. Is there a way to do this without simply typing (1) and (2) i.e having the numbers automatically generated and inserted?

I tried this:

\begin{align}
4x-3y&=2\\ \label{eq:simul1}
3x+2y&=1 \label{eq:simul2}
\end{align}

but this did not compile. Or is it not worth doing and better to just simply enter the equation numbers manually? Obviously the downside to this is if my numbering changes I would have to change all occurrences of this.

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

In the align use \label{simul1}"

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
4x-3y&=2 \label{simul1}\\
3x+2y&=1 \label{simul2}
\end{align}
See \eqref{simul2} for...
\end{document}
share|improve this answer
    
Why shouldn't \label{eq:simul1} be good? –  egreg Oct 10 '11 at 16:42
    
@egreg: Both work. Since I label equations often, I tend to leave them out. But now you have me thinking: Should one be preferred over the other? Perhaps I should just delete this answer and you can add that option to yours. –  Peter Grill Oct 10 '11 at 16:54
1  
The argument of \label is any sequence of ASCII characters. Using prefixes uniformly helps to remember what reference we're using. –  egreg Oct 10 '11 at 17:06
add comment

The \label command must be given before ending the equation:

\begin{align}
4x-3y&=2 \label{eq:simul1} \\
3x+2y&=1 \label{eq:simul2}
\end{align}
share|improve this answer
4  
For appropriate referencing use \eqref{eq:simul1} rather than just \ref{eq:simul1}, otherwise the brackets of the equation numbers will have to be inserted manually. As in, (\ref{eq:simul1}). –  Werner Oct 10 '11 at 16:31
    
@Werner: it might be worth mentioning to the OP that the \eqref command requires loading the amsmath package. –  Mico Oct 12 '11 at 2:19
add comment

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.