I want to place a two lines text inside each node in a grid and want them to be centered. Now I am aware of this among other threads. E.g. the most natural solution would be to use align=center in combination with linebreaks \\ inside the node text brackets.
Picture and MWE below. As you can see, the letters are not centered, while the numbering is. I tried:
align+\\text width, alone and in combination with the abovetabularenvironment inside the node text brackets- removing the
\scriptsizeparameter I use As you can see, I use nested for loops to create a grid that counts up in a serpentine formation. Certain groups of indices (predefined externally) receiver certain letters, I achieve this with the defined command\mylabel. Got the idea for this from my question earlier. However, I just cant get the letters to align centered with the numbers in the line below.
\documentclass{standalone}
\usepackage{tikz}
%=================================
\def\groupC{{2,11,13,22,24,33,35,44,46,55,57,66,68,77,79,88}}
\def\groupA{{3,4,5,6,7,8,9,10,14,15,16,17,18,19,20,21,25,26,27,28,29,30,31,32,36,37,38,39,40,41,42,43,47,48,49,50,51,52,53,54,58,59,60,61,62,63,64,65,69,70,71,72,73,74,75,76,80,81,82,83,84,85,86,87}}
\def\groupH{{12,23,34,45,56,67,78}}
\def\groupO{{89}}
\newcommand{\mylabel}[1]
{%
\pgfmathtruncatemacro{\num}{#1}
\foreach\c in {0,...,15}
{%
\pgfmathtruncatemacro{\temp}{\groupC[\c]}%
\ifnum \num = \temp \scriptsize C\fi
}
\foreach\a in {0,...,63}
{%
\pgfmathtruncatemacro{\temp}{\groupA[\a]}%
\ifnum \num = \temp \scriptsize A\fi
}
\foreach\h in {0,...,6}
{%
\pgfmathtruncatemacro{\temp}{\groupH[\h]}%
\ifnum \num = \temp \scriptsize H\fi
}
\ifnum \num = 89 \scriptsize O\fi
}
\begin{document}
\begin{tikzpicture}[node distance=1cm]
\foreach \i in {0,...,7}
\foreach \j in {0,...,10}
{\pgfmathtruncatemacro{\label}{11\i+\j+2}
{\pgfmathsetmacro{\x}{1\j(-1)^(\i) + 5(-1)^(\i+1)}
\node (e\label) [rectangle, draw=black, minimum width=1cm, align=center] at (\x,-1*\i) {
\mylabel{\label}\[-5pt]
\scriptsize(\label)
};
}}
\end{tikzpicture}
\end{document}

