Take the 2-minute tour ×
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.

Is it possible to align node c vertical to node a and horizontal to node b. If I combine the "below=of" and "right=of" parameter, Tikz ignores the first one.

\begin{tikzpicture}
  \node[draw, circle, xshift=2cm](a){A};
  \node[draw, circle, minimum width=2cm, yshift=-2cm](b){B};
  \node[draw, below=of a, right=of b](c){C};
\end{tikzpicture}
share|improve this question
2  
You can use \node[draw](c) at (a|- b){C}; instead. –  percusse Feb 11 '13 at 12:22
    
Thanks for your fast answer! This helps... –  user4811 Feb 11 '13 at 12:27
    
@percusse Let me return the favour: perhaps you could convert your comment to an answer. –  Loop Space Mar 11 '13 at 18:26
    
@AndrewStacey I forgot this, thank you. –  percusse Mar 11 '13 at 20:39
add comment

1 Answer 1

You can use the orthogonal identifiers |- and -| for intersections of different coordinates. A quick reading hint is go vertical | and then horizontal - or vice versa.

\begin{tikzpicture}
  \node[draw, circle, xshift=2cm](a){A};
  \node[draw, circle, minimum width=2cm, yshift=-2cm](b){B};
  \node[draw](c) at (a|- b){C};
\end{tikzpicture}

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

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.