2

I have this flow chart diagram:

\documentclass[a4 paper, 12pt]{article}

\usepackage{smartdiagram}
\usepackage[neveradjust]{paralist} % compact list

\begin{document}
\begin{figure}[h]
\centering      
    \smartdiagramset{border color=none,
    %module minimum width = 8cm,
    text width = 0.6\linewidth,
    uniform color list = gray!100!black for 4 items,
    back arrow disabled=true,
    module y sep=2.2
    }
\smartdiagram[flow diagram]{
    \textbf{short word},
    \textbf{a longer than short word}
    \begin{compactitem}
        \item Description 1
        \item Description 2
    \end{compactitem},
    \textbf{a longer than short word} 
    \begin{compactitem}
        \item Description 1
        \item Description 2
        \item Description 3
    \end{compactitem},
    \textbf{short word} 
    }
    \caption{words and description}
    \label{fig:words} 
\end{figure}
\end{document}

flow diagram

How can I make the distance between the modules equidistant, i.e. making the arrow length constant?

PS: How can I make the modules only as big as the text inside them? Any help is appreciated

0

2 Answers 2

3

Without smartdiagram but with chains:

\documentclass[a4 paper, 12pt]{article}

\usepackage{tikz}
\usetikzlibrary{arrows.meta,chains, shadows, positioning}
%\usepackage{smartdiagram}
\usepackage[neveradjust]{paralist} % compact list

\begin{document}
\begin{figure}[h]
\centering      
\begin{tikzpicture}[
    every node/.style={
        rounded corners,
        %fill=gray,
        top color=white,
        bottom color=gray,
        drop shadow,
        on chain,
        join,
    },
    >=stealth,
    every join/.style={gray,line width=1mm,->},
    node distance=1cm,
    start chain=going below
    ]
   \node[font=\bfseries] {short word};
   \node[align=center, text width=6cm] {\textbf{a longer than short word}\\
    \begin{compactitem}
        \item Description 1
        \item Description 2
    \end{compactitem}};
    \node[align=center, text width=6cm] {\textbf{a longer than short word}\\
    \begin{compactitem}
        \item Description 1
        \item Description 2
        \item Description 3
    \end{compactitem}};
    \node[font=\bfseries] {short word};
    \end{tikzpicture}
    \caption{words and description}
    \label{fig:words} 
\end{figure}
\end{document}

enter image description here

1

Without smartdiagram

\documentclass[a4 paper, 12pt]{article}
\usepackage{tikz}
\usetikzlibrary{positioning,shadows}
\usepackage[neveradjust]{paralist}
\usepackage{varwidth}


\begin{document}
\begin{figure}[h]
\centering
\begin{tikzpicture}[every node/.style={align=center,top color=white,bottom color=gray,drop shadow,rounded corners}]
 \node(1)[font=\bfseries] {short word};
 \node(2)[below=1.5cm of 1]
 {\begin{varwidth}{\linewidth}
 \begin{compactitem}
        \item Description 1
        \item Description 2
 \end{compactitem}
 \end{varwidth}};
 \node(3)[below=1.5cm of 2]{
    a longer than short word\\
    \begin{varwidth}{\linewidth}
 \begin{compactitem}
        \item Description 1
        \item Description 2
        \item Description 3
 \end{compactitem}
 \end{varwidth}};
 \node(4)[font=\bfseries,below=1.5cm of 3] {short word};
 \path[->,>=stealth,line width=2mm,gray!70] (1)edge(2) (2)edge(3) (3)edge(4);
\end{tikzpicture}
    \caption{words and description}
    \label{fig:words} 
\end{figure}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .