I have a (long) list, say \def\List{0, 4, 7, 11, 2, 3}
.
I draw an animation with a foreach-loopfor that (this is a very small part of a very large tikzpicture
):
But I would like to repeat the picture for "0" (that is the black filled one) after each number.
Like as the list would look like 0, 4, 0, 7, 0, 11, 0, 2, 3, 0
.
Is there maybe a trick to get that?
\documentclass[margin=5mm, tikz]{standalone}
\usepackage{tikz}
\def\List{0, 4, 7, 11, 2, 3}
\begin{document}
\foreach \No in \List {%%
\begin{tikzpicture}[]
\pgfmathsetmacro\Fill{\No==0 ? "black" : "none"}
\node[draw, minimum size=10mm, name=ListEntry, fill=\Fill]{\No};
\node[anchor=west] at (ListEntry.east){Situation: \No};
\end{tikzpicture}
}%%
\end{document}