In Metafont and Metapost I can easily make a variable z1 (as long as it is the letter z followed by an index number) represent a point like this:
z1=(1,2);
and I can use this to make a line, like in:
draw z1--(7,5);
Can I make the same thing in Tikz ? I cannot find it anywhere, and if i write a code like:
\z1=(1,2);
\draw z1--(7,5);
It gives me an error, and it would make my work a lot easier if I could reference one point to one single variable that I could change once and it would affect every instance in wich this variable is used.
node. You can make a node without any content by writing\coordinate (z1) at (1,2);then draw like this\draw (z1) -- (7,5);. – SebGlav Feb 14 '21 at 12:39tikzpictureenvironment; unless one usesremember picturefor the defining environment and anotherremember picturefor the picture where they want to access the coordinate again. – Philipp Imhof Feb 15 '21 at 07:41