I am trying to draw n open squares with numbers inside. The objective to make notes on combinatorics with n balls and n boxes types of problems. I could draw circles using help from this site. I used the following for circles:
\documentclass{article}
\usepackage{tikz}
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
\node[shape=circle,draw,inner sep=8pt] (char) {#1};}}
\begin{document}
\circled{1} \circled{2} \circled{3} $\ldots$ \circled{k}
\end{document}
I have been looking for something similar for squares. Any help?
EDIT: I tried egreg's comments and put shape=rectangle. But how do I draw open boxes?


shape=rectangle– egreg Apr 23 '16 at 10:32shape=circlewill work:rectangleis the default @egreg. – cfr Apr 24 '16 at 14:21