4

I would like to uncover a set of equations line by line with and the covered equations should be transparent. The problem occurs when I want to align those equations: somehow the transparency stops at the &-sign.

I attached a minimum working example of the problem, where you can see that only the arrow is transparent instead of the whole line.

I've read the beamer User's Guide but I couldn't find any detailed information about the \uncover-command and known complications, but maybe somebody here is able to help me.

I appreciate any help.

\documentclass[xcolor=dvipsnames]{beamer}
\mode<presentation>
\usetheme{Boadilla}
\setbeamercovered{transparent}

\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{lmodern,amsfonts,amsmath,amssymb,amsthm}

\title{Dummy-Titel}
\subtitle{Dummy-Untertitel}
\author{Autor}

\date{\today}

\begin{document}

\begin{frame}
    \begin{align*}
        \uncover<1->{& a = b \wedge b = c \\}
        \uncover<2->{\Rightarrow & a = c \\}
    \end{align*}
\end{frame}

\end{document}
Werner
  • 603,163
Dave
  • 43

2 Answers2

2

Read chapter 23.4 of the beamer guide ("23.4 Uncovering Tagged Formulas Piecewise").

Notice: this is not an RTFM answer, this is easy to miss.

Edit: as egreg noticed, the above "answer" does not actually answer the question...

Now this is ugly, but works:

\documentclass{beamer}
\setbeamercovered{transparent}

\usepackage{mathtools}

\begin{document}

\begin{frame}
  \begin{gather*}
      \uncover<1->{a = b \wedge b = c \\}
      \uncover<2->{\mathrlap{\Rightarrow a = c}\hphantom{a = b \wedge b = c}\\}
  \end{gather*}
\end{frame}

\end{document}

(It does at the expense of manually specifying the longest line, and doing it twice. A hackery, non-LaTeX-style, ugly "solution", but hey, the pdf looks good.)

Also, one could imagine semi-automating it to something like this:

\documentclass{beamer}
\setbeamercovered{transparent}

\usepackage{mathtools}

\newlength{\longestalignlinelength}
\newsavebox{\longestlinebox}
\newcommand{\longest}[1]{\sbox{\longestlinebox}{$\displaystyle #1$}\longestalignlinelength=\wd\longestlinebox}
\newcommand{\putline}[1]{\mathrlap{#1}\hspace{\longestalignlinelength}}

\begin{document}

\begin{frame}
  \longest{a = b \wedge b = c}
  \begin{gather*}
    \uncover<1->{\putline{a = b \wedge b = c}\\}
    \uncover<2->{\putline{\Rightarrow a = c}\\}
  \end{gather*}
\end{frame}

\end{document}

Still not very elegant, but a bit better.

mbork
  • 13,385
  • 1
    The manual says precisely to do what Dave is doing; but it doesn't work with transparent, while it does with invisible. – egreg Nov 23 '11 at 23:38
  • Ooops, sorry, then. – mbork Nov 23 '11 at 23:49
  • I've put something closer to an answer now. – mbork Nov 24 '11 at 00:07
  • Thanks for the manual and automatic solutions. Works great. – Dave Nov 24 '11 at 18:56
  • You're welcome:). Notice that this will only work if all the "equations" are to be aligned left; if you want to align them at the equals sign or something like that, you'd have to modify this solution accordingly. – mbork Nov 24 '11 at 21:39
0

A simpler way to workaround this than the other answer is just to make two separate \uncovers and put the align tab between them:

\begin{frame}
    \begin{align*}
        &\uncover<1->{a = b \wedge b = c \\}
        \uncover<2->{\Rightarrow }&\uncover<2->{ a = c \\}
    \end{align*}
\end{frame}