# Adjust vspace between multiple align environments

I am using some independant align environments directly one after the other one and it produces some nasty space between them. Is there any workaround to shrink the size of the space a little bit?

Example:

My code looks like this:

\newcounter{eqn}[section]
\newcommand{\eqn}{\refstepcounter{eqn}\tag{\thesection.\arabic{eqn}}}
\newcommand{\xeqn}[1]{\begin{align}\eqn #1\end{align}}
...
\xeqn{foo}
\xeqn{bar}
\xeqn{random}

-
Please post you code so we can comment on it. You are probably leaving a blank line in between the align environments. –  Peter Grill Sep 13 '11 at 16:14

Use the gather environment:

\begin{gather}
\text{$x>y$ genau dann, wenn $x-y\in P$,}\\
\text{$x\ge y$ genau dann, wenn $x>y$ oder $x=y$,}\\
\text{$x<y$ genau dann, wenn $y-x\in P$,}\\
\text{$x\ge y$ genau dann, wenn $x<y$ oder $x=y$,}
\end{gather}


Never use two consecutive math environments.

-
Works, but i have "problems" with the tags/numering as i use a very weird method... can you explain me how to adjust the gather code for my needs and my posted code? - EDIT Inserted \eqn before every line and it works! Thanks! –  Christian Ivicevic Sep 13 '11 at 16:23
Don't use \eqn, but rather follow barbara's suggestions. –  egreg Sep 13 '11 at 17:56

@egreg's recommendations to use the gather environment, and never to use two consecutive math environments, are seconded.

if all (numbered) equations are to be numbered the same way as these, there's a much simpler method: put the command

\numberwithin{equation}{section}


in your preamble and forget about \tag and the definitions for \eqn and \xeqn which would no longer be needed. read the manual for amsmath on this topic -- texdoc amsmath if you have a tex live installation, or follow this link.

-