I am new to tikz. If I have two nodes [A] and [B] as:
[A]
[B]
How do I align [C] so that it is vertically below [A] and horizontally left of [B] such that:
[A]
[C] [B]
without resorting to absolute positioning?
I am new to tikz. If I have two nodes [A] and [B] as:
[A]
[B]
How do I align [C] so that it is vertically below [A] and horizontally left of [B] such that:
[A]
[C] [B]
without resorting to absolute positioning?
\documentclass[11pt]{scrartcl}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node (a) at (0,0){[A]};
\node (b) at (5,-4){[B]};
\node (c) at (a|-b){[C]};
\end{tikzpicture}
\end{document}
You can use relative positioning (§ 3.8; TIKZ & PGF Manual, v. 2.10).
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{figure}
\centering
\begin{tikzpicture}[auto]
\node [draw] (a) {A};
\node [draw, below of=a] (c) {C};
\node [draw, right of=c] (b) {B};
\end{tikzpicture}
\end{figure}
\end{document}

scale=.... – Alain Matthes Dec 12 '11 at 21:50If I have two nodes [A] and [B]Your method is correct in multiple cases like graphs in the tutorials of the pgfmanual, personally I tried to avoid it in the geometric pictures because it' s difficult to scale the result. – Alain Matthes Dec 12 '11 at 22:37below right=of...with thepositioninglibrary if you setnode distance=x<dimen> and y<dimen>to the surrounding scope/tikzpicture. – morbusg Dec 13 '11 at 16:08