I cannot find out what I am missing. I am basically trying to have two and a half lines of boxes right next to each other but somehow a10 is supposed to be missing. Can anyone help?Thanks in advance!
\documentclass{article}\usepackage{tikz}\usetikzlibrary{matrix}\usetikzlibrary{positioning}\begin{document}\begin{tikzpicture}[ node distance = 0pt, square/.style = {draw=blue!60, fill=blue!5, very thick, minimum height=3em, minimum width=3em, % <--- outer sep=0pt}, square2/.style = {draw=red!60, fill=red!5, very thick, minimum height=3em, minimum width=3em, % <--- outer sep=0pt}, ] \node[square] (a00) {}; \foreach \i in {0,1}{ \foreach \j in {1,2,3}{ \pgfmathsetmacro\k{\j-1} \node[square,right=of a\i\k] (a\i\j) {}; } \pgfmathsetmacro\k{\i+1} \node[square,below=of a\i0] (a\k0) {}; }\end{tikzpicture}\end{document}