I have drawn the boxes A to F and the arrows. What I do not know is how to draw the two outer blocks - block1 covering blocks A to D and block2 covering E and F. I would really appreciate some help.
Asked
Active
Viewed 225 times
2
-
Could you please provide a minimal working example, so we could help you easier – Rico Jan 01 '16 at 13:07
-
5You can also have a look to How to Make This Block Diagram with LaTeX. – Claudio Fiandrino Jan 01 '16 at 13:11
1 Answers
8
Use the TikZ fit library.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{fit}
\begin{document}
\begin{tikzpicture}[
every node/.style = {
draw,rounded corners,
minimum width=3cm
}]
\node (A) {A};
\node[below of=A] (B) {B};
\node[below of=B] (C) {C};
\node[below of=C] (D) {D};
\node[below of=D] (E) {E};
\node[below of=E] (F) {F};
\draw (A) edge[->] (B);
\draw (B) edge[->] (C);
\draw (C) edge[->] (D);
\draw (D) edge[->] (E);
\draw (E) edge[->] (F);
\node[fit=(A) (B) (C) (D)] {};
\node[fit=(E) (F)] {};
\end{tikzpicture}
\end{document}
Henri Menke
- 109,596
-
For the record, you don't need to specify the middle nodes (B and C) in the
fitcommand. The "extremes" are enough, so the first one can be reduced to:\node[fit=(A) (D)] {};:) – Alenanno Jan 01 '16 at 14:33

