I would like to use foreach constructions to draw lines between multipart nodes. But I find the problem that multipart anchors are declared with a textual names: one, two, ... instead of numbers.
I've tried to use conversion functions from fmtcount or numname packages but although they work inside node's text, I'm not able to use for anchors reference. Is it possible?
\documentclass[tikz, border=1mm]{standalone}
\usetikzlibrary{shapes.multipart, positioning}
\usepackage{fmtcount}
\begin{document}
\begin{tikzpicture}[
my shape/.style={
rectangle split
, rectangle split parts=#1
, draw
, anchor=center
}
]
\node[my shape=3] (main){
\numberstringnum{1}
\nodepart{two}
\numberstringnum{2}
\nodepart{three}
\numberstringnum{3}};
\node[my shape=3, right=2cm of main] (second)
{
\numberstringnum{1}
\nodepart{two}
\numberstringnum{2}
\nodepart{three}
\numberstringnum{3}};
\draw (main.one east) -- (second.two west);
%following lines fail.
%\draw (main.\numberstringnum{2} east) -- (second.\numberstringnum{3} west);
%\foreach \i in {1,...,3}
% \draw (main.\numberstringnum{\i} east) -- (second.\numberstringnum{\i} west);
\end{tikzpicture}
\end{document}
