3

I'm trying to use \pause in align mode but it's not working. I ended up using onslide which it works fine. However, when I use both of them in one frame, some of onslide work while the other are not. This is a minimal example to regenerate the problem.

\documentclass[t]{beamer}

\usepackage{amsmath}

\begin{document}

\begin{frame}
AAAAA CCCCCC \\
\pause 
AAAAA CCCCCC
\begin{align*}
    \onslide<1->{a &= b \\}
    \onslide<2->{b &= c \\}
    \onslide<3>{ a &= c}
\end{align*}
\end{frame}

\end{document}

As you can see, the first two lines show up together. While the third line appears in the next slide. When I comment out \pause, the problem goes away. How to overcome this issue?

4

The "problem" is, that the first pause already creates an overlay, so you have to start counting at 2 in the align and not at 1. But to make this more flexible, simply don't use hard coded numbers but relative overlays.

\documentclass[t]{beamer}

\usepackage{amsmath}

\begin{document}

\begin{frame}
AAAAA CCCCCC \\
\pause 
AAAAA CCCCCC
\begin{align*}
    \onslide<+->{a &= b \\}
    \onslide<+->{b &= c \\}
    \onslide<+>{ a &= c}
\end{align*}
\end{frame}

\end{document}
  • With the above approach, onslide has no impact on number of equations if the mode is align. Any suggestions? – CroCo Oct 16 '16 at 10:34
  • Yes, my suggestion would be not using align. Otherwise tex.stackexchange.com/a/323432/36296 might be of interest, the long explanation can be found at "23.4 Uncovering Tagged Formulas Piecewise" in the beamer user guide. – user36296 Oct 16 '16 at 10:53
  • "23.4 Uncovering Tagged Formulas Piecewise" solved my problem. Thank you. – CroCo Oct 16 '16 at 11:17
4

The \pause command does exactly what it says: stops the frame where it is. As such, if you then specify slide 1 later on in the frame, that material will appear with slide 2, as you've observed. I strongly advise not mixing \pause with any more complex overlay control: \pause is simple but limited, other overlay specs are more complicated but as a result more powerful. Sam Carter's answer shows that if you want the align to appear after the text, it's easy with a mix of approaches. If you want the two to appear at the same time, I'd go with something like

\documentclass[t]{beamer}

\usepackage{amsmath}

\begin{document}

\begin{frame}
\onslide<+->{AAAAA CCCCCC} \\
\onslide<+->{AAAAA CCCCCC}
\begin{align*}
    \onslide<.(-1)->{a &= b \\}
    \onslide<.->{b &= c \\}
    \onslide<+->{ a &= c}
\end{align*}
\end{frame}

\end{document}

(See Relative overlay specification in beamer? for more on relative overlay specifications.)

  • Why with align, number of equations show up before the equations? – CroCo Oct 16 '16 at 10:37
  • 1
    @CroCo The align environment is set twice, and this makes life very tricky: this is mentioned in the beamer manual – Joseph Wright Oct 16 '16 at 10:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.