I want to draw a complete graph with tikZ. At first the nodes, then the lines of the first node to the others, then the lines of the second node to the remaining and so forth. All these steps work with foreach-loops and each single drawing should appear step-by-step with the beamer function \visible<..>. My idea was to use a global LaTeX-counter to count all steps over all foreach-loops.
\documentclass[10pt,ngerman]{beamer}
\usepackage{tikz}
\newcounter{steps}
\begin{document}
\begin{frame}{Complete Graph}
\begin{tikzpicture}[
kreis/.style={circle, draw, minimum size=1.5cm},
]
\foreach [count=\i] \letter in {A,...,F}{%
% \stepcounter{steps}
\visible<\thesteps->{%
\node [kreis] (\letter) at (\i*60+30:2.5) {\huge{\letter}};
}
}
\end{tikzpicture}
\end{frame}
\end{document}
The MWE compiles, but when I remove the comment, then texmaker runs in an endless loop. Why?