Added the latex method style to the flowchart

This commit is contained in:
Kevin Harrington 2025-10-19 21:57:33 -04:00
parent a79fb0670f
commit 6f59584579
3 changed files with 53 additions and 50 deletions

View file

@ -8,16 +8,12 @@
\usepackage{tikz} \usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows.meta, positioning} \usetikzlibrary{shapes.geometric, arrows.meta, positioning}
\usepackage{adjustbox} \usepackage{adjustbox}
\input{src/how-to-consensus-zine/flow-chart-only.tex}%
\parskip1em \parskip1em
\begin{document} \begin{document}
\sffamily\fontsize{60}{80}\selectfont
\centering \centering
\begin{center} \consensusflowchart{0.5}{\footnotesize} \newpage% Smaller version
\adjustbox{max width=\textwidth, max height=0.9\textheight}{%
\input{src/how-to-consensus-zine/flow-chart-only.tex}%
}
\end{center}
Page\par \#2\newpage Page\par \#2\newpage
Page\par \#3\newpage Page\par \#3\newpage
Page\par \#4\newpage Page\par \#4\newpage

View file

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

View file

@ -1,4 +1,4 @@
\documentclass[tikz,border=10pt]{standalone} \documentclass{article}
\usepackage{geometry} \usepackage{geometry}
\geometry{ \geometry{
paperwidth=2.75in, paperwidth=2.75in,
@ -6,7 +6,7 @@
} }
\usepackage{tikz} \usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows.meta, positioning} \usetikzlibrary{shapes.geometric, arrows.meta, positioning}
\begin{document}
\input{flow-chart-only.tex} \input{flow-chart-only.tex}
\begin{document}
\centering \consensusflowchart{0.5}{\footnotesize} \newpage
\end{document} \end{document}