I am using eqnarray to write long equations. However when I use it instead of equation environment the equations are not numbered. Can anyone help me to solve this.
This is the syntax that I am using.
\begin{eqnarray*}
f_{lin}(z) & = & f(z_{0}) +
\frac{\partial f(z)}{\partial \ddot{\theta}}\bigg|_{z = z_{0}}\ddot{\theta} +
\frac{\partial f(z)}{\partial \ddot{\alpha}}\bigg |_{z = z_{0}}\ddot{\alpha} +
\frac{\partial f(z)}{\partial \dot{\theta}}\bigg |_{z = z_{0}}\dot{\theta} \\
& & + \frac{\partial f(z)}{\partial \dot{\alpha}}\bigg |_{z = z_{0}}\dot{\alpha} +
\frac{\partial f(z)}{\partial \theta}\bigg |_{z = z_{0}}\theta +
\frac{\partial f(z)}{\partial \alpha}\bigg |_{z = z_{0}}\alpha
\end{eqnarray*}
Best Answer
In addition to recommending that you use the
align
environment (provided by theamsmath
package) instead of theeqnarray*
environment, I would also suggest you make each line's first+
symbol the alignment point, rather than the=
symbol; that way, the structure of the equation should become very readily apparent. And, since the string\bigg|_{z = z_{0}}
occurs no fewer than six times, it's handy to create a shortcut macro for it.If you don't want to use the
align
environment, you could use asplit
environment inside anequation
environment; the main difference is that there's a single equation number that's centered vertically across the rows of theequation
: