This is part 2 of Tikz Nodes Positions and Shapes with a General Number of Nodes, a question I was asked to split. Please refer to the code below.
In the table below I'd like to:
Control the direction in which the numbers are running
At this time, the numbers go something like this:
81 82 83 84 85
86 87 88 89 90
But I'd be interested in experimenting with:
81 82 83 84 85
90 89 88 87 86
An already existing example or a sketch would be more than enough.
Ultimately it would be fun to design winding paths, like in kids' board games. A board game is actually what I'm working towards, at a snail's pace.
\RequirePackage[svgnames,x11names]{xcolor}
\documentclass[tikz,convert=false,margin=0pt]{standalone}%
\usepackage{rotating}% sideways environment
\begin{document}%
\begin{tikzpicture}[%
every node/.style = {
align = center
, scale = 2
, anchor = base
, font = \fontfamily{pzc}\selectfont% common font
, text = black
}
]%
%
% Set Grid Dimensions
\newcommand{\xa}{1}
\newcommand{\xb}{5}
\newcommand{\ya}{1}
\newcommand{\yb}{5}
\pgfmathsetmacro{\yc}{\yb-1}% \yb minus one
%
% Change styles of numbers according to set membership
\foreach \x in {\xa,...,\xb}
\foreach \y in {\ya,...,\yb}
{\pgfmathtruncatemacro{\label}{\x - \xb * (\y - \yb) }
\node (\x\y) at (1.5*\x, -1.5*\y) {\label};}
\foreach \x in {\xa,...,\xb}
\foreach \y [count = \yi] in {\ya,...,\yc}
\draw (\x\y)(\x\yi) (\y\x)(\yi\x) ;
\end{tikzpicture}%
\end{document}%



\foreach \n [evaluate={\x=-mod(\n-1,10); \y=-floor((\n-1)/10);}] in {1,...,100}\node at (\x,\y) {\n};– Mark Wibrow Feb 03 '14 at 07:31