I have a tikz code using values stored in a 1D array, here is a MWE :
\documentclass{standalone}
\usepackage{tikz}
\def \myArray {{0,1,2,3}}
\begin{document}
\begin{tikzpicture}
\pgfmathsetmacro\x{\myArray[0]}
\draw (0,0) node {\x};
\end{tikzpicture}
\end{document}
So this one works OK for my complex code, but I could really improve it using 2D arrays and loops. Here is a Minimum Not Working Example of what it could look like :
\documentclass{standalone}
\usepackage{tikz}
\def \myArray {{0,1}{2,3}}
\begin{document}
\begin{tikzpicture}
\pgfmathsetmacro\x{\myArray[1][1]}
\draw (0,0) node {\x};
\end{tikzpicture}
\end{document}
with this code, I'm expecting to have the value "3" displayed (2nd line, 2nd column).
Is there a way to do 2D array storage and indexing with latex/tikz ?
