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.

I have drawn a rectangle with a fixed position:

\[\begin{tikzpicture}
\draw[thick] (3,1) rectangle (5,3);  
\end{tikzpicture}\]

I would like to make it a node with a name (for instance rec), so that other elements later could be positioned with regards to it, for instance:

\node (elli) [ellipse, below=1cm of rec] {...};

Does anyone know how to make the rectangle above a node?

share|improve this question
add comment

1 Answer

up vote 8 down vote accepted

You can specify the minimum height and minimum width for a node. In conjunction with draw, you'll end up with a rectangle with the specified dimensions:

\node (rect) at (4,2) [draw,thick,minimum width=2cm,minimum height=2cm] {};
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.