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 need to create a label for an equation group in TeXstudio such as :

\begin{align} \label(myequations)
     eq1    \label(myequ1)
     eq2    \label(myequ2)
     eq3    \label(myequ3)
\end{align}

But, I got error:

 Package amsmath Error: Multiple \label's: label 'myequations' will be lost. \end{align}

What I expect is that sometimes, I need to refer to the whole equation array as a group. Sometimes, I need to refer to one of the equations.

e.g.

     x + y = 8     (1.1)
     5x + 2y = 10  (1.2) 

Sometimes, I need to refer to the whole equation group as (1) , sometimes, I need to refer to Equation (1.1). Any help would be appreciated.

share|improve this question
1  
Perhaps the error is in the first label of your example `\label{myequations} is not labeling anything. Remove that and you should compile it without troubles. –  Aradnix Aug 9 at 17:09
    
@Aradnix, I can remove it, and it works well , but, i need to add a label for the whole equation array. thanks –  user3601704 Aug 9 at 17:11
    
Can you explain what this label is supposed to do? In what case would you refer to it and what output would you expect for such a reference? –  greyshade Aug 9 at 17:15
    
Well you can label each equation or group them and use only a label, but try to juxtapose both criteria is redundant. Keep it simple and clear. –  Aradnix Aug 9 at 17:15
    
@Aradnix, Sometimes, I need to refer to the whole eq. array as a group. Sometimes, I need to refer to one of the equations. –  user3601704 Aug 9 at 17:19

1 Answer 1

up vote 5 down vote accepted

If you need to refer to the equations as a group, you probably want to use the subequations environment:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

Some text with a reference to the following group~\eqref{eq:group}; now the equations
\begin{subequations}\label{eq:group}
\begin{align}
A &= B \label{eq:A}\\
C &= D \label{eq:B}
\end{align}
\end{subequations}
and a referencea to the first equation~\eqref{eq:A}. 
Also the second~\eqref{eq:B}.

\end{document}

enter image description here

share|improve this answer

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.