# Beamer and ampersands (XeLaTeX)

There are some known problems with ampersands and beamer (as discussed here, for instance), but I haven't been able to find a good reference...

Anyway, the concrete problem I have is with tables (also with amsmath environments): the ampersands break the uncover environments when compiling with XeLaTeX (but it works fine with PDFLaTeX). In the following example, I have:

• with PDFLaTeX both C and D and greyed out in the first slide
• with XeLaTeX, only C is greyed out in the first slide

In TikZ there is a workaround to avoid ampersands, but I don't see how to do with tables or amsmath environnemnts... Could it be a beamer bug?

\documentclass{beamer}
\beamertemplatetransparentcovered
\begin{document}
\begin{frame}
\begin{tabular}{cc}
A & B \\
\pause
C & D
\end{tabular}
\end{frame}
\end{document}

• May be you can use \visible<2>{C & D \\} – Fran Apr 25 '15 at 19:32
• I get the expect output with \visible (the second line only visible on the second slide) , but if I change it to \uncover, I don't get the expected output with XeLaTeX (the second line grayed out in the first slide) – Gaëtan Leurent Apr 25 '15 at 20:39
• I don't know why you need XeLaTeX, but if it is just because of the extended font support you could also use LuaTeX. Your MWE seems to work fine with it. – Benjamin Dec 16 '15 at 14:22

If xetex does not like the &'s, than don't use them. https://tex.stackexchange.com/a/276133/36296 shows how to use other symbols as alignment markers for the table (maybe using a space is not the best idea, just change it to something that suits you).

\documentclass{beamer}
\beamertemplatetransparentcovered

\newenvironment{mytabular}[2][c]{%
\catcode\&=10
\catcode\ =4
\begin{tabular}[#1]{#2}
}{%
\end{tabular}
}

\begin{document}
\begin{frame}
\begin{tabular}{cc}
A & B \pause \\
C & D
\end{tabular}
\end{frame}

\begin{frame}
\begin{mytabular}{cc}
A B\\\pause
C D
\end{mytabular}
\end{frame}

\end{document}