[Tex/LaTex] How to specify a Tikz coordinate relative to a node

coordinatespositioningtikz-pgf

is there a simple idiom (one not using the calc library) to specify a Tikz coordinate relative to a node?

Something like \coordinate (x) [right=of A]; instead of \node (x) [draw=none, right=of A]{};?

Thanks

Best Answer

\documentclass{article} 
\usepackage {tikz}
\usetikzlibrary{positioning}

\begin{document} 

  \begin{tikzpicture}
    \node (A){A};
    \coordinate  (x) [right=of A];  % <-- this does *not* work expected
    \coordinate[right=of A]  (y) ;  % <-- this *works* as expected
    \draw (x) -- ++(1,1);
    \draw[red] (y) -- ++(1,1); 
  \end{tikzpicture}

\end{document} 

enter image description here

remark the problem is similar with

\node  (x) {} [right= of A]; 

instead of

\node[right= of A]  (x) {} ;

but

\node (x) [right= of A]  {} ;

is valable