TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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]{};?


share|improve this question
Where do you want the coordinate to end up? Nodes come equipped with a whole slew of anchors, would one of them do? (A.east) seems a reasonable one in this case. – Loop Space May 24 '12 at 19:06
\coordinate[right=of A] (x) ; is fine but not \coordinate (x) [right=of A]; – Alain Matthes May 24 '12 at 19:10
@AndrewStacey The advantage of doing [right=of A] instead of (A.east), as you suggest, is that I can change the node distance and have the coordinate repositioned, or I can say directly things like [right=30mm of A]. Also a coordinate has no space, that's why I had to put [draw=none ... above. – Mário May 24 '12 at 21:48
up vote 11 down vote accepted
\usepackage {tikz}


    \node (A){A};
    \coordinate  (x) [right=of A]; 
    \coordinate[right=of A]  (y) ;
    \draw (x) -- ++(1,1);
    \draw[red] (y) -- ++(1,1); 


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
share|improve this answer
Your solution worked! Thank you – Mário May 24 '12 at 21:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.