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

How can I get the align environment to play nicely with beamer overlays? As a simple example I would like

    a = \frac{bc}{c}  

on the first overlay and then

    a = b  

on the second, but I want the equal signs to line up for both. Using beamer's \overprint environment, for example, the equal sign shifts between the two lines I guess because they are of different length.

share|improve this question
Welcome to tex.sx! A tip: If you indent lines by 4 spaces, then they are marked as a code sample. You can also highlight the code and click the "code" button (with "101010" on it) – Joseph Wright Apr 19 '11 at 13:06
up vote 5 down vote accepted

\pause is the only overlay command that really gives me trouble. I am usually able to workaround with the overlay-aware \only, \uncover, \alt, etc. Just make sure you don't put the alignment character & inside one of their arguments.

In this case we use a standard trick for alignment: make the smaller thing overlap and the larger thing invisible.



    a &= \mathrlap{\alt<2->{b}{\frac{bc}{c}}}\phantom{\frac{bc}{c}}

share|improve this answer
looks pretty good--there's still some vertical jitter in your code, is there a way to take care of that too? – evencoil Apr 19 '11 at 13:33
Uh yeah, I'm an idiot...just add \vphantom{\frac{bc}{c}} and its good to go. Great solution, thanks again! – evencoil Apr 19 '11 at 13:37
@evencoil: or do both with \phantom. – Matthew Leingang Apr 19 '11 at 14:06

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.