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.

I have a problem with the vertical space between align (1) and alignat (2). How can I reduce this space to the same vertical space as before (1)? How can I completely erase the vertical space? I know I can do this globally with abovedisplayskip and belowdisplayskip, but it doesn't work simply within these environments and I don't want to change anything globally.

Here is the MWE:

\documentclass[a4paper, 12pt, headsepline]{scrreprt}
\usepackage[onehalfspacing]{setspace}
\usepackage{amsmath, amssymb, mathtools}
\usepackage{mathptmx}
\usepackage[a4paper]{geometry}
\geometry{left=2cm,right=5cm,top=2cm,bottom=2cm}


\begin{document}
Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text
\begin{align}
X_{t+1} &=  \frac{Z_{t+1}+X_{t+1}}{Y_M}  \\
N_{t}  &=  \frac{X_{t+1}+X_{t+1}}{T_{t+1}} \notag 
\end{align} 
% Reduce the vertical space here. Ideally to the same distance as from align to the above text, or whatever there is (eg other environments?)
\begin{alignat}{3}
&\text{as:} \quad & \gamma_{xyz} = \frac{a} {b} \qquad & \text{and}  & \qquad      \gamma_{zhk} = \frac{b}{a} \notag
\end{alignat}
Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text
\end{document}

As you can see, there is an undesired, too big vertical space between align and alignat.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

I wouldn't mess with it. It looks just fine if you put as: between the two environments:

\documentclass{scrreprt}

\usepackage{amsmath}

\begin{document}

\noindent Text before.
\begin{align}
  X_{t+1} &= \frac{Z_{t+1} + X_{t+1}}{Y_{M}}\\
  N_{t}   &= \frac{X_{t+1} + X_{t+1}}{T_{t+1}}\notag
\end{align}
as
\begin{equation*}
  \gamma_{xyz} = \frac{a}{b}
  \qquad \text{and} \qquad
  \gamma_{zhk} = \frac{b}{a}
\end{equation*}
Text after.

\end{document}

output

share|improve this answer
    
Ok I assume the space is not easy to change then? –  TomM Dec 25 '13 at 18:46
1  
@TomM If you absolutely want to, you can just use \vspace{<negative length>} between the environments. –  Svend Tveskæg Dec 25 '13 at 18:54

when two separate display environments are set one after another, not separated by text, the spacing between them is the sum of \belowdisplayskip and the following \abovedisplayskip. since both have quite a large amount of stretch, this usually results in a much larger vertical space between them than desired.

it's better to combine them into a single gather environment, using subsidiary display environments such as aligned and alignedat to structure the separate parts. for example,

\begin{gather}
 \begin{aligned}
  X_{t+1} &=  \frac{Z_{t+1}+X_{t+1}}{Y_M}  \\
  N_{t}  &=  \frac{X_{t+1}+X_{t+1}}{T_{t+1}}
 \end{aligned} \\[6pt]
 \begin{alignedat}{3}
  &\text{as:} \quad & \gamma_{xyz} = \frac{a} {b} \qquad & \text{and}
  & \qquad      \gamma_{zhk} = \frac{b}{a} \notag
 \end{alignedat}
\end{gather}

a little extra vertical space between the two parts (here [6pt]) can be added.

in this case, it's not even necessary to use alignedat -- just straightforward math coding would suffice:

\text{as:\quad} \gamma_{xyz} = \frac{a}{b} \text{\qquad and\qquad}
                \gamma_{zhk} = \frac{b}{a}

even better would be to use \intertext for the initial text introducing that line:

\intertext{as:}
\gamma_{xyz} = \frac{a}{b} \text{\qquad and\qquad} \gamma_{zhk} = \frac{b}{a}

all within the enclosing gather. if \intertext is used, don't add the optional space between the parts; \intertext will take care of that.

share|improve this answer
    
This is a nice solution but if I have multiple labels within aligned, an error pops up: Multiple \label's: label x will be lost. I assume that is because of gather? –  TomM Dec 25 '13 at 21:17
    
@TomM -- yes, aligned will provide only one label for the group. \intertext (if appropriate) is the best approach in that case. –  barbara beeton Dec 25 '13 at 22:03

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.