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

Why does the space after the equals sign becomes less if I use the lower code, i.e., if I put ampersand after equals sign?


share|improve this question
This is a well known alignment problem. See tex.stackexchange.com/questions/159723/… . The first answer should be sufficient. – pushpen.paul Jun 9 '14 at 22:03
@pushpen.paul My answer to that question does not cover exactly this issue. – Torbjørn T. Jun 9 '14 at 22:13

If a binary relation such as = is used in an infix position it gets extra space [$a=b$] but of used as a prefix or suffix operator it reverts to mathord spacing compare [$=a$] and [$a=$].

The align environment is intended to be used as &= and adds a {} to the start of the second cell so that &B is typeset as {}=B to ensure that you get the \mathrel spacing.

If you need =& for a special alignment and want to keep the space use ={}&

share|improve this answer
Thank you for such detailed explanation! – Zhiyuan Ding Jun 10 '14 at 0:23

While the question was about the AMS math environments, it's as good a place as any to offer the compare/contrast to the tabbing features of the tabstackengine package. While the package stacks tabbed content, by default, in text mode, an invocation of \stackMath will process arguments in math, and then a comparable alignment situation arises as David pointed out for the AMS environments.

The package provides three math padding modes, \TABbinaryRight which acts as if a {} is added to the end of each cell (this is the package default, which is the opposite of the AMS environment); \TABbinaryLeft which acts as if a {} is added to the beginning of each cell; and \TABbinary which acts as if a {} is added to the beginning and end of each cell.

The choice will affect the spacing around operators and relations, as shown in the MWE. So, as a general rule, with \TABbinaryRight as the default, one would use =& as the tabstackengine syntax to produce the "typically" desired result.

\TABbinaryRight\tabbedShortstack{A&=B=&C=&-D} (TABbinaryRight -- default)

\TABbinaryLeft\tabbedShortstack{A&=B=&C=&-D} (TABbinaryLeft)

\TABbinary\tabbedShortstack{A&=B=&C=&-D} (TABbinary)

enter image description here

share|improve this answer

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.