topnush

\documentclass{beamer}
\usepackage{tikz}

\begin{document}

\begin{frame}
\frametitle{}
\uncover<1-10>
{
$S$ = \foreach [count=\y] \x in {\{0\},\{0,1\},{0,1,2},{4,1,2},{4,1,2},{4,1,2},{4,1,2},{4,8,2},{4,8,9},{4,8,9}}{\only<\y>{\x}}
}

\end{frame}
\end{document}


I would like the curly brackets around the sets to all be shown. Normally I would do $\{0,1,2\}$ but that doesn't work either. Strangely {0} is shown properly but {0,1} is not. I tried  \{0\,1\} but then the comma isn't shown.

samcarter
You can wrap the items in your list in an additional pair of curly brackets. Without them your list looks just like {x0x, x0, 1x,...} to TikZ.


\documentclass{beamer}
\usepackage{tikz}

\begin{document}

\begin{frame}
\frametitle{}
\uncover<1-13>
{
$S$ = \foreach [count=\y] \x in {{\{0\}},{\{0,1\}}}{\only<\y>{\x}}
}

\end{frame}
\end{document}


![document.gif](/image?hash=edac30f36cc1bd9087f53a021d022a6798a8882a4973bf006d5ac3b072420dc8)

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.