1

I have two equations of \begin{eqnarray} .... \end{eqnarray} in latex using editor WinEdt. How can I reduce the space between them?

\begin{eqnarray}

l(P_5) = abc

\end{eqnarray}

\begin{eqnarray}

l(P_6) = xyz

\end{eqnarray}

This gives a gap between two equations. Is it possible to reduce the gap to make the article better? Kindly help.

monalisa
  • 685
  • 1
  • 7
  • 23
  • 4
    Never use eqnarray to begin with. – egreg May 08 '19 at 09:35
  • @egreg I need equation numbers for further referencing in the article. That's why I used this. Kindly suggest some other alternatives. Thanks :) – monalisa May 08 '19 at 09:38
  • 6
    Use the amsmath (everyone else does) and its align, gather, etc envs. For one lines always use equation. Note that eqnarray is only available for backwards compatability, new users should never use it, it has many flaws. – daleif May 08 '19 at 09:39
  • I suggest that you also take a look at this to broaden your horizon: https://tex.stackexchange.com/a/197/167081 – M. Al Jumaily May 08 '19 at 09:43
  • The spacing also totally changes when you add you equations in separate paragraphs (separate them using blank lines). – John Kormylo May 08 '19 at 12:40
  • @JohnKormylo -- I assume you mean to separate the paragraphs by blank lines, not the equations. An equation (or group of equations) should never be preceded by a blank line, because it causes the defined pre-display spacing to be ignored (among other adverse effects); a blank line following a display indicates the start of a new paragraph, which is okay. – barbara beeton May 08 '19 at 16:45

1 Answers1

3

Since it looks like you are not using the alignment facilities of the eqnarray environment, and since there are much better alternatives to eqnarray, I would like to suggest that you load the amsmath package and employ its gather environment:

\begin{gather}
l(P_5) = abc \label{eq:P5} \\
l(P_6) = xyz \label{eq:P6}
\end{gather}

Note that one can even save on the pure typing effort by writing gather (6 letters, twice) instead of eqnarray (8 letters, four times). Observe that it's very easy to cross-reference either of the equations.

Mico
  • 506,678