[Tex/LaTex] align environment has too much white space

alignmath-mode

How can I let the following code look good ?

\begin{align*}
&\text{Als} &&a,b \in H\\ 
&\Rightarrow   &&a,b\in H_1 \land a,b \in H_2 &&\text{Definitie van doorsnede}\\
&\Rightarrow  &&ab^{-1}\in H_1 \land ab^{-1}\in H_2 &&\text{Group axioma's}\\
&\Rightarrow  &&ab^{-1}\in H  &&\text{Definitie van intersectie}\\
&\Rightarrow  &&H\leq G &&\text{Ondergroep test}
\end{align*} 

No there is just way too much whitespace. Is there a way to control the amount of whitespace ?

Hm.. in codecogs it does look good. So this is how I would want it to look:

Image

Best Answer

the desired result can be produced by alignat* -- but then you have to manage the spacing yourself:

\begin{alignat*}{4}
&\text{Als}\quad  &&a,b \in H\\ 
&\Rightarrow {} &&a,b \in H_1 \land a,b \in H_2 &&\text{Definitie van doorsnede}\\
&\Rightarrow {} &&ab^{-1} \in H_1 \land ab^{-1}\in H_2 \quad &&\text{Group axioma's}\\
&\Rightarrow {} &&ab^{-1} \in H  &&\text{Definitie van intersectie}\\
&\Rightarrow {} &&H \leq G &&\text{Ondergroep test}
\end{alignat*} 

edit: a look at the amsmath documentation would be salutary -- texdoc amsldoc on a tex live system.

the (required) argument after \begin{alignat} was introduced to make it possible to determine (for ease of macro programming, it appears) the width of a particular single column so that it can be treated in a special manner if necessary. the value is equal to the number of &s in the line with the most, minus one. an alternate method of calculating the value is given in the user's guide cited above.