0

I'm following the tutorials given here to understand how to create flowcharts

For example in,

\tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=orange!30]

the dimensions of the rectangle and the text width are defined.

This will enable us to create a node of the following type,

\node (pro2a) [process, below of=dec1, yshift=-0.5cm] {Process 2a text text text text text text text text text text};

But if we create another node with different text length

\node (pro2b) [process, below of=dec1, yshift=-0.5cm] {Process 2a text text text};

The size fo box created for pro2aand pro2b will be different. I'd like to know how to create rectangles of same size for both pro2aand pro2b.

EDIT: I'd a look at the examples provided in the links shared below. However,I'm not sure how to apply in for my case where there are different node types in

\begin{tikzpicture}
\end{tikzpicture}

environment.

Complete example:

\tikzstyle{steps} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=gray!50]
\tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, text width=4cm, draw=black, fill=white]
\definecolor{arrowblue}{RGB}{98,145,224}

\newcommand\ImageNode[3][]{
\node[draw=arrowblue!80!black,linewidth=1pt,#1](#2){\includegraphics[width=1.5cm,height=1.5cm]{#3}};
}

\begin{tikzpicture}[node distance=2cm]
\node (step1) [steps] {Step 1};
\node (step2) [steps, right of=step1, xshift=3cm]{Step 2};
\node (step3) [steps, right of=step2, xshift=3cm]{Step 3};
\node (process1) [process, below of=step1] {text text};
\node (process2) [process, right of=process1, xshift=3cm] {text text
text text text text text text text text text text text text text text text text};
\node (process3) [process, right of=process2, xshift=3cm] {text text text};
\end{tikzpicture}

Here, I the box sizes of steps and process will be different. I want to assign same box size only for process1, process2, process3

imnothere
  • 14,215
Natasha
  • 511

1 Answers1

1

changing height to 2cm will do the trick -- you may like to increase the separation

enter image description here

\tikzstyle{steps} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=gray!50]
    \tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=2cm, text centered, text width=4cm, draw=black, fill=white]
    \definecolor{arrowblue}{RGB}{98,145,224}



\newcommand\ImageNode[3][]{
    \node[draw=arrowblue!80!black,linewidth=1pt,#1](#2){\includegraphics[width=1.5cm,height=1.5cm]{#3}};
}

\begin{tikzpicture}[node distance=2cm]
\node (step1) [steps] {Step 1};
\node (step2) [steps, right of=step1, xshift=3cm]{Step 2};
\node (step3) [steps, right of=step2, xshift=3cm]{Step 3};
\node (process1) [process, below of=step1] {text text};
\node (process2) [process, right of=process1, xshift=3cm] {text text
    text text text text text text text text text text text text text text text text};
\node (process3) [process, right of=process2, xshift=3cm] {text text text};
\end{tikzpicture}
js bibra
  • 21,280