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.

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:

enter image description here

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}
share|improve this question
2  
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

1 Answer 1

up vote 5 down vote accepted

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}

enter image description here

share|improve this answer
3  
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

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.