diff --git a/book/book.tex b/book/book.tex index 97bfb0f..3a16bcc 100644 --- a/book/book.tex +++ b/book/book.tex @@ -20,6 +20,9 @@ allcolors=black } +\usepackage{tikz} +\usetikzlibrary{shapes,arrows} + \graphicspath{ {./images/} {./troubleshooting/} @@ -36,6 +39,16 @@ \advance\cftsecnumwidth 0.5em\relax \advance\cftsubsecindent 0.5em\relax \advance\cftsubsecnumwidth 0.5em\relax + +% Define block styles +\tikzstyle{decision} = [diamond, draw, fill=blue!20, + text width=4.5em, text badly centered, node distance=3cm, inner sep=0pt] +\tikzstyle{block} = [rectangle, draw, fill=blue!20, + text width=5em, text centered, rounded corners, minimum height=4em] +\tikzstyle{line} = [draw, -latex'] +\tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=3cm, + minimum height=2em] + \begin{document} \begin{titlepage} diff --git a/book/sourdough-starter/sourdough-starter.tex b/book/sourdough-starter/sourdough-starter.tex index abd1048..77cfb85 100644 --- a/book/sourdough-starter/sourdough-starter.tex +++ b/book/sourdough-starter/sourdough-starter.tex @@ -131,7 +131,26 @@ use a glas and place another inverted one on top. The container shouldn't be airtight. You still want some gas exchange to be possible. \begin{figure}[!htb] - \includegraphics[width=\textwidth]{sourdough-starter-process.jpg} + \begin{tikzpicture}[node distance = 3cm, auto] + \node [block] (init) {\footnotesize Mix 50g flour + 50g water, stir}; + \node [block, right of=init, node distance=3cm] (wait1) {\footnotesize Wait 24 hours}; + \path [line] (init) -- (wait1); + \node [block, right of=wait1, node distance=3cm] (feed) {\footnotesize 50g of previous day + 50g water + 50g flour, stir}; + \path [line] (wait1) -- (feed); + \node [block, below of=feed] (discard) {\footnotesize Discard the rest}; + \path [line] (feed) -- (discard); + \node [decision, right of=feed, node distance=3.5cm] (decide) {\footnotesize Is good?}; + \node [decision, above of=decide, node distance=3cm] (timeout) {\footnotesize Less than 10 feeds?}; + \node [block, above of=feed, node distance=3cm] (wait2) {\footnotesize Wait 24 hours}; + \node [block, right of=timeout, node distance=3cm] (discard2) {\footnotesize Batch failed}; + \path [line] (timeout) -- node{no} (discard2); + \path [line] (timeout) -- node{yes} (wait2); + \path [line] (feed) -- (decide); + \node [block, right of=decide, node distance=3cm] (use) {\footnotesize Ready to use}; + \path [line] (decide) -- node{no} (timeout); + \path [line] (wait2) -- (feed); + \path [line] (decide) -- node{yes} (use); + \end{tikzpicture} \caption{The process of making a sourdough starter from scratch} \label{fig:sourdough-starter-process} \end{figure}