13

Assuming the amsmath package is installed. I found a difference between the way that an equation object and a gather object is embedded within the text.

If an equation is beneath a line of text that does not extend as far to the right as the equation. Then the equation is placed higher up for asphetic reasons like so:


Hello there this is some text, blah, blah,  
blah, blah  
              a+b=c  

Some more text, hello  

Or if the text goes beyond the equation, like so:


Hello there this is some text, blah, blah,
blah, blah, blah, blah

              a+b=c

Some more text, hello  

If gather is used, then the gather object is placed a certain distance beneath the last line of text, regardless of it's extent across the page.

I would like gather to align equations in the same way as equation objects but this isn't as simple as using a permanent vspace{} command to push text up as it's need will be depend on the final layout of the text.

Can any one help? maybe this is even a bug to be resolved. by the ams group.

Thanks

I have prepared an example latex document here: http://pastebin.com/EUKyNi2A

1
  • I seem to recall reading that this is a bug.
    – TH.
    Commented Sep 23, 2010 at 20:49

2 Answers 2

4

How about doing

\begin{equation}
     \begin{gathered}
          1+1=2
     \end{gathered}
\end{equation}

It is more typing, but it will do what you want.

3
  • Thanks for your solution Jan, it does work... I'm still holding out for a better one as the extra typing is a bit enoying and also I make some use of the \displaybreak[] command in my work, which will not function in an alligned object. I'm guessing there are some other reasons why one might choose a gather object over a gathered within an equation which I have not reallised yet.
    – aghsmith
    Commented Sep 23, 2010 at 16:41
  • One reason is that amsmath + hyperref + equation environment can sometimes produce very bad spacing. Personally, I use fleqn option and use only amsmath environments, not equation.
    – Lev Bishop
    Commented Sep 29, 2010 at 20:55
  • I just ran into this question. It seems that the combination equation/split does still produce too much vertical spacing, while gathered and aligned work OK. Commented Sep 4, 2011 at 19:26
4

The nccmath package helps to correct amsmath's spacing. Load it and write \useshortskip if required. This command forces using the short skip in the next displayed formula. Such corrections should be done when preparing the final version.

\usepackage{nccmath}
...
% short text
\useshortskip
\begin{gather}
...
\end{gather}

For those, who would like to test, here's a minimal example fixing the code of the questioner:

\documentclass{article}
\usepackage{nccmath}
\begin{document}
\useshortskip
Some words from my memory... I've seen things you people wouldn't believe.
Attack ships on fire\ldots
\useshortskip
\begin{gather}
a+b=c
\end{gather}
I watched `C' beams glisten in the dark, near the Tanhauser gate.

\bigskip

Some words from my memory... I've seen things you people wouldn't believe.
Attack ships on fire of\ldots
\begin{equation}
a+b=c
\end{equation}
I watched `C' beams glisten in the dark, near the Tanhauser gate.
\end{document}

alt text

Remove \useshortskip and replace nccmath by amsmath to see the original problem:

alt text

1
  • Thanks for this solution Stefan. I'm still hoping for the elusive "make the dammed thing just work" type solution.
    – aghsmith
    Commented Sep 6, 2011 at 21:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .