Transparency does not work correctly with alignment?
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.
Related videos on Youtube
Dave
Updated on August 01, 2022Comments
-
Dave over 1 year
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 almost 12 yearsWelcome to TeX.sx! It's not necessary to sign your questions (as there is already a box with your username below it) or to begin them with a greeting.
-
Dave almost 12 yearsI know, it's not necessary, but I'm accostumed to greet when I start new thread and I regard it as polite.
-
Werner almost 12 yearsThat's fine too, but this Q&A is accustomed to be question-specific. As such, many users with the edit privilege will remove these greetings and signatures.
-
-
egreg almost 12 yearsThe manual says precisely to do what Dave is doing; but it doesn't work with
transparent
, while it does withinvisible
. -
mbork almost 12 yearsOoops, sorry, then.
-
mbork almost 12 yearsI've put something closer to an answer now.
-
Dave almost 12 yearsThanks for the manual and automatic solutions. Works great.
-
mbork almost 12 yearsYou'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.