bvowe
bvowe

Reputation: 3394

Latex Flowchart with Multiple Splits

I try to make this flowchart in Latex but do not know how to make the boxes that go down to the left. Please help as I provide code below as far as I could get to.enter image description here

    \documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows} 
\usetikzlibrary{positioning}    

\begin{document}
    \begin{tikzpicture}[
        > = latex',
        every node/.style={
            draw,
            minimum width=2cm,
            minimum height=0.8cm,
        },
    ]
%
\node (S1) {Step 1};
%
\node[below=of S1] (S2) {Step 2};
\node[below=of S1, left=of S2] (S3) {Step 3};
\node[below=of S1, right=of S2] (S4) {Step 4};

\node[below=of S2] (S2a) {Step 2a};
\node[below=of S3] (S3a) {Step 3a};
\node[below=of S4] (S4a) {Step 4a};

\node[below=of S2a] (S2b) {Step 2b};
\node[below=of S3a] (S3b) {Step 3b};
\node[below=of S4a] (S4b) {Step 4b};

\node[below=of S2b] (S2c) {Step 2c};
\node[below=of S3b] (S3c) {Step 3c};
\node[below=of S4b] (S4c) {Step 4c};


\node[below=of S2c] (S2d) {Step 2d};
\node[below=of S3c] (S3d) {Step 3d};
\node[below=of S4c] (S4d) {Step 4d};


\draw[->] 
(S1) edge (S2)
(S2) edge (S3);

\end{tikzpicture}
\end{document}

Upvotes: 1

Views: 114

Answers (1)

You could add the branches like this:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows} 
\usetikzlibrary{positioning}    

\begin{document}
    \begin{tikzpicture}[
        > = latex',
        every node/.style={
            draw,
            minimum width=2cm,
            minimum height=0.8cm,
        },
    ]
%
\node (S1) {Step 1};
\node[below=of S1] (S2) {Step 2};

\draw[->] (S1) -- (S2);

\node[below left=of S1,yshift=0.9cm] (X1) {X1};
\draw[->] (S1) |- (X1);

\end{tikzpicture}
\end{document}

enter image description here

Upvotes: 1

Related Questions