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 was wondering if it is possible to take control of the exact position of the tab in an align environment.

Like so:

A &= x^3 + 14789\\
B &= f^6

Which should then place both '=' signs at exactly 2cm from the left margin. No matter how long the expressions before and after '=' are.

Does anyone know how to do something like that?

share|improve this question
What happens if the expression before '=' is 5cm long? then your requirement is impossible to be met I am not sure if I understand your requirement correctly. I think you probably looking for \hspace*{2cm}\begin{alignment}` – Yiannis Lazarides Feb 20 '12 at 15:27
I would only use it in places where it does not cause trouble. – Matthias Feb 20 '12 at 15:28
Try \hspace*{2cm}\begin{alignment}. If it works let me know and I will post an explanation. There are also other ways. – Yiannis Lazarides Feb 20 '12 at 15:29
up vote 3 down vote accepted

In the following minimal example, the LHS ends at exactly 2cm from the left margin. The use of the flalign environment (from amsmath) with an additional alignment operator & pushes everything flush to the left margin, while a box of width 2cm leaves the LHS at the correct position.

enter image description here

\usepackage{showframe}% http://ctan.org/pkg/showframe
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\makebox[2cm][r]{$\displaystyle A$} &= x^3 + 14789 & \\
B &= f^6

Only A is set in a 2cm block, since B is "short enough". Otherwise, you can set whatever in a 2cm box, regardless of the size.

showframe was used to identify the text block border.

share|improve this answer
I've added a \displaystyle that can be relevant if the left hand side has exponents and in other cases. – egreg Feb 20 '12 at 15:36

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.