I guess this is a very simple question, but I couldn't find the answer… How can I define a variable in TikZ? I want to have something like, for example:
\draw[->] (x1,y1)--(x2,y2);
Such that x1,x2,y1,y2
are defined somewhere else and can be changed in order to adjust the picture.
Should be simple, right?
Best Answer
You can add
\newcommand\XA{2}
etc. and then\coordinate (A) at (\XA,\YA);