modularizing the flow chart, but the scaling is off now

This commit is contained in:
Kevin Harrington 2025-10-19 11:52:42 -04:00
parent 875efb39b1
commit a79fb0670f
3 changed files with 55 additions and 42 deletions

View file

@ -5,11 +5,19 @@
paperheight=4.25in paperheight=4.25in
} }
\usepackage{lmodern} \usepackage{lmodern}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows.meta, positioning}
\usepackage{adjustbox}
\parskip1em \parskip1em
\begin{document} \begin{document}
\sffamily\fontsize{60}{80}\selectfont \sffamily\fontsize{60}{80}\selectfont
\centering \centering
Page\par \#1\newpage \begin{center}
\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

@ -0,0 +1,40 @@
% Define styles
\tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=white, text width=3cm]
\tikzstyle{decision} = [diamond, minimum width=2cm, minimum height=1cm, text centered, draw=black, fill=gray!20, aspect=2]
\tikzstyle{endpoint} = [rectangle, minimum width=2.5cm, minimum height=1cm, text centered, draw=black, fill=white]
\tikzstyle{block} = [rectangle, minimum width=2.5cm, minimum height=1cm, text centered, draw=red, fill=white, text=red, line width=1pt]
\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]
\tikzstyle{arrow} = [thick,->,>=Stealth]
\begin{tikzpicture}[node distance=1.5cm,scale=0.4]
% 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] (modification) -- (standAside);
\draw [arrow] (concerns) -- (blockNode);
\draw [arrow] (consensusAchieved) -- (actionPoints);
\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,47 +1,12 @@
\documentclass[tikz,border=10pt]{standalone} \documentclass[tikz,border=10pt]{standalone}
\usepackage{geometry}
\geometry{
paperwidth=2.75in,
paperheight=4.25in
}
\usepackage{tikz} \usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows.meta, positioning} \usetikzlibrary{shapes.geometric, arrows.meta, positioning}
% Define styles
\tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=white, text width=3cm]
\tikzstyle{decision} = [diamond, minimum width=2cm, minimum height=1cm, text centered, draw=black, fill=gray!20, aspect=2]
\tikzstyle{endpoint} = [rectangle, minimum width=2.5cm, minimum height=1cm, text centered, draw=black, fill=white]
\tikzstyle{block} = [rectangle, minimum width=2.5cm, minimum height=1cm, text centered, draw=red, fill=white, text=red, line width=1pt]
\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]
\tikzstyle{arrow} = [thick,->,>=Stealth]
\begin{document} \begin{document}
\begin{tikzpicture}[node distance=1.5cm] \input{flow-chart-only.tex}
% 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] (modification) -- (standAside);
\draw [arrow] (concerns) -- (blockNode);
\draw [arrow] (consensusAchieved) -- (actionPoints);
\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}
\end{document} \end{document}