0

The PGF & TikZ manual for version 3.1.9a (the current version) has this to say about the coordinate keyword of the math TikZ library (p. 706):

coordinate 〈variable〉, 〈additional variables〉;
This keyword enables TikZ-style coordinates such as (2cm,3pt) or (my node.east) to be parsed and assigned to 〈variable〉

Could you please give me a full working example of how a coordinate variable can be assigned a value of the form (my node.east) inside the argument of a \tikzmath command?

1 Answer 1

2

You first need to declare a coordinate variable before you can use it.

Code

\documentclass[tikz]{standalone}
\usetikzlibrary{math}
\begin{document}
\begin{tikzpicture}
\node (my node) at (3,1) {Foo};
\tikzmath{
  coordinate \c;
  \c = (my node.east);
}
\draw[<-] (\c) -- ++ (35:1) node[right, align=left, at end] {
  (\c) is \\(\cx, \cy) is \\(my node.east)};
\end{tikzpicture}
\end{document}

Output

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .