TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to align 2 simple equations using the align* environment:

\phi(\gedge{\tilde{v}_{i_1}}{\tilde{u}_i}) & = \phi(\gedge{\tilde{v}_{i_2}}{\tilde{u}_i}) & = \gedge{v}{u} \\
\phi(\gedge{\tilde{u}_i}{\tilde{v}_{i_1}}) & = \phi(\gedge{\tilde{u}_i}{\tilde{v}_{i_2}}) & = \gedge{u}{v} & \qquad\mathrm{(z\,wl.\,2)}\\

unfortunately the result I am getting is horrible:

enter image description here

Why is there so much horizontal space before the second = sign?!?

Do not worry about \gedge, it is just an arrow:

% graph edge
#1 \to #2%
share|improve this question
With align, you need only one &. If you want to use multiple alignment spots, you can use the alignat environment. – dustin Jul 9 '13 at 21:46
related, if not exactly the same: Why does aligning equations not work here? – barbara beeton Jul 9 '13 at 21:49
up vote 6 down vote accepted

So you have two options,

  1. Using align

    \phi(\gedge{\tilde{v}_{i_1}}{\tilde{u}_i}) & = \phi(\gedge{\tilde{v}_{i_2}}{\tilde{u}_i}) = \gedge{v}{u} \\
    \phi(\gedge{\tilde{u}_i}{\tilde{v}_{i_1}}) & = \phi(\gedge{\tilde{u}_i}{\tilde{v}_{i_2}}) = \gedge{u}{v}  \qquad\mathrm{(z\,wl.\,2)}\\
  2. Using alignat

    \phi(\gedge{\tilde{v}_{i_1}}{\tilde{u}_i}) & = \phi(\gedge{\tilde{v}_{i_2}}{\tilde{u}_i}) && = \gedge{v}{u} \\
    \phi(\gedge{\tilde{u}_i}{\tilde{v}_{i_1}}) & = \phi(\gedge{\tilde{u}_i}{\tilde{v}_{i_2}}) && = \gedge{u}{v} & \qquad\mathrm{(z\,wl.\,2)}\\


share|improve this answer
The alignat solution should really use a double && to get the correct spacing. See for instance: Why does aligning equations not work here? – Peter Grill Jul 9 '13 at 22:05
@PeterGrill or couldnt {} be placed too? – dustin Jul 9 '13 at 22:13
For this specific case a {} would suffice, but not a general solution as it would still be r aligned, and an l aligned is probably what is desired in this case. See question I linked to. – Peter Grill Jul 9 '13 at 22:54
@PeterGrill Heiko Oberdiek added in && already. – dustin Jul 9 '13 at 23:10

Your Answer


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.