From 930acd889de6e68660dee316fe533290bf945906 Mon Sep 17 00:00:00 2001 From: Ramin Kamal <21167874+ramink@users.noreply.github.com> Date: Sat, 4 Jan 2025 14:08:56 -0800 Subject: [PATCH 1/3] Rearranged starter process flowchart and added sidebar - Rearranged to make sure ready check comes before feeding. - Simplified by removing Discard block, and shortening titles. - Details moved to legend box below. - Changed arrowheads to be cleaner "Latex" style. --- book/figures/fig-starter-process.tex | 45 ++++++++++++++-------------- book/figures/flowcharts_tikz.tex | 2 +- 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/book/figures/fig-starter-process.tex b/book/figures/fig-starter-process.tex index bd24ef0..f59bb99 100644 --- a/book/figures/fig-starter-process.tex +++ b/book/figures/fig-starter-process.tex @@ -1,29 +1,28 @@ \begin{tikzpicture}[node distance = 3.5cm, auto] - \node [start] (init) {Mix \qty{50}{\gram} flour + \qty{50}{\gram} water, stir}; - \node [block, right of=init] (wait2) {Wait\\ \qty{24}{\hour}}; - \path [line] (init) -- (wait2); - \node [block, below of=wait2, node distance=3.5cm] (feed) {\qty{10}{\gram} of previous day + \qty{50}{\gram} water + \qty{50}{\gram} flour, stir}; - \path [line] (wait2) -- (feed); - \node [block, below of=feed] (discard) {Discard the rest}; - \path [line] (feed) -- (discard); - \node [decision, right of=feed, node distance=3.5cm] (decide) {Is good?}; - \node [decision, above of=decide, node distance=3.5cm] (timeout) {Less than 10 feeds?}; - \node [fail, right of=timeout, node distance=3.5cm] (discard2) {Batch failed}; - \path [line] (timeout) -- node{no} (discard2); - \path [line] (timeout) -- node{yes} (wait2); - \path [line] (feed) -- (decide); - \node [success, right of=decide, node distance=3.5cm] (use) {Ready to use}; - \path [line] (decide) -- node{no} (timeout); - \path [line] (wait2) -- (feed); - \path [line] (decide) -- node{yes} (use); - \node [right of=discard2, node distance=3.5cm] (details1) [shape=rectangle,draw]{ - \begin{tabular}{c c c} - \multicolumn{3}{c}{{Stuff in details 1}} \\ - foo & bar & thing \\ - and yet & another + \node [start] (start) { Start with Initial Mixture }; + \node [block, right of=start, node distance = 3.2cm] (wait) { Wait\\ \qty{24}{\hour} }; + \node [decision, right of=wait, node distance = 3.2cm] (readycheck) { Ready? }; + \node [block, below of=wait, node distance = 3cm] (feed) { Feed the Mixture }; + \node [decision, right of=feed, node distance = 3.2cm] (limitcheck) { Failed? }; + \node [fail, right of=limitcheck, node distance = 3.2cm] (abort) { Discard All, Start Over }; + \node [success, right of=readycheck, node distance = 3.2cm] (final) { Done }; + + \draw [thick, -{Latex}] (start) -- (wait); + \draw [thick, -{Latex}] (wait) -- (readycheck); + \draw [thick, -{Latex}] (feed) -- (wait); + \draw [thick, -{Latex}] (readycheck) -- node { No } (limitcheck); + \draw [thick, -{Latex}] (limitcheck) -- node (feedok) { No } (feed) ; + \draw [thick, -{Latex}] (limitcheck) -- node { Yes } (abort); + \draw [thick, -{Latex}] (readycheck) -- node { Yes } (final); + + \node [below of=feedok, node distance=2.5cm] (details1) [shape=rectangle,draw,fill=white!90!black]{ + \begin{tabular}{c} + \fontsize{7}{9}\selectfont For the \emph{Initial Mixture}, mix \qty{50}{\gram} flour/\qty{50}{\gram} water. \\ + \fontsize{7}{9}\selectfont The Mixture is \emph{Ready} when it has \emph{grown}, has \emph{bubbles}, and \emph{smells} vinegary/yoghurty. \\ + \fontsize{7}{9}\selectfont The Mixture has \emph{Failed} when you have fed it too many (eg 10) times without success. \\ + \fontsize{7}{9}\selectfont To \emph{Feed the Mixture}, discard all but \qty{10}{\gram}, mix in \qty{50}{\gram} flour and \qty{50}{\gram} water. \end{tabular} }; - \end{tikzpicture} diff --git a/book/figures/flowcharts_tikz.tex b/book/figures/flowcharts_tikz.tex index b452217..fb19d1a 100644 --- a/book/figures/flowcharts_tikz.tex +++ b/book/figures/flowcharts_tikz.tex @@ -1,6 +1,6 @@ \tikzstyle{every picture}+=[font=\footnotesize\sffamily] \usetikzlibrary{calc, shapes, arrows, decorations.pathreplacing, calligraphy, - positioning} + positioning, arrows.meta} \tikzstyle{decision} = [diamond, draw=codeblack, fill=codeblack, text=white, text width=4.5em, text badly centered, node distance=3cm, inner sep=0pt, line width=2mm] From 07a4a4ed556dfccdb5dfc271b514f34cc2448b96 Mon Sep 17 00:00:00 2001 From: Cedric Date: Sun, 5 Jan 2025 15:13:05 +0000 Subject: [PATCH 2/3] Add examples of left alignment and spaces --- book/figures/fig-starter-process.tex | 64 ++++++++++++++++++++-------- 1 file changed, 47 insertions(+), 17 deletions(-) diff --git a/book/figures/fig-starter-process.tex b/book/figures/fig-starter-process.tex index f59bb99..7364f6a 100644 --- a/book/figures/fig-starter-process.tex +++ b/book/figures/fig-starter-process.tex @@ -1,28 +1,58 @@ \begin{tikzpicture}[node distance = 3.5cm, auto] + \node [start] (init) {Mix \qty{50}{\gram} flour + \qty{50}{\gram} water, stir}; + \node [block, right of=init] (wait2) {Wait\\ \qty{24}{\hour}}; + \path [line] (init) -- (wait2); + \node [block, below of=wait2, node distance=3.5cm] (feed) {\qty{10}{\gram} of previous day + \qty{50}{\gram} water + \qty{50}{\gram} flour, stir}; + \path [line] (wait2) -- (feed); + \node [block, below of=feed] (discard) {Discard the rest}; + \path [line] (feed) -- (discard); + \node [decision, right of=feed, node distance=3.5cm] (decide) {Is good?}; + \node [decision, above of=decide, node distance=3.5cm] (timeout) {Less than 10 feeds?}; + \node [fail, right of=timeout, node distance=3.5cm] (discard2) {Batch failed}; + \path [line] (timeout) -- node{no} (discard2); + \path [line] (timeout) -- node{yes} (wait2); + \path [line] (feed) -- (decide); + \node [success, right of=decide, node distance=3.5cm] (use) {Ready to use}; + \path [line] (decide) -- node{no} (timeout); + \path [line] (wait2) -- (feed); + \path [line] (decide) -- node{yes} (use); - \node [start] (start) { Start with Initial Mixture }; - \node [block, right of=start, node distance = 3.2cm] (wait) { Wait\\ \qty{24}{\hour} }; - \node [decision, right of=wait, node distance = 3.2cm] (readycheck) { Ready? }; - \node [block, below of=wait, node distance = 3cm] (feed) { Feed the Mixture }; - \node [decision, right of=feed, node distance = 3.2cm] (limitcheck) { Failed? }; - \node [fail, right of=limitcheck, node distance = 3.2cm] (abort) { Discard All, Start Over }; - \node [success, right of=readycheck, node distance = 3.2cm] (final) { Done }; + \node [start, below of=discard, left of=discard] (start_n) { Start with Initial Mixture }; + \node [block, right of=start_n, node distance = 3.2cm] (wait_n) { Wait\\ \qty{24}{\hour} }; + \node [decision, right of=wait_n, node distance = 3.2cm] (readycheck_n) { Ready? }; + \node [block, below of=wait_n, node distance = 3cm] (feed_n) { Feed the Mixture }; + \node [decision, right of=feed_n, node distance = 3.2cm] (limitcheck_n) { Failed? }; + \node [fail, right of=limitcheck_n, node distance = 3.2cm] (abort_n) { Discard All, Start Over }; + \node [success, right of=readycheck_n, node distance = 3.2cm] (final_n) { Done }; - \draw [thick, -{Latex}] (start) -- (wait); - \draw [thick, -{Latex}] (wait) -- (readycheck); - \draw [thick, -{Latex}] (feed) -- (wait); - \draw [thick, -{Latex}] (readycheck) -- node { No } (limitcheck); - \draw [thick, -{Latex}] (limitcheck) -- node (feedok) { No } (feed) ; - \draw [thick, -{Latex}] (limitcheck) -- node { Yes } (abort); - \draw [thick, -{Latex}] (readycheck) -- node { Yes } (final); + \draw [thick, -{Latex}] (start_n) -- (wait_n); + \draw [thick, -{Latex}] (wait_n) -- (readycheck_n); + \draw [thick, -{Latex}] (feed_n) -- (wait_n); + \draw [thick, -{Latex}] (readycheck_n) -- node { No } (limitcheck_n); + \draw [thick, -{Latex}] (limitcheck_n) -- node (feedok_n) { No } (feed_n) ; + \draw [thick, -{Latex}] (limitcheck_n) -- node { Yes } (abort_n); + \draw [thick, -{Latex}] (readycheck_n) -- node { Yes } (final_n); - \node [below of=feedok, node distance=2.5cm] (details1) [shape=rectangle,draw,fill=white!90!black]{ - \begin{tabular}{c} + \node [below of=feedok_n, node distance=4.5cm] (details1) [shape=rectangle,draw,fill=white!90!black]{ + \begin{tabular}{l} \fontsize{7}{9}\selectfont For the \emph{Initial Mixture}, mix \qty{50}{\gram} flour/\qty{50}{\gram} water. \\ \fontsize{7}{9}\selectfont The Mixture is \emph{Ready} when it has \emph{grown}, has \emph{bubbles}, and \emph{smells} vinegary/yoghurty. \\ \fontsize{7}{9}\selectfont The Mixture has \emph{Failed} when you have fed it too many (eg 10) times without success. \\ \fontsize{7}{9}\selectfont To \emph{Feed the Mixture}, discard all but \qty{10}{\gram}, mix in \qty{50}{\gram} flour and \qty{50}{\gram} water. \end{tabular} - + }; + + \node [below of=details1, node distance=4.5cm, align=left] (details2) [shape=rectangle,draw,fill=white!90!black]{ + \fontsize{7}{9}\selectfont For the \emph{Initial Mixture}, mix + \qty{50}{\gram} flour/\qty{50}{\gram} water.\\ + \fontsize{7}{9}\selectfont The Mixture is \emph{Ready} when it has + \emph{grown}, has \emph{bubbles}, and \emph{smells} + vinegary/yoghurty. \\ + + \fontsize{7}{9}\selectfont The Mixture has \emph{Failed} when you + have fed it too many (eg 10) times without success.\\ + + \fontsize{7}{9}\selectfont To \emph{Feed the Mixture}, discard all but \qty{10}{\gram}, mix in \qty{50}{\gram} flour and \qty{50}{\gram} water. + }; \end{tikzpicture} From 2734d817115dd80154dc7c22c6c73aca5b1d99b3 Mon Sep 17 00:00:00 2001 From: Cedric Date: Sun, 5 Jan 2025 15:34:24 +0000 Subject: [PATCH 3/3] Add anohter example for the details node This is how I would have done it... at least kind of. --- book/figures/fig-starter-process.tex | 33 ++++++++++++++++++---------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/book/figures/fig-starter-process.tex b/book/figures/fig-starter-process.tex index 7364f6a..50b8c8b 100644 --- a/book/figures/fig-starter-process.tex +++ b/book/figures/fig-starter-process.tex @@ -42,17 +42,26 @@ \end{tabular} }; - \node [below of=details1, node distance=4.5cm, align=left] (details2) [shape=rectangle,draw,fill=white!90!black]{ - \fontsize{7}{9}\selectfont For the \emph{Initial Mixture}, mix - \qty{50}{\gram} flour/\qty{50}{\gram} water.\\ - \fontsize{7}{9}\selectfont The Mixture is \emph{Ready} when it has - \emph{grown}, has \emph{bubbles}, and \emph{smells} - vinegary/yoghurty. \\ +% Feel free to comment out and see how it looks similar to above +% \node [below of=details1, node distance=1.5cm, align=left] (details2) [shape=rectangle,draw,fill=white!90!black]{ +% \fontsize{7}{9}\selectfont For the \emph{Initial Mixture}, mix +% \qty{50}{\gram} flour/\qty{50}{\gram} water.\\ +% \fontsize{7}{9}\selectfont The Mixture is \emph{Ready} when it has +% \emph{grown}, has \emph{bubbles}, and \emph{smells} +% vinegary/yoghurty. \\ +% +% \fontsize{7}{9}\selectfont The Mixture has \emph{Failed} when you +% have fed it too many (eg 10) times without success.\\ +% +% \fontsize{7}{9}\selectfont To \emph{Feed the Mixture}, discard all but \qty{10}{\gram}, mix in \qty{50}{\gram} flour and \qty{50}{\gram} water. +% }; - \fontsize{7}{9}\selectfont The Mixture has \emph{Failed} when you - have fed it too many (eg 10) times without success.\\ - - \fontsize{7}{9}\selectfont To \emph{Feed the Mixture}, discard all but \qty{10}{\gram}, mix in \qty{50}{\gram} flour and \qty{50}{\gram} water. - - }; + \node [below of=details1, node distance=2.5cm] (detailsced) [shape=rectangle,draw,fill=white!90!black]{ + \begin{tabular}{@{}ll@{}} + \textbf{Initial Mixture}:& Mix \qty{50}{\gram} flour/\qty{50}{\gram} water. \\ + \textbf{Feed the Mixture}:& Discard all but \qty{10}{\gram}, mix in \qty{50}{\gram} flour and \qty{50}{\gram} water\\ + \textbf{Ready}:& The mixture has \emph{grown}, has \emph{bubbles}, and \emph{smells} vinegary/yoghurty. \\ + \textbf{Failed}: & The mixture has been fed too many (eg 10) times without success. \\ + \end{tabular} + }; \end{tikzpicture}