I am trying to use labels defined in an array using tikz for drawing a path between two shapes. I have tried to use pgfmathparse but it seems not well defined for string. My syntax is probably wrong.
MWE:
\documentclass[]{standalone}
\usepackage{tikz}
\begin{document}
\def\stA {AA}
\def\stB {BB}
\def\stC{{"AA","BB"}}
\begin{tikzpicture}
\node at (0,0) (AA){coucou};
\node at (2,0) (BB){ahah};
\draw (\stA)--(\stB);
\draw (\pgfmathparse{\stC[2]}\pgfmathresult)--(\pgfmathparse{\stC[1]}\pgfmathresult);
\end{tikzpicture}
\end{document}

\node (AA) at (0,0) {coucou}; \node (BB) at (2,0) {ahah}; \draw (AA) -- (BB);Syntax of this lines in your MWE is wrong as well second line with\draw, where you use TikZ math engine. What is purpose of this line? – Zarko Jun 21 '15 at 20:02