# LyX: Equation number overlaps equation

Using LyX 2.0.1, using the book (KOMA-script) class with the "Number Equations by Section" module, I have a long equation (in an equation array) that is overlapped by the equation number:

Is there a way in LyX to specify the equation number be moved down to not overlap? If not, what are some commands that I can play with to fix this using the pre-amble. I would like to avoid using in-line latex code (i.e. ERT in LyX).

The equation in question is:

\begin{eqnarray}
\tau_{0}^{-} & = & \frac{m_{x}+m_{y}-\sqrt{1-r_{H}}\left|m_{x}-m_{y}\right|}{2e^{2}n_{s}\rho_{\text{xx}}}\\
\tau_{vv}^{-} & = & \frac{24\tau_{0}^{-}\sqrt{1-r_{H}}m_{x}m_{y}\left(m_{x}+m_{y}\right)\left|m_{x}-m_{y}\right|}{\left(10m_{x}m_{y}+3m_{x}^{2}+3m_{y}^{2}\right)\left(m_{x}^{2}-2m_{x}m_{y}+m_{y}^{2}-\left|m_{x}-m_{y}\right|\sqrt{1-r_{H}}\left(m_{x}+m_{y}\right)\right)}.
\end{eqnarray}

-
Remove the second ampersand in both and change eqnarray to align environment. There are enough reasons to avoid eqnarray completely – percusse Mar 19 '12 at 19:28
@percusse thanks for the reminder about eqnarray vs. align – tkott Mar 19 '12 at 19:56

Instead of using eqnarray you should use align or some other environment provided by amsmath (the reasons can be found in Avoid eqnarray!); to reduce the length of your formula and increase readability, I would suggest you to use some abbreviation in the equation and then give its meaning; for example, since m_{x} + m_{y} appears several times, you could abbreviate it using \sigma_{xy} (or some other name), and similarly for \lvert m_{x} - m_{y}\rvert (for which I used \delta_{xy}); your equation now becomes:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{align}
\tau_{0}^{-} & = \frac{\sigma_{xy} - \delta_{xy}\sqrt{1 - r_{H}}}{2e^{2}n_{s}\rho_{\text{xx}}} \\
\tau_{vv}^{-} & = \frac{24\tau_{0}^{-}m_{x}m_{y}\sigma_{xy}\delta_{xy}\sqrt{1 - r_{H}}}{\left(10m_{x}m_{y} + 3m_{x}^{2} + 3m_{y}^{2}\right)(\delta_{xy}^{2} - \sigma_{xy}\delta_{xy}\sqrt{1 - r_{H}})},
\end{align}
where $\sigma_{xy} = m_{x} + m_{y}$ and $\delta_{xy} = \lvert m_{x} - m_{y}\rvert$.

\end{document}


-
Thanks for the feedback. I've switched the environment to align as suggested, and the problem is fixed. I think I might have known the difference a couple of years ago, but I had forgotten. For future reference to LyX users, simply go to "Edit" > "Math" > "Change Formula Type" > "AMS Align" – tkott Mar 19 '12 at 19:55