LaTex: eqnarray numbering eqs as 1a, 1b, 1c

  • LaTeX
  • Thread starter Saladsamurai
  • Start date
  • Tags
    Latex
In summary, the conversation discusses the use of the align environment and subequations in LaTeX to improve the spacing and numbering of equations. It provides an example of using these commands to number equations as subequations, instead of separate numbers.
  • #1
Saladsamurai
3,020
7
Hi folks, I am making some great progress in LaTeX, however this is something I am having trouble finding. I think that I am just unsure of what keywords to search. I have the following equation array:

Code:
\begin{eqnarray}
 y(x) &=& \sum_0^{\infty}a_nx^{n+r}     \label{eqn: frobenius 6}\\
 \Rightarrow y'(x) &=& \sum_0^{\infty}(n+r)a_nx^{n+r - 1}	\label{eqn: frobenius 7}  \\
 \Rightarrow y''(x) &=& \sum_0^{\infty}(n+r-1)(n+r)a_nx^{n+r - 2}	\label{eqn: frobenius 8} 
 \label{eqn: frobenius 8}
\end{eqnarray}

which produces the following
Screenshot2010-10-23at14315PM.png


Instead of numbering each equation as a new number, I would like it to say (4.13a), (4.13b),(4.13c).

I know this is possible; I am just unsure of the syntax.

Any thoughts? Thanks!
 
Physics news on Phys.org
  • #2
What you want is subequations. You should also use the align environment instead of eqnarray, as it has better spacing -- see the links in this http://tex.stackexchange.com/questions/196/eqnarray-vs-align" .

Code:
\begin{subequations}
\begin{align}
 y(x) &= \sum_0^{\infty}a_nx^{n+r}     \label{eqn: frobenius 6}\\
 \implies y'(x) &= \sum_0^{\infty}(n+r)a_nx^{n+r - 1}	\label{eqn: frobenius 7}  \\
 \implies y''(x) &= \sum_0^{\infty}(n+r-1)(n+r)a_nx^{n+r - 2}	\label{eqn: frobenius 8} 
\end{align}
\end{subequations}

produces the attached image (it didn't render on physics forums properly, so I used http://docs.latexlab.org/ ).
 

Attachments

  • 072f982c1744825462e1b99193d57e1e-1.png
    072f982c1744825462e1b99193d57e1e-1.png
    2 KB · Views: 1,986
Last edited by a moderator:

FAQ: LaTex: eqnarray numbering eqs as 1a, 1b, 1c

How can I number equations in the eqnarray environment as 1a, 1b, 1c?

The eqnarray environment in LaTeX allows you to align multiple equations with a single number for reference. To number equations as 1a, 1b, 1c, you can use the command \renewcommand{\theequation}{\alph{equation}} before the eqnarray environment.

Can I change the numbering style in the middle of an eqnarray?

Yes, you can change the numbering style in the middle of an eqnarray by using the \renewcommand command again. For example, if you want to switch from 1a, 1b, 1c to 1, 2, 3, you can use \renewcommand{\theequation}{\arabic{equation}} before the equation you want to start numbering differently.

How do I restart the equation numbering in a new section?

You can restart the equation numbering in a new section by using the \setcounter{equation}{0} command. This will reset the equation counter to 0, and the next equation in that section will be numbered as 1.

Can I customize the equation numbering format in eqnarray?

Yes, you can customize the equation numbering format in eqnarray by using the \renewcommand command. You can change the numbering style, add prefix or suffix, and even use letters or symbols instead of numbers.

How can I label equations in the eqnarray environment?

To label equations in the eqnarray environment, you can use the \label{label_name} command after the equation you want to label. Then, you can refer to the labeled equation using the \ref{label_name} command anywhere in your document.

Similar threads

Replies
5
Views
3K
Replies
1
Views
4K
Replies
0
Views
2K
Replies
3
Views
935
Replies
1
Views
1K
Replies
4
Views
4K
Replies
4
Views
3K
Replies
15
Views
25K
Replies
9
Views
2K
Back
Top