HowToBuildACommonsWorkbooks/src/how-to-consensus-zine/flow-chart-only.tex
Kevin Harrington 96af5c7e3f angle of arrow
2025-10-19 23:35:27 -04:00

48 lines
No EOL
2.4 KiB
TeX

% Define the flowchart command with scale and font size parameters
% Usage: \consensusflowchart{scale}{fontsize}
% Example: \consensusflowchart{0.8}{\small}
\newcommand{\consensusflowchart}[2]{%
\begin{tikzpicture}[
node distance=1.5cm,
scale=#1,
transform shape,
every node/.style={font=#2},
process/.style={rectangle, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=white, text width=3cm},
decision/.style={diamond, minimum width=2cm, minimum height=1cm, text centered, draw=black, fill=gray!20, aspect=2},
endpoint/.style={rectangle, minimum width=2.5cm, minimum height=1cm, text centered, draw=black, fill=white},
block/.style={rectangle, minimum width=2.5cm, minimum height=1cm, text centered, draw=red, fill=white, text=red, line width=1pt},
consensus/.style={rectangle, minimum width=2.5cm, minimum height=1cm, text centered, draw=green!60!black, fill=white, text=green!60!black, line width=1pt},
arrow/.style={thick,->,>=Stealth}
]
% Nodes
\node (discussion) [process] {Discussion};
\node (proposal) [process, below=1.2cm of discussion] {Proposal};
\node (test) [process, below=1.2cm of proposal] {Test for Consensus};
\node (yes) [decision, right=1.2cm of test] {Yes};
\node (no) [decision, left=1.2cm of test] {No};
\node (modification) [process, below=1.2cm of test] {Modification to Proposal};
\node (concerns) [endpoint, below=1.2cm of no] {Concerns Raised};
\node (standAside) [endpoint, below=1.2cm of modification] {Stand Aside};
\node (consensusAchieved) [consensus, below=1.2cm of yes] {Consensus Achieved};
\node (blockNode) [block, below=1.2cm of concerns] {Block};
\node (actionPoints) [endpoint, below=1.2cm of consensusAchieved] {Action Points};
% Arrows
\draw [arrow] (discussion) -- (proposal);
\draw [arrow] (proposal) -- (test);
\draw [arrow] (test) -- (yes);
\draw [arrow] (test) -- (no);
\draw [arrow] (yes) -- (consensusAchieved);
\draw [arrow] (no) -- (concerns);
\draw [arrow] (concerns) -- (modification);
\draw [arrow] (concerns) -- (blockNode);
\draw [arrow] (consensusAchieved) -- (actionPoints);
\draw [arrow] (concerns) -- (standAside);
\draw [arrow] (standAside) -- (consensusAchieved);
% Curved arrows
\draw [arrow, overlay] (no) to[out=120, in=180] (discussion);
\draw [arrow, overlay] (modification) to[out=90, in=-90] (test);
\draw [arrow, overlay] (blockNode) to[out=150, in=180] (discussion);
\end{tikzpicture}%
}