From 35a0a89765fe345e0e5149bcc5748b205b123d2d Mon Sep 17 00:00:00 2001 From: cedounet <134267244+cedounet@users.noreply.github.com> Date: Mon, 6 Jan 2025 07:52:45 +0000 Subject: [PATCH 01/28] Update readme (#419) * Move mixing seed from troubleshooting to mix-ins This was written way before the mix-ins sections, made sense back then but not so much anymore so moving it out. formatted text and added centering, labels etc while at it. * Update Readme based on latest makefile changes Website is now part of make bake/all ebook is around 20 MByte even in colour version so you can use kindle app to download release to your phone. For the full resolution version you need to build yourself. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 69e7818..5e02cf6 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ make ``` If you want to 🍞 bake all the versions including ebook variants (.pdf, .epub -in colour and size optimized Black&White), run: +in colour and size optimized Black&White, as well as website), run: ```console cd book/ @@ -80,7 +80,7 @@ There's an additional enhanced accessibility version using a sans-serif font: * [Download compiled sans-serif .pdf version](https://www.the-bread-code.io/book-sans-serif.pdf) An additional black and white ebook is provided with a greatly reduced file -size. This shrinks the book from more than 50MB down to ~5MB: +size. This shrinks the book from more than 20MB down to ~5MB: * [Download compiled B&W .epub version](https://www.the-bread-code.io/bw-book.epub) From 54461ec45e72a5609fe3b0b82a00ba023ae3c644 Mon Sep 17 00:00:00 2001 From: Cedric Date: Fri, 3 Jan 2025 08:25:12 +0000 Subject: [PATCH 02/28] Fix makefile standalone flowchart png generation --- book/figures/vars.tex | 1 + book/makefile | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/book/figures/vars.tex b/book/figures/vars.tex index b4bc120..d87e959 100644 --- a/book/figures/vars.tex +++ b/book/figures/vars.tex @@ -1,5 +1,6 @@ \documentclass[tikz]{standalone} \usepackage{tikz} +\usepackage{pgfplots} \usepackage[mode=match, reset-text-family=false]{siunitx} \DeclareSIUnit\degF{\text{°}F} \input{flowcharts_tikz.tex} diff --git a/book/makefile b/book/makefile index 788fa6f..57bfa2a 100644 --- a/book/makefile +++ b/book/makefile @@ -90,11 +90,10 @@ tgt_figures := $(patsubst %.tex, %.png,$(src_figures)) # TODO: check if it works on github CI %.png: %.tex - @echo "\input{./vars.tex}" > $@.in - # \b is backspace.. - @echo "\\\begin{document}" >> $@.in + @printf '%s\n' "\input{./vars.tex}" > $@.in + @printf '%s\n' "\begin{document}" >> $@.in @cat $< >> $@.in - @echo "\\\end{document}" >> $@.in + @printf '%s\n' "\end{document}" >> $@.in $(LATEX) $@.in figures/export_figures.sh $@.pdf From 127ca9423eb6cbca75e3e16529789b98e410bfd5 Mon Sep 17 00:00:00 2001 From: Cedric Date: Thu, 9 Jan 2025 21:04:40 +0000 Subject: [PATCH 03/28] Enable standalone chemical figures generation --- book/figures/vars.tex | 1 + 1 file changed, 1 insertion(+) diff --git a/book/figures/vars.tex b/book/figures/vars.tex index d87e959..e9555ff 100644 --- a/book/figures/vars.tex +++ b/book/figures/vars.tex @@ -1,6 +1,7 @@ \documentclass[tikz]{standalone} \usepackage{tikz} \usepackage{pgfplots} +\usepackage{chemfig} \usepackage[mode=match, reset-text-family=false]{siunitx} \DeclareSIUnit\degF{\text{°}F} \input{flowcharts_tikz.tex} From a87cc723a64700be7cd022785ad78902a7ec8a95 Mon Sep 17 00:00:00 2001 From: Cedric Date: Thu, 9 Jan 2025 21:18:02 +0000 Subject: [PATCH 04/28] Enable abbreviations in standalone flowcharts Spun the file out for inclusion basically... we want to be able to use \eg in flowcharts even when built standalone. Fixed dependencies in makefile as well --- book/abbreviations.tex | 4 ++++ book/figures/vars.tex | 1 + book/makefile | 4 ++-- book/sourdough.sty | 4 +--- 4 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 book/abbreviations.tex diff --git a/book/abbreviations.tex b/book/abbreviations.tex new file mode 100644 index 0000000..0cf5d34 --- /dev/null +++ b/book/abbreviations.tex @@ -0,0 +1,4 @@ +% Common abbreviations +\newcommand{\ie}{\emph{i.e.}\@ifnextchar.{\!\@gobble}{}} +\newcommand{\eg}{\emph{e.g.}\@ifnextchar.{\!\@gobble}{}} +\newcommand{\etc}{etc\@ifnextchar.{}{.\@}} diff --git a/book/figures/vars.tex b/book/figures/vars.tex index e9555ff..1f9c012 100644 --- a/book/figures/vars.tex +++ b/book/figures/vars.tex @@ -6,3 +6,4 @@ \DeclareSIUnit\degF{\text{°}F} \input{flowcharts_tikz.tex} \input{../colors.tex} +\input{../abbreviations.tex} diff --git a/book/makefile b/book/makefile index 57bfa2a..80ef205 100644 --- a/book/makefile +++ b/book/makefile @@ -35,13 +35,13 @@ chapters = baking basics bread-types cover flour-types history intro mix-ins\ src_tables := $(wildcard tables/table-*.tex) src_figures := $(wildcard figures/fig-*.tex) figures/flowcharts_tikz.tex -src_figures += $(wildcard plots/fig-*.tex) +src_figures += $(wildcard plots/fig-*.tex) abbreviations.tex colors.tex src_recipes := $(wildcard recipes/*.tex) src_plots := $(wildcard plots/*.table) src_tex := $(foreach directory, $(chapters), $(wildcard $(directory)/*.tex)) src_tex += book.tex book_sans_serif.tex references.bib figures/vars.tex -src_tex += supporters.csv sourdough.sty colors.tex +src_tex += supporters.csv sourdough.sty colors.tex abbreviations.tex src_tex += $(src_recipes) images := $(wildcard images/*/*.jpg) diff --git a/book/sourdough.sty b/book/sourdough.sty index 370e706..fe2f1ca 100644 --- a/book/sourdough.sty +++ b/book/sourdough.sty @@ -34,9 +34,7 @@ \DeclareTOCStyleEntry[numwidth=3em]{tocline}{table} % Common abbreviations -\newcommand{\ie}{\emph{i.e.}\@ifnextchar.{\!\@gobble}{}} -\newcommand{\eg}{\emph{e.g.}\@ifnextchar.{\!\@gobble}{}} -\newcommand{\etc}{etc\@ifnextchar.{}{.\@}} +\input{abbreviations.tex} % Consistent pH values \newcommand{\pHvalue}[1]{pH~\SI{#1}{}} From bf6a319e8f7bfa54be5738922fa978062761536e 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 05/28] Chang arrowheads to be cleaner LaTex style. Update flowcharts_tikz.tex to use arrows.meta instead of arrows, which is not nice and deprecated. --- book/figures/flowcharts_tikz.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/figures/flowcharts_tikz.tex b/book/figures/flowcharts_tikz.tex index b452217..54540ea 100644 --- a/book/figures/flowcharts_tikz.tex +++ b/book/figures/flowcharts_tikz.tex @@ -1,5 +1,5 @@ \tikzstyle{every picture}+=[font=\footnotesize\sffamily] -\usetikzlibrary{calc, shapes, arrows, decorations.pathreplacing, calligraphy, +\usetikzlibrary{calc, shapes, arrows.meta, decorations.pathreplacing, calligraphy, positioning} \tikzstyle{decision} = [diamond, draw=codeblack, fill=codeblack, text=white, text width=4.5em, text badly centered, node distance=3cm, inner sep=0pt, From 1166f6d9250e4495ebb0297daaff19e23e9cac97 Mon Sep 17 00:00:00 2001 From: Ramin Kamal <21167874+ramink@users.noreply.github.com> Date: Mon, 6 Jan 2025 21:28:49 -0800 Subject: [PATCH 06/28] Update all flowchart arrows to LaTeX arrows - Change tikzstyle definition for "line" so that all flowchart arrows have the "Latex" styling. --- book/figures/fig-stiff-starter-conversion.tex | 2 +- book/figures/flowcharts_tikz.tex | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/book/figures/fig-stiff-starter-conversion.tex b/book/figures/fig-stiff-starter-conversion.tex index 6e4f549..c8d54a0 100644 --- a/book/figures/fig-stiff-starter-conversion.tex +++ b/book/figures/fig-stiff-starter-conversion.tex @@ -11,7 +11,7 @@ \path [line] (init) -- (feed_new_ratio); \path [line] (feed_again) -- (feed_new_ratio); \path [line] (next_day) -- (ready_signs); - \path [line] (ready_signs) -- node{no} (feed_again |- last_feed) |- (feed_again.south); + \path [line] (ready_signs) -- node{no} (feed_again |- last_feed) -| (feed_again.south); \path [line] (ready_signs) -- node{yes} (last_feed); \path [line] (last_feed) -- node{after \qtyrange{6}{12}{\hour}} (bread_dough); \path [line] (feed_new_ratio) -- (too_dry); diff --git a/book/figures/flowcharts_tikz.tex b/book/figures/flowcharts_tikz.tex index 54540ea..c68219f 100644 --- a/book/figures/flowcharts_tikz.tex +++ b/book/figures/flowcharts_tikz.tex @@ -19,7 +19,8 @@ \tikzstyle{fail} = [rectangle, draw=codeblack, fill=redpic, text=black, text width=5em, text centered, rounded corners, minimum height=4em, line width=0.4mm] -\tikzstyle{line} = [draw, -latex', thick, ->,>=to] +% The arrowed connector line between nodes +\tikzstyle{line} = [draw, thick, ->, >={Latex}] \tikzstyle{BC} = [decorate, % Brace Calligraphic decoration={calligraphic brace, amplitude=3mm, raise=1mm}, From 2afe5cff49c9770a1904999cea83b89b744bcdd5 Mon Sep 17 00:00:00 2001 From: Ramin Kamal <21167874+ramink@users.noreply.github.com> Date: Fri, 3 Jan 2025 08:26:06 +0000 Subject: [PATCH 07/28] Rearrange starter process flowchart - Added an extra state for clarity - Made it more compact - Added details section --- book/figures/fig-starter-process.tex | 28 ++++++++++++++++ book/mwe.tex | 49 ++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 book/mwe.tex diff --git a/book/figures/fig-starter-process.tex b/book/figures/fig-starter-process.tex index 3eb529b..3fe0d6b 100644 --- a/book/figures/fig-starter-process.tex +++ b/book/figures/fig-starter-process.tex @@ -16,4 +16,32 @@ \path [line] (decide) -- node{no} (timeout); \path [line] (wait2) -- (feed); \path [line] (decide) -- node{yes} (use); + + \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 [line] (start_n) -- (wait_n); + \draw [line] (wait_n) -- (readycheck_n); + \draw [line] (feed_n) -- (wait_n); + \draw [line] (readycheck_n) -- node { No } (limitcheck_n); + \draw [line] (limitcheck_n) -- node (feedok_n) { No } (feed_n) ; + \draw [line] (limitcheck_n) -- node { Yes } (abort_n); + \draw [line] (readycheck_n) -- node { Yes } (final_n); + + \node [below of=feedok_n, node distance=2cm, align=left] (details2) [shape=rectangle,draw,fill=maingray]{ + For the \emph{Initial Mixture}, mix \qty{50}{\gram} flour/\qty{50}{\gram} water.\\ + The Mixture is \emph{Ready} when it has + \emph{grown}, has \emph{bubbles}, and \emph{smells} + vinegary/yoghurty. \\ + + The Mixture has \emph{Failed} when you + have fed it too many (\eg~10) times without success.\\ + + To \emph{Feed the Mixture}, discard all but \qty{10}{\gram}, mix in \qty{50}{\gram} flour and \qty{50}{\gram} water. + }; \end{tikzpicture} diff --git a/book/mwe.tex b/book/mwe.tex new file mode 100644 index 0000000..df44c1a --- /dev/null +++ b/book/mwe.tex @@ -0,0 +1,49 @@ +\documentclass[paper=a4, twoside=false, fontsize=12pt, parskip=half, + bibliography=totoc, listof=totoc]{scrbook} + +% General packages +\usepackage{pgfplots} +\usepackage{fontspec} +\usepackage[mode=match, reset-text-family=false]{siunitx} +\usepackage{fontspec} +\usepackage{calc} +\input{colors.tex} +% Define flowcharts macros independently so we can build them as png files +% for the website or something. This is supported in the makefile +\input{figures/flowcharts_tikz.tex} +% Fonts +\defaultfontfeatures{Scale=MatchLowercase, Ligatures=TeX} +% Define Semi-bold +\DeclareRobustCommand\sbseries{\fontseries{sb}\selectfont} +% Fonts for accessibility +\ifdefined\isaccessible + \setmainfont{Open Sans}[ + Scale=MatchLowercase] +\else + \setmainfont{TeX Gyre Pagella}[Scale=1.0] % Or Palatino Linotype, etc. + % TODO not available on github CI + % \setmonofont{Andale Mono}[Scale=MatchLowercase] +\fi +% Opens Sans in both case.. +\setsansfont{Open Sans}[ + Scale=MatchLowercase, + FontFace = {sb}{it}{* Semibold Italic}, + FontFace = {sb}{n}{*-semibold}] +\usepackage{layouts} + +\newcommand{\printsizes}{ + Width: \printinunitsof{in}\prntlen{\textwidth}in \\ + Height: \printinunitsof{in}\prntlen{\textheight}in +} + +\begin{document} +\begin{figure}[!htb] + \centering + \input{figures/fig-starter-process.tex} + \caption[Dough strength over time with kneading]{A schematic visualization + of gluten development in sourdoughs with different kneading techniques. + A combination of techniques can be utilized to achieve maximum dough + strength.}% + \label{fig:dough-strength-sourdough} +\end{figure} +\end{document} From 1ab7970708d27f165ac9c48cde2dfea1ff729880 Mon Sep 17 00:00:00 2001 From: Ramin Kamal <21167874+ramink@users.noreply.github.com> Date: Thu, 9 Jan 2025 15:45:54 -0800 Subject: [PATCH 08/28] Change "Repeat 3 times" elements to use "Latex" arrows --- book/figures/fig-liquid-starter-conversion.tex | 6 +++--- book/figures/fig-stiff-starter-conversion.tex | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/book/figures/fig-liquid-starter-conversion.tex b/book/figures/fig-liquid-starter-conversion.tex index 2954897..37fff5a 100644 --- a/book/figures/fig-liquid-starter-conversion.tex +++ b/book/figures/fig-liquid-starter-conversion.tex @@ -11,7 +11,7 @@ \path [line] (ready_signs) -- node{no} (feed_again); \path [line] (ready_signs) -- node[above=2pt]{~yes} (last_feed); \path [line] (last_feed) -- node{after \qtyrange{6}{12}{\hour}} (bread_dough); - \draw [thick, ->] ($ (feed_again.north) +(0.7cm, 1cm)$) arc (-45:220:1cm); - \node [anchor=north, text width=5em] at ($(feed_again.north west)+(1.8cm, 2.3cm)$) {Repeat 3~times}; - + % TODO: find a better way to position the Repeat 3 times text and arrow. Hard-coded values are finicky and don't work well across media. + \draw [line] ($ (feed_again.north) +(0.7cm, 1cm)$) arc (-45:220:1cm); + \node [anchor=north, text width=5em] at ($(feed_again.north west)+(1.55cm, 2.2cm)$) {Repeat 3~times}; \end{tikzpicture} diff --git a/book/figures/fig-stiff-starter-conversion.tex b/book/figures/fig-stiff-starter-conversion.tex index c8d54a0..1a6d9ab 100644 --- a/book/figures/fig-stiff-starter-conversion.tex +++ b/book/figures/fig-stiff-starter-conversion.tex @@ -19,6 +19,7 @@ \path [line] (too_dry) -- node{no} (next_day); \path [line] (too_dry) -- node{yes} (add_water); \path [line] (ready_signs) -- node{yes} (last_feed); - \draw [thick, <-] ($ (feed_again.east) +(2.1cm, 0.7cm)$) arc (-45:220:1cm); - \node [anchor=north, text width=5em] at ($(feed_again.east)+(2cm, 2cm)$) {Repeat 3~times}; + % TODO: find a better way to position the Repeat 3 times text and arrow. Hard-coded values are finicky and don't work well across media. + \draw [line] ($ (feed_again.east) +(0.7cm, 0.9cm)$) arc (220:-45:1cm); + \node [anchor=north, text width=5em] at ($(feed_again.east)+(1.9cm, 2cm)$) {Repeat 3~times}; \end{tikzpicture} From ae7c7fda8f1ac970698e060c524b5af5b0e8bf1b Mon Sep 17 00:00:00 2001 From: Ramin Kamal <21167874+ramink@users.noreply.github.com> Date: Thu, 9 Jan 2025 15:46:48 -0800 Subject: [PATCH 09/28] Change plots to use "Latex" arrows for the axes --- book/plots/fig-temperature-ambient.tex | 1 + book/plots/fig-temperature-surface.tex | 1 + book/plots/fig-yeast-sourdough-strength.tex | 1 + 3 files changed, 3 insertions(+) diff --git a/book/plots/fig-temperature-ambient.tex b/book/plots/fig-temperature-ambient.tex index c3d876f..9ca4351 100644 --- a/book/plots/fig-temperature-ambient.tex +++ b/book/plots/fig-temperature-ambient.tex @@ -6,6 +6,7 @@ major grid style={line width=.2pt,draw=gray!30}, axis x line=middle, axis y line=middle, + axis line style={-Latex}, width=\textwidth, height=0.5\textwidth, xmax=35, xmin=-0.1, diff --git a/book/plots/fig-temperature-surface.tex b/book/plots/fig-temperature-surface.tex index 8ddaf9e..a0a2090 100644 --- a/book/plots/fig-temperature-surface.tex +++ b/book/plots/fig-temperature-surface.tex @@ -6,6 +6,7 @@ major grid style={line width=.2pt,draw=gray!30}, axis x line=middle, axis y line=middle, + axis line style={-Latex}, width=\textwidth, height=0.5\textwidth, xmax=35, xmin=-0.1, diff --git a/book/plots/fig-yeast-sourdough-strength.tex b/book/plots/fig-yeast-sourdough-strength.tex index defaa62..77c34a5 100644 --- a/book/plots/fig-yeast-sourdough-strength.tex +++ b/book/plots/fig-yeast-sourdough-strength.tex @@ -7,6 +7,7 @@ \qty{60}{\percent}~hydration}, axis x line=middle, axis y line=middle, + axis line style={-Latex}, width=\textwidth, height=0.5\textwidth, xmax=44, xmin=-0.1, From d6c862eea4581c9f483f8ad6cc20aacf29f66bcc Mon Sep 17 00:00:00 2001 From: Ezekiel-DA Date: Fri, 10 Jan 2025 03:32:44 -0500 Subject: [PATCH 10/28] Correct reference to flowchart in dough strength section (#424) --- book/wheat-sourdough/wheat-sourdough.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/wheat-sourdough/wheat-sourdough.tex b/book/wheat-sourdough/wheat-sourdough.tex index ebe560c..8a90093 100644 --- a/book/wheat-sourdough/wheat-sourdough.tex +++ b/book/wheat-sourdough/wheat-sourdough.tex @@ -615,7 +615,7 @@ by adding water and kneading again. This is a great trick to make a more extensible dough with lower-gluten flour~\cite{bassinage+technique}. When machine kneading a dough, opt for the same technique shown in -figure~\ref{fig:wheat-sourdough-kneading-process}. Initially opt for a low +flowchart~\ref{fig:wheat-sourdough-kneading-process}. Initially opt for a low speed. This helps the homogenization process. After waiting to allow the flour to soak up the water, proceed on a higher speed setting. A good sign of a well-developed gluten network is From bbeef2d10f60a5883bdb554eb8c797633be95460 Mon Sep 17 00:00:00 2001 From: Steve Nicholson Date: Fri, 10 Jan 2025 05:47:50 -0800 Subject: [PATCH 11/28] Fix typos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit purĂ© -> purĂ©e Reference: https://www.merriam-webster.com/dictionary/puree Typo --- book/mix-ins/mix-ins.tex | 8 ++++---- book/storing-bread/storing-bread.tex | 4 ++-- book/wheat-sourdough/wheat-sourdough.tex | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/book/mix-ins/mix-ins.tex b/book/mix-ins/mix-ins.tex index c04bdbd..29308ca 100644 --- a/book/mix-ins/mix-ins.tex +++ b/book/mix-ins/mix-ins.tex @@ -26,10 +26,10 @@ to express yourself. \begin{figure}[htb!] \centering \includegraphics[width=\textwidth]{pumpkin-on-flour} - \caption[Pumpkin purĂ©]{A common mix-in technique is to replace some of - the dough's water with another liquid. In this case, purĂ©d pumpkin replaced - some of the water. When adding purĂ© to the dough only slowly add - additional water as the purĂ© slowly releases additional water to the + \caption[Pumpkin purĂ©e]{A common mix-in technique is to replace some of + the dough's water with another liquid. In this case, purĂ©ed pumpkin replaced + some of the water. When adding purĂ©e to the dough only slowly add + additional water as the purĂ©e slowly releases additional water to the dough.}% \end{figure} diff --git a/book/storing-bread/storing-bread.tex b/book/storing-bread/storing-bread.tex index 7c2569f..590d13d 100644 --- a/book/storing-bread/storing-bread.tex +++ b/book/storing-bread/storing-bread.tex @@ -7,7 +7,7 @@ later time. \end{quoting} A summary can be found in Table~\ref{table:bread-storage}, with details and -explanation in th rest of this chapter. +explanation in the rest of this chapter. \begin{table}[!htb] \centering \input{tables/table-storing-bread-overview.tex} @@ -120,4 +120,4 @@ A 2008 study hints that there might be some health benefits to freezing and toasting your bread. By doing so the starch molecules could become more resistant to digestion and thus lower your body's blood sugar -response by almost 40\%~\cite{freezing+toasting+bread}. \ No newline at end of file +response by almost 40\%~\cite{freezing+toasting+bread}. diff --git a/book/wheat-sourdough/wheat-sourdough.tex b/book/wheat-sourdough/wheat-sourdough.tex index 8a90093..3fc35f7 100644 --- a/book/wheat-sourdough/wheat-sourdough.tex +++ b/book/wheat-sourdough/wheat-sourdough.tex @@ -405,7 +405,7 @@ your dough. The warmer the temperature, the faster the process; the colder, the slower the process. While food is available, the microorganisms will reproduce and increase in -quantity. The process is a self-limiting: it stops when there is no +quantity. The process is self-limiting: it stops when there is no more food available. This can be compared to wine making where the yeast ultimately sporulates and dies as ethanol levels increase. The ethanol creates an environment that makes it impossible for other @@ -448,7 +448,7 @@ explained earlier, your bread dough is essentially a gigantic starter. The low inoculation rate allows the starter to regrow inside your main dough into a desirable balance. Furthermore, the enzymes have enough time to break down the flour. This also -allows me to skip the so-called autolysis step completely (more in the next chapter). +allows me to skip the so-called autolysis step completely (more in the next section). This greatly simplifies the whole process. \section{Autolysis}% @@ -465,7 +465,7 @@ The overall time that flour and water are in contact is extended. Thus you get t beneficial enzymatic reactions that improve the taste and characteristics of the dough. I~do not recommend autolysis as it adds an unnecessary step to the process. Instead, I~recommend the fermentolysis technique which will be covered in the -next chapter of this book. +next section of this book. The effects of autolysis are very interesting. Try to mix just flour and water and let that sit for a day. During the day, check the consistency of @@ -1563,7 +1563,7 @@ A reliable way to ensure consistent proofing is to opt for using a pH meter. By checking the amount of piled-up acidity you can ensure each of your doughs has the right amount of acidity. Opt for an iterative approach and check the pH for multiple proofing times. Find the pH -the value that creates the best bread for you. Once you have identified +value that creates the best bread for you. Once you have identified your perfect pH value you can resort to that number on all following doughs. See Table~\ref{table:sample-ph-values} for some sample pH values to follow. @@ -1610,7 +1610,7 @@ banneton should now be facing you. \label{fig:artistic-scoring} \end{figure} -The scoring cut for done at a \ang{45}~angle relative to the dough's +The scoring cut is done at a \ang{45}~angle relative to the dough's surface slightly off the dough's center. With the \ang{45}~angle cut the overlaying side will rise more in the oven than the other side. This way you will achieve a so-called \emph{ear} on the final bread. From 0a0d227611894c6345443b797fa41c48bd20e467 Mon Sep 17 00:00:00 2001 From: Ced Date: Sat, 11 Jan 2025 09:47:28 +0000 Subject: [PATCH 12/28] Remove words from spelling exceptions --- book/spelling_exceptions.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/book/spelling_exceptions.txt b/book/spelling_exceptions.txt index 2c5d9f7..c7ca60c 100644 --- a/book/spelling_exceptions.txt +++ b/book/spelling_exceptions.txt @@ -483,8 +483,6 @@ poolish pre preshape preshaping -purĂ© -purĂ©d purĂ©e pĂąte raffaella From c99efe6f205fc9420d039e60b28832b79d321149 Mon Sep 17 00:00:00 2001 From: Ced Date: Sat, 11 Jan 2025 10:01:21 +0000 Subject: [PATCH 13/28] Rephrase pumpkin puree water release warning --- book/mix-ins/mix-ins.tex | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/book/mix-ins/mix-ins.tex b/book/mix-ins/mix-ins.tex index 29308ca..d35ab00 100644 --- a/book/mix-ins/mix-ins.tex +++ b/book/mix-ins/mix-ins.tex @@ -26,11 +26,11 @@ to express yourself. \begin{figure}[htb!] \centering \includegraphics[width=\textwidth]{pumpkin-on-flour} - \caption[Pumpkin purĂ©e]{A common mix-in technique is to replace some of - the dough's water with another liquid. In this case, purĂ©ed pumpkin replaced - some of the water. When adding purĂ©e to the dough only slowly add - additional water as the purĂ©e slowly releases additional water to the - dough.}% + \caption[Pumpkin purĂ©e]{A popular method is to substitute part of the + dough's water with another liquid, such as purĂ©ed pumpkin. When + incorporating the purĂ©e, add any extra water gradually, as the purĂ©e + will release its own liquid into the dough over time.}% + \label{fig:pumpkin-on-flour} \end{figure} One approach to categorizing the mixins is to look at their respective shape. From 3a1b247bc46f3734520644f9d71b1be4e4c14e3d Mon Sep 17 00:00:00 2001 From: Ced Date: Sat, 11 Jan 2025 10:23:22 +0000 Subject: [PATCH 14/28] Reworked flowchart as per discussions --- book/figures/fig-starter-process.tex | 53 ++++++++-------------------- 1 file changed, 14 insertions(+), 39 deletions(-) diff --git a/book/figures/fig-starter-process.tex b/book/figures/fig-starter-process.tex index 3fe0d6b..7a5312b 100644 --- a/book/figures/fig-starter-process.tex +++ b/book/figures/fig-starter-process.tex @@ -1,47 +1,22 @@ \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, 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 }; + \node [start, below of=discard, left of=discard] (start_n) {Mix \qty{50}{\gram} flour + \qty{50}{\gram} water, stir}; + \node [block, right of=start_n, node distance = 3.5cm] (wait_n) {Wait\\ \qty{24}{\hour}}; + \node [decision, right of=wait_n, node distance = 3.5cm] (readycheck_n) {Ready?}; + \node [block, below of=wait_n, node distance = 3.2cm] (feed_n) {Feed the mixture }; + \node [decision, right of=feed_n, node distance = 3.5cm] (limitcheck_n) {>10 feeds?}; + \node [fail, right of=limitcheck_n, node distance = 3.5cm] (abort_n) {Discard all. Start over}; + \node [success, right of=readycheck_n, node distance = 3.5cm] (final_n) {Ready to use}; \draw [line] (start_n) -- (wait_n); \draw [line] (wait_n) -- (readycheck_n); \draw [line] (feed_n) -- (wait_n); - \draw [line] (readycheck_n) -- node { No } (limitcheck_n); - \draw [line] (limitcheck_n) -- node (feedok_n) { No } (feed_n) ; - \draw [line] (limitcheck_n) -- node { Yes } (abort_n); - \draw [line] (readycheck_n) -- node { Yes } (final_n); + \draw [line] (readycheck_n) -- node {No} (limitcheck_n); + \draw [line] (limitcheck_n) -- node (feedok_n) {No} (feed_n) ; + \draw [line] (limitcheck_n) -- node {Yes} (abort_n); + \draw [line] (readycheck_n) -- node {Yes} (final_n); - \node [below of=feedok_n, node distance=2cm, align=left] (details2) [shape=rectangle,draw,fill=maingray]{ - For the \emph{Initial Mixture}, mix \qty{50}{\gram} flour/\qty{50}{\gram} water.\\ - The Mixture is \emph{Ready} when it has - \emph{grown}, has \emph{bubbles}, and \emph{smells} - vinegary/yoghurty. \\ - - The Mixture has \emph{Failed} when you - have fed it too many (\eg~10) times without success.\\ - - 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=feedok_n, node distance=2cm, align=left] (details2) [shape=rectangle, draw, fill=maingray]{% + \textbf{Ready}: Mixture has \emph{grown}, has \emph{bubbles}, and \emph{smells} vinegary/yoghurty. \\ + \textbf{Feed the mixture}: Discard all but \qty{10}{\gram}, mix in \qty{50}{\gram} flour and \qty{50}{\gram} water. }; \end{tikzpicture} From 3069b5ff7c5b8cd5650b85a51d50fd7b38203ab6 Mon Sep 17 00:00:00 2001 From: Ced Date: Sat, 11 Jan 2025 10:24:41 +0000 Subject: [PATCH 15/28] Remove the MWE from git was added for the debug branches but shall not go to main. --- book/mwe.tex | 49 ------------------------------------ website/_bundle_install_done | 0 2 files changed, 49 deletions(-) delete mode 100644 book/mwe.tex delete mode 100644 website/_bundle_install_done diff --git a/book/mwe.tex b/book/mwe.tex deleted file mode 100644 index df44c1a..0000000 --- a/book/mwe.tex +++ /dev/null @@ -1,49 +0,0 @@ -\documentclass[paper=a4, twoside=false, fontsize=12pt, parskip=half, - bibliography=totoc, listof=totoc]{scrbook} - -% General packages -\usepackage{pgfplots} -\usepackage{fontspec} -\usepackage[mode=match, reset-text-family=false]{siunitx} -\usepackage{fontspec} -\usepackage{calc} -\input{colors.tex} -% Define flowcharts macros independently so we can build them as png files -% for the website or something. This is supported in the makefile -\input{figures/flowcharts_tikz.tex} -% Fonts -\defaultfontfeatures{Scale=MatchLowercase, Ligatures=TeX} -% Define Semi-bold -\DeclareRobustCommand\sbseries{\fontseries{sb}\selectfont} -% Fonts for accessibility -\ifdefined\isaccessible - \setmainfont{Open Sans}[ - Scale=MatchLowercase] -\else - \setmainfont{TeX Gyre Pagella}[Scale=1.0] % Or Palatino Linotype, etc. - % TODO not available on github CI - % \setmonofont{Andale Mono}[Scale=MatchLowercase] -\fi -% Opens Sans in both case.. -\setsansfont{Open Sans}[ - Scale=MatchLowercase, - FontFace = {sb}{it}{* Semibold Italic}, - FontFace = {sb}{n}{*-semibold}] -\usepackage{layouts} - -\newcommand{\printsizes}{ - Width: \printinunitsof{in}\prntlen{\textwidth}in \\ - Height: \printinunitsof{in}\prntlen{\textheight}in -} - -\begin{document} -\begin{figure}[!htb] - \centering - \input{figures/fig-starter-process.tex} - \caption[Dough strength over time with kneading]{A schematic visualization - of gluten development in sourdoughs with different kneading techniques. - A combination of techniques can be utilized to achieve maximum dough - strength.}% - \label{fig:dough-strength-sourdough} -\end{figure} -\end{document} diff --git a/website/_bundle_install_done b/website/_bundle_install_done deleted file mode 100644 index e69de29..0000000 From fa157c350eb299f3efedaa8d08b093337e2ba340 Mon Sep 17 00:00:00 2001 From: Ced Date: Sat, 11 Jan 2025 10:29:13 +0000 Subject: [PATCH 16/28] Use uppercase in flowcharts conditions --- book/figures/fig-bulk-fermentation.tex | 4 +- book/figures/fig-compet.tex | 54 +++++++++++++++++++ book/figures/fig-dutch-oven-process.tex | 8 +-- book/figures/fig-kneading-process.tex | 12 ++--- .../figures/fig-liquid-starter-conversion.tex | 2 +- book/figures/fig-proofing-process.tex | 12 ++--- book/figures/fig-shaping-process.tex | 4 +- book/figures/fig-starter-maintenance.tex | 16 +++--- book/figures/fig-starter-readiness.tex | 10 ++-- book/figures/fig-stiff-starter-conversion.tex | 10 ++-- book/figures/fig-wheat-sourdough-process.tex | 4 +- 11 files changed, 95 insertions(+), 41 deletions(-) create mode 100644 book/figures/fig-compet.tex diff --git a/book/figures/fig-bulk-fermentation.tex b/book/figures/fig-bulk-fermentation.tex index 5eb0a45..b46dc73 100644 --- a/book/figures/fig-bulk-fermentation.tex +++ b/book/figures/fig-bulk-fermentation.tex @@ -20,10 +20,10 @@ % Same tricks not to get double lines and also we do _not_ want arrows \path [draw, thick] (ph_value) -- node{} ++(2, 0); \path [draw, thick] (smell) -| node{} ++(2, 4); - \path [line] (dough_ready) -- node{yes} (divide_preshape); + \path [line] (dough_ready) -- node{Yes} (divide_preshape); \path [line] (dough_ready) |- node[right=3pt]{no} (dough_flattened); \path [line] (dough_flattened) |- node[right=3pt]{yes} (stretch_fold); - \path [line] (dough_flattened) -- node{no} (wait_60_minutes); + \path [line] (dough_flattened) -- node{No} (wait_60_minutes); \path [line] (stretch_fold) -- (wait_60_minutes); \path [line] (wait_60_minutes) -- (check_dough); \end{tikzpicture} diff --git a/book/figures/fig-compet.tex b/book/figures/fig-compet.tex new file mode 100644 index 0000000..244a5c1 --- /dev/null +++ b/book/figures/fig-compet.tex @@ -0,0 +1,54 @@ +\begin{tikzpicture}[node distance=1cm] + +% Left Side: Antifungal metabolites +% Bacteria +\draw[thick, fill=gray!20] (-2, 2.5) ellipse (1.2cm and 0.5cm); +\node at (-2, 3.2) {Antifungal metabolites}; + +% Arrows for antifungal metabolites +\foreach \x in {-2.5, -2, -1.5} + \draw[thick, ->] (\x, 2) -- (\x, 1.2); + +% Antifungal metabolites (triangles) +\foreach \x in {-2.5, -2, -1.5} + \node[fill=red!80!black, regular polygon, regular polygon sides=3, draw, scale=0.7] at (\x, 1.2) {}; + +% Fungi (left) +\draw[thick, fill=gray!50] (-2, 0.5) circle (0.5cm); +\node at (-2, -0.2) {Fungi}; + +% Right Side: Nutrient Competition +% Bacteria +\draw[thick, fill=gray!20] (3, 2.5) ellipse (1.2cm and 0.5cm); +\node at (3, 3.2) {Competition for nutrients}; + +% Arrows for nutrients +\foreach \x in {2.5, 3, 3.5} + \draw[thick, <-] (\x, 2) -- (\x, 1.2); + +% Available nutrients (triangles) +\foreach \x in {2.5, 3, 3.5} + \node[fill=green!80!black, regular polygon, regular polygon sides=3, draw, scale=0.7, rotate=180] at (\x, 1.2) {}; + +% Fungi (right) +\draw[thick, fill=gray!50] (3, 0.5) circle (0.5cm); +\node at (3, -0.2) {Fungi}; + +% Legends +% Bacteria legend +\draw[thick, fill=gray!20] (-5.5, -2) ellipse (0.8cm and 0.3cm); +\node[anchor=west] at (-5, -2) {Bacteria}; + +% Fungi legend +\draw[thick, fill=gray!50] (-5.5, -3) circle (0.3cm); +\node[anchor=west] at (-5, -3) {Fungi}; + +% Antifungal metabolites legend +\node[fill=red!80!black, regular polygon, regular polygon sides=3, draw, scale=0.7] at (-5.5, -4) {}; +\node[anchor=west] at (-5, -4) {Antifungal metabolites}; + +% Available nutrients legend +\node[fill=green!80!black, regular polygon, regular polygon sides=3, draw, scale=0.7, rotate=180] at (-5.5, -5) {}; +\node[anchor=west] at (-5, -5) {Available nutrients}; + +\end{tikzpicture} diff --git a/book/figures/fig-dutch-oven-process.tex b/book/figures/fig-dutch-oven-process.tex index d4f0fff..1230fc9 100644 --- a/book/figures/fig-dutch-oven-process.tex +++ b/book/figures/fig-dutch-oven-process.tex @@ -22,11 +22,11 @@ \path [line] (close) -- (back_oven); \path [line] (back_oven) -- (bake); \path [line] (bake.west) -- node{} ++(-2, 0) -| (is_ready_check.north); - \path [line] (is_ready_check) -- node{yes} (remove_do_lid); - \path [line] (is_ready_check) -- node{no} (wait_5_minutes); + \path [line] (is_ready_check) -- node{Yes} (remove_do_lid); + \path [line] (is_ready_check) -- node{No} (wait_5_minutes); \path [line] (wait_5_minutes.west) -- node{} ++(-1.5, 0) |- (is_ready_check.west); \path [line] (remove_do_lid) -- (dark_enough_decision); - \path [line] (dark_enough_decision) -- node{yes} (finish_baking); - \path [line] (dark_enough_decision) -- node{no} (bake_5_more_minutes); + \path [line] (dark_enough_decision) -- node{Yes} (finish_baking); + \path [line] (dark_enough_decision) -- node{No} (bake_5_more_minutes); \path [line] (bake_5_more_minutes.east) -- node{} ++(1, 0) -- node{} ++(0, 2.3) -| (dark_enough_decision.north); \end{tikzpicture} diff --git a/book/figures/fig-kneading-process.tex b/book/figures/fig-kneading-process.tex index 4a48db3..9c768bb 100644 --- a/book/figures/fig-kneading-process.tex +++ b/book/figures/fig-kneading-process.tex @@ -8,18 +8,18 @@ \path [line] (knead) -- (wait2); \node [decision, below of=wait2, node distance=4cm] (windowpane_test) {Window-pane?}; \path [line] (wait2) -- (windowpane_test); - \path [line] (windowpane_test.east) -- node{no} ++(1, 0) -- node{} ++(0, 5.7) -| (knead.north); + \path [line] (windowpane_test.east) -- node{No} ++(1, 0) -- node{} ++(0, 5.7) -| (knead.north); \node [decision] at (windowpane_test -| knead) (more_water) {Bassinage for more water?}; - \path [line] (windowpane_test) -- node{yes} (more_water); + \path [line] (windowpane_test) -- node{Yes} (more_water); \node [block] at (wait1 |- more_water) (add_water) {Add water}; - \path [line] (more_water) -- node{yes} (add_water); + \path [line] (more_water) -- node{Yes} (add_water); \path [line] (add_water.north east) -- (knead.south west); \node [decision, below of=more_water, node distance=4.5cm] (dough_sample) {Aliquot sample?}; - \path [line] (more_water) -- node{no} (dough_sample); + \path [line] (more_water) -- node{No} (dough_sample); \node [block] at (dough_sample -| wait2) (dough_ball) {Make round dough ball}; - \path [line] (dough_sample) -- node{no} (dough_ball); + \path [line] (dough_sample) -- node{No} (dough_ball); \node [block, below of=dough_sample] (extract_sample) {Extract sample}; - \path [line] (dough_sample) -- node{yes} (extract_sample); + \path [line] (dough_sample) -- node{Yes} (extract_sample); \path [line] (extract_sample.north east) -- (dough_ball.south west); \node [success, below of=dough_ball] (begin_bulk) {Begin bulk fermentation}; \path [line] (dough_ball) -- (begin_bulk); diff --git a/book/figures/fig-liquid-starter-conversion.tex b/book/figures/fig-liquid-starter-conversion.tex index 37fff5a..d4ffb16 100644 --- a/book/figures/fig-liquid-starter-conversion.tex +++ b/book/figures/fig-liquid-starter-conversion.tex @@ -8,7 +8,7 @@ \path [line] (init) -- (feed_new_ratio); \path [line] (feed_new_ratio) -- node{Wait \qty{24}{\hour}} (ready_signs); \path [line] (feed_again) -- node[anchor=east] {} ++(2.2,0) |- (feed_new_ratio); - \path [line] (ready_signs) -- node{no} (feed_again); + \path [line] (ready_signs) -- node{No} (feed_again); \path [line] (ready_signs) -- node[above=2pt]{~yes} (last_feed); \path [line] (last_feed) -- node{after \qtyrange{6}{12}{\hour}} (bread_dough); % TODO: find a better way to position the Repeat 3 times text and arrow. Hard-coded values are finicky and don't work well across media. diff --git a/book/figures/fig-proofing-process.tex b/book/figures/fig-proofing-process.tex index 7303ab4..bca52a4 100644 --- a/book/figures/fig-proofing-process.tex +++ b/book/figures/fig-proofing-process.tex @@ -7,14 +7,14 @@ \node [success, right of=dent_visible_decision, node distance=4cm] (bake) {Score and bake}; \node [block] at (retard_bake_decision |- poke) (wait_retard) {Wait\\ 15~minutes}; \node [block] at (wait_retard |- bake) (retard) {Proof in fridge at \qty{4}{\degreeCelsius} (\qty{40}{\degF})}; - \path [line] (init) -- node{yes} (poke); - \path [line] (init) -- node{no} (retard_bake_decision); + \path [line] (init) -- node{Yes} (poke); + \path [line] (init) -- node{No} (retard_bake_decision); \path [line] (poke) -- (dent_visible_decision); - \path [line] (dent_visible_decision) -- node{yes} (bake); - \path [line] (dent_visible_decision.west) -- node{no} ++(-1.4, 0) -- node{} (wait_poke.south); + \path [line] (dent_visible_decision) -- node{Yes} (bake); + \path [line] (dent_visible_decision.west) -- node{No} ++(-1.4, 0) -- node{} (wait_poke.south); \path [line] (wait_poke) -- (poke); - \path [line] (retard_bake_decision) -- node{yes} (wait_retard); - \path [line] (retard_bake_decision.east) -- node{no} ++(1, 0) |- node{} (retard.east); + \path [line] (retard_bake_decision) -- node{Yes} (wait_retard); + \path [line] (retard_bake_decision.east) -- node{No} ++(1, 0) |- node{} (retard.east); \path [line] (wait_retard) -- (retard); \path [line] (retard) -- (bake); \end{tikzpicture} diff --git a/book/figures/fig-shaping-process.tex b/book/figures/fig-shaping-process.tex index 65f9658..4f88d30 100644 --- a/book/figures/fig-shaping-process.tex +++ b/book/figures/fig-shaping-process.tex @@ -8,8 +8,8 @@ \node [block, right of=flour] (banneton) {Place upside down in banneton}; \node [success, right of=banneton] (proof) {Begin proofing}; \path [line] (init) -- (overfermented_decision); - \path [line] (overfermented_decision) -- node{yes} (overfermented); - \path [line] (overfermented_decision) -- node{no} (shaping_technique); + \path [line] (overfermented_decision) -- node{Yes} (overfermented); + \path [line] (overfermented_decision) -- node{No} (shaping_technique); \path [line] (shaping_technique) -- (flour); \path [line] (flour) -- (banneton); \path [line] (banneton) -- (proof); diff --git a/book/figures/fig-starter-maintenance.tex b/book/figures/fig-starter-maintenance.tex index ac5eb4c..8f856fc 100644 --- a/book/figures/fig-starter-maintenance.tex +++ b/book/figures/fig-starter-maintenance.tex @@ -4,8 +4,8 @@ \path [line] (init) -- (all_starter_used); \node [block, right of=init, node distance=3cm] (use_dough) {Take \qty{10}{\gram} of your bread dough}; \node [block, right of=all_starter_used, node distance=3cm] (use_starter) {Take all but not more than \qty{10}{\gram} of your starter}; - \path [line] (all_starter_used) -- node{yes} (use_dough); - \path [line] (all_starter_used) -- node{no} (use_starter); + \path [line] (all_starter_used) -- node{Yes} (use_dough); + \path [line] (all_starter_used) -- node{No} (use_starter); \node [block, right of=use_dough, node distance=3cm] (feed_starter) {Feed using 1:5:5 ratio}; \path [line] (use_dough) -- (feed_starter); \path [line] (use_starter) -- (feed_starter); @@ -13,20 +13,20 @@ \path [line] (feed_starter) -- (bake_next_day_check); \node [success, right of=bake_next_day_check, node distance=3.5cm] (make_bread_dough) {Make bread dough again after \qtyrange{8}{12}{\hour}}; - \path [line] (bake_next_day_check) -- node{yes} (make_bread_dough); + \path [line] (bake_next_day_check) -- node{Yes} (make_bread_dough); \node [decision, right of=use_starter, node distance=3cm] (bake_next_week_check) {Baking in next 2 weeks?}; \node [block, right of=bake_next_week_check, node distance=3.5cm] (store_fridge) {Store starter in fridge at \qty{4}{\degreeCelsius} (\qty{40}{\degF})}; - \path [line] (bake_next_week_check) -- node{yes} (store_fridge); + \path [line] (bake_next_week_check) -- node{Yes} (store_fridge); \node [success, right of=store_fridge, node distance=3cm] (feed_after_fridge) {Feed again using 1:5:5 ratio \qtyrange{8}{12}{\hour} before making dough}; \path [line] (store_fridge) -- (feed_after_fridge); - \path [line] (bake_next_day_check) -- node{no} (bake_next_week_check); + \path [line] (bake_next_day_check) -- node{No} (bake_next_week_check); \node [decision, below of=use_starter, node distance=3cm] (freezer_check) {Have a freezer?}; \path [line] (bake_next_week_check) -- (store_fridge); - \path [line] (bake_next_week_check) -- node{no} (freezer_check); + \path [line] (bake_next_week_check) -- node{No} (freezer_check); \node [block, right of=freezer_check, node distance=3cm] (dry_starter) {Dry your starter}; \node [block, below of=dry_starter, node distance=3cm] (freeze_starter) {Freeze your starter}; - \path [line] (freezer_check) -- node{no} (dry_starter); - \path [line] (freezer_check) -- node{yes} (freeze_starter); + \path [line] (freezer_check) -- node{No} (dry_starter); + \path [line] (freezer_check) -- node{Yes} (freeze_starter); \node [success, right of=dry_starter, node distance=3.5cm] (reactivate_freezer) {Reactivate starter for 3 days with daily 1:5:5 feedings}; \path [line] (dry_starter) -- (reactivate_freezer); \path [line] (freeze_starter) -- (reactivate_freezer); diff --git a/book/figures/fig-starter-readiness.tex b/book/figures/fig-starter-readiness.tex index 50a6212..fa874fa 100644 --- a/book/figures/fig-starter-readiness.tex +++ b/book/figures/fig-starter-readiness.tex @@ -23,16 +23,16 @@ {Prepare dough}; \path [line] (init) -- (decision_start); - \path [line] (decision_start) -- node{no} (feed_no_branch); + \path [line] (decision_start) -- node{No} (feed_no_branch); \path [line] (decision_start) -- node[below=2pt]{yes} (feed_yes_branch.north west); \path [line] (feed_yes_branch) -- (low_ratio); \path [line] (feed_no_branch) -- (high_ratio); \path [line] (high_ratio) -- node[anchor=east, above=2pt] {} ++(2.2,0) |-(size_check); \path [line] (low_ratio) -- (size_check); - \path [line] (size_check) -- node{no} (feed_yes_branch.south east); - \path [line] (size_check) -- node{yes} (smell_check); - \path [line] (smell_check) -- node{no} (feed_yes_branch.south west); - \path [line] (smell_check) -- node{yes} (make_dough); + \path [line] (size_check) -- node{No} (feed_yes_branch.south east); + \path [line] (size_check) -- node{Yes} (smell_check); + \path [line] (smell_check) -- node{No} (feed_yes_branch.south west); + \path [line] (smell_check) -- node{Yes} (make_dough); % braces \draw[BC] (size_check.south) -- diff --git a/book/figures/fig-stiff-starter-conversion.tex b/book/figures/fig-stiff-starter-conversion.tex index 1a6d9ab..b37928d 100644 --- a/book/figures/fig-stiff-starter-conversion.tex +++ b/book/figures/fig-stiff-starter-conversion.tex @@ -11,14 +11,14 @@ \path [line] (init) -- (feed_new_ratio); \path [line] (feed_again) -- (feed_new_ratio); \path [line] (next_day) -- (ready_signs); - \path [line] (ready_signs) -- node{no} (feed_again |- last_feed) -| (feed_again.south); - \path [line] (ready_signs) -- node{yes} (last_feed); + \path [line] (ready_signs) -- node{No} (feed_again |- last_feed) -| (feed_again.south); + \path [line] (ready_signs) -- node{Yes} (last_feed); \path [line] (last_feed) -- node{after \qtyrange{6}{12}{\hour}} (bread_dough); \path [line] (feed_new_ratio) -- (too_dry); \path [line] (add_water.north) -- node{} ++(0, 1.3) -| (too_dry.north); - \path [line] (too_dry) -- node{no} (next_day); - \path [line] (too_dry) -- node{yes} (add_water); - \path [line] (ready_signs) -- node{yes} (last_feed); + \path [line] (too_dry) -- node{No} (next_day); + \path [line] (too_dry) -- node{Yes} (add_water); + \path [line] (ready_signs) -- node{Yes} (last_feed); % TODO: find a better way to position the Repeat 3 times text and arrow. Hard-coded values are finicky and don't work well across media. \draw [line] ($ (feed_again.east) +(0.7cm, 0.9cm)$) arc (220:-45:1cm); \node [anchor=north, text width=5em] at ($(feed_again.east)+(1.9cm, 2cm)$) {Repeat 3~times}; diff --git a/book/figures/fig-wheat-sourdough-process.tex b/book/figures/fig-wheat-sourdough-process.tex index a549d83..660ae8b 100644 --- a/book/figures/fig-wheat-sourdough-process.tex +++ b/book/figures/fig-wheat-sourdough-process.tex @@ -13,8 +13,8 @@ \path [line] (mix_ingredients) -- (dough_strength); \path [line] (dough_strength) -- (bulk); \path [line] (bulk) -- (divide_test); - \path [line] (divide_test) -- node{yes} (shape); - \path [line] (divide_test) -- node{no} (divide); + \path [line] (divide_test) -- node{Yes} (shape); + \path [line] (divide_test) -- node{No} (divide); \path [line] (divide) -- (preshape); \path [line] (preshape) -- (shape); \path [line] (shape) -- (proof); From fe667b82e8a04d4001bdec4a5c2666e32bf396b9 Mon Sep 17 00:00:00 2001 From: Ced Date: Sat, 11 Jan 2025 11:01:49 +0000 Subject: [PATCH 17/28] Fix merge error in starter-process flowchart --- book/figures/fig-starter-process.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/figures/fig-starter-process.tex b/book/figures/fig-starter-process.tex index 7a5312b..fc6be06 100644 --- a/book/figures/fig-starter-process.tex +++ b/book/figures/fig-starter-process.tex @@ -1,5 +1,5 @@ \begin{tikzpicture}[node distance = 3.5cm, auto] - \node [start, below of=discard, left of=discard] (start_n) {Mix \qty{50}{\gram} flour + \qty{50}{\gram} water, stir}; + \node [start] (start_n) {Mix \qty{50}{\gram} flour + \qty{50}{\gram} water, stir}; \node [block, right of=start_n, node distance = 3.5cm] (wait_n) {Wait\\ \qty{24}{\hour}}; \node [decision, right of=wait_n, node distance = 3.5cm] (readycheck_n) {Ready?}; \node [block, below of=wait_n, node distance = 3.2cm] (feed_n) {Feed the mixture }; From 9ad48ea1a3fa5bcef52c4e77a735ae22a7f52d35 Mon Sep 17 00:00:00 2001 From: Ced Date: Sat, 11 Jan 2025 11:09:16 +0000 Subject: [PATCH 18/28] Fix more uppercase in flowcharts --- book/figures/fig-bulk-fermentation.tex | 4 ++-- book/figures/fig-liquid-starter-conversion.tex | 2 +- book/figures/fig-starter-readiness.tex | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/book/figures/fig-bulk-fermentation.tex b/book/figures/fig-bulk-fermentation.tex index b46dc73..3531320 100644 --- a/book/figures/fig-bulk-fermentation.tex +++ b/book/figures/fig-bulk-fermentation.tex @@ -21,8 +21,8 @@ \path [draw, thick] (ph_value) -- node{} ++(2, 0); \path [draw, thick] (smell) -| node{} ++(2, 4); \path [line] (dough_ready) -- node{Yes} (divide_preshape); - \path [line] (dough_ready) |- node[right=3pt]{no} (dough_flattened); - \path [line] (dough_flattened) |- node[right=3pt]{yes} (stretch_fold); + \path [line] (dough_ready) |- node[right=3pt]{No} (dough_flattened); + \path [line] (dough_flattened) |- node[right=3pt]{Yes} (stretch_fold); \path [line] (dough_flattened) -- node{No} (wait_60_minutes); \path [line] (stretch_fold) -- (wait_60_minutes); \path [line] (wait_60_minutes) -- (check_dough); diff --git a/book/figures/fig-liquid-starter-conversion.tex b/book/figures/fig-liquid-starter-conversion.tex index d4ffb16..bd8811c 100644 --- a/book/figures/fig-liquid-starter-conversion.tex +++ b/book/figures/fig-liquid-starter-conversion.tex @@ -9,7 +9,7 @@ \path [line] (feed_new_ratio) -- node{Wait \qty{24}{\hour}} (ready_signs); \path [line] (feed_again) -- node[anchor=east] {} ++(2.2,0) |- (feed_new_ratio); \path [line] (ready_signs) -- node{No} (feed_again); - \path [line] (ready_signs) -- node[above=2pt]{~yes} (last_feed); + \path [line] (ready_signs) -- node[above=2pt]{~Yes} (last_feed); \path [line] (last_feed) -- node{after \qtyrange{6}{12}{\hour}} (bread_dough); % TODO: find a better way to position the Repeat 3 times text and arrow. Hard-coded values are finicky and don't work well across media. \draw [line] ($ (feed_again.north) +(0.7cm, 1cm)$) arc (-45:220:1cm); diff --git a/book/figures/fig-starter-readiness.tex b/book/figures/fig-starter-readiness.tex index fa874fa..499485c 100644 --- a/book/figures/fig-starter-readiness.tex +++ b/book/figures/fig-starter-readiness.tex @@ -24,7 +24,7 @@ \path [line] (init) -- (decision_start); \path [line] (decision_start) -- node{No} (feed_no_branch); - \path [line] (decision_start) -- node[below=2pt]{yes} (feed_yes_branch.north west); + \path [line] (decision_start) -- node[below=2pt]{Yes} (feed_yes_branch.north west); \path [line] (feed_yes_branch) -- (low_ratio); \path [line] (feed_no_branch) -- (high_ratio); \path [line] (high_ratio) -- node[anchor=east, above=2pt] {} ++(2.2,0) |-(size_check); From c3904d2f14f4be8342464c20a3f63ac6711e6461 Mon Sep 17 00:00:00 2001 From: Ced Date: Sun, 12 Jan 2025 12:16:58 +0000 Subject: [PATCH 19/28] Delete rogue draft file --- book/figures/fig-compet.tex | 54 ------------------------------------- 1 file changed, 54 deletions(-) delete mode 100644 book/figures/fig-compet.tex diff --git a/book/figures/fig-compet.tex b/book/figures/fig-compet.tex deleted file mode 100644 index 244a5c1..0000000 --- a/book/figures/fig-compet.tex +++ /dev/null @@ -1,54 +0,0 @@ -\begin{tikzpicture}[node distance=1cm] - -% Left Side: Antifungal metabolites -% Bacteria -\draw[thick, fill=gray!20] (-2, 2.5) ellipse (1.2cm and 0.5cm); -\node at (-2, 3.2) {Antifungal metabolites}; - -% Arrows for antifungal metabolites -\foreach \x in {-2.5, -2, -1.5} - \draw[thick, ->] (\x, 2) -- (\x, 1.2); - -% Antifungal metabolites (triangles) -\foreach \x in {-2.5, -2, -1.5} - \node[fill=red!80!black, regular polygon, regular polygon sides=3, draw, scale=0.7] at (\x, 1.2) {}; - -% Fungi (left) -\draw[thick, fill=gray!50] (-2, 0.5) circle (0.5cm); -\node at (-2, -0.2) {Fungi}; - -% Right Side: Nutrient Competition -% Bacteria -\draw[thick, fill=gray!20] (3, 2.5) ellipse (1.2cm and 0.5cm); -\node at (3, 3.2) {Competition for nutrients}; - -% Arrows for nutrients -\foreach \x in {2.5, 3, 3.5} - \draw[thick, <-] (\x, 2) -- (\x, 1.2); - -% Available nutrients (triangles) -\foreach \x in {2.5, 3, 3.5} - \node[fill=green!80!black, regular polygon, regular polygon sides=3, draw, scale=0.7, rotate=180] at (\x, 1.2) {}; - -% Fungi (right) -\draw[thick, fill=gray!50] (3, 0.5) circle (0.5cm); -\node at (3, -0.2) {Fungi}; - -% Legends -% Bacteria legend -\draw[thick, fill=gray!20] (-5.5, -2) ellipse (0.8cm and 0.3cm); -\node[anchor=west] at (-5, -2) {Bacteria}; - -% Fungi legend -\draw[thick, fill=gray!50] (-5.5, -3) circle (0.3cm); -\node[anchor=west] at (-5, -3) {Fungi}; - -% Antifungal metabolites legend -\node[fill=red!80!black, regular polygon, regular polygon sides=3, draw, scale=0.7] at (-5.5, -4) {}; -\node[anchor=west] at (-5, -4) {Antifungal metabolites}; - -% Available nutrients legend -\node[fill=green!80!black, regular polygon, regular polygon sides=3, draw, scale=0.7, rotate=180] at (-5.5, -5) {}; -\node[anchor=west] at (-5, -5) {Available nutrients}; - -\end{tikzpicture} From eea69bb8546adec63688d453f8eaea4f4e7195fd Mon Sep 17 00:00:00 2001 From: Ramin Kamal <21167874+ramink@users.noreply.github.com> Date: Mon, 13 Jan 2025 09:35:40 -0800 Subject: [PATCH 20/28] Layout "Repeat 3 Times" loops in better way. --- book/figures/fig-liquid-starter-conversion.tex | 6 +++--- book/figures/fig-stiff-starter-conversion.tex | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/book/figures/fig-liquid-starter-conversion.tex b/book/figures/fig-liquid-starter-conversion.tex index bd8811c..c758ad8 100644 --- a/book/figures/fig-liquid-starter-conversion.tex +++ b/book/figures/fig-liquid-starter-conversion.tex @@ -11,7 +11,7 @@ \path [line] (ready_signs) -- node{No} (feed_again); \path [line] (ready_signs) -- node[above=2pt]{~Yes} (last_feed); \path [line] (last_feed) -- node{after \qtyrange{6}{12}{\hour}} (bread_dough); - % TODO: find a better way to position the Repeat 3 times text and arrow. Hard-coded values are finicky and don't work well across media. - \draw [line] ($ (feed_again.north) +(0.7cm, 1cm)$) arc (-45:220:1cm); - \node [anchor=north, text width=5em] at ($(feed_again.north west)+(1.55cm, 2.2cm)$) {Repeat 3~times}; + + \node [above of=feed_again, text width=5em, align=center, node distance=3cm] (repeat_text) {Repeat 3~times}; + \draw [line] ($(repeat_text) +(0, 1 cm)$) arc (90:420:1cm); \end{tikzpicture} diff --git a/book/figures/fig-stiff-starter-conversion.tex b/book/figures/fig-stiff-starter-conversion.tex index b37928d..fe8d3d9 100644 --- a/book/figures/fig-stiff-starter-conversion.tex +++ b/book/figures/fig-stiff-starter-conversion.tex @@ -19,7 +19,7 @@ \path [line] (too_dry) -- node{No} (next_day); \path [line] (too_dry) -- node{Yes} (add_water); \path [line] (ready_signs) -- node{Yes} (last_feed); - % TODO: find a better way to position the Repeat 3 times text and arrow. Hard-coded values are finicky and don't work well across media. - \draw [line] ($ (feed_again.east) +(0.7cm, 0.9cm)$) arc (220:-45:1cm); - \node [anchor=north, text width=5em] at ($(feed_again.east)+(1.9cm, 2cm)$) {Repeat 3~times}; + + \node [text width=5em, align=center] (repeat_text) at ($(feed_new_ratio)!0.5!(next_day)$) {Repeat 3~times}; + \draw [line] ($(repeat_text) +(0, 1 cm)$) arc (90:-210:1cm); \end{tikzpicture} From 427dcbfa372574f69b85bf3c873195d23215c206 Mon Sep 17 00:00:00 2001 From: Cedric Date: Sun, 12 Jan 2025 15:17:12 +0000 Subject: [PATCH 21/28] Use a sans-serif math font for pgfplots pgfplots uses math fonts for graphs ticks... and it looks weird when building sans serif. Not sure Fira is necessarily a great choice with open-sans but we have very little math so that should do... --- book/sourdough.sty | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/book/sourdough.sty b/book/sourdough.sty index fe2f1ca..d38a7cd 100644 --- a/book/sourdough.sty +++ b/book/sourdough.sty @@ -52,8 +52,9 @@ \DeclareRobustCommand\sbseries{\fontseries{sb}\selectfont} % Fonts for accessibility \ifdefined\isaccessible - \setmainfont{Open Sans}[ - Scale=MatchLowercase] + \usepackage[mathrm=sym]{unicode-math} + \setmathfont{Fira Math}[Scale=MatchLowercase] + \setmainfont{Open Sans}[Scale=MatchLowercase] \else \setmainfont{TeX Gyre Pagella}[Scale=1.0] % Or Palatino Linotype, etc. % TODO not available on github CI From 1b90bf669b52bef59f3cf152a5de3e6bfe97ae21 Mon Sep 17 00:00:00 2001 From: Cedric Date: Sat, 18 Jan 2025 15:14:34 +0000 Subject: [PATCH 22/28] Use sans-serif fonts with tex4ht This has to be done in the config file..: All fonts are suppressed in the --lua mode of TeX4ht, because we need to prevent the loading of OpenType fonts, which causes a fatal error.: https://tex.stackexchange.com/questions/705948/change-font-of-tikz-diagrams-in-html-produced-by-make4ht --- book/tex4ebook.cfg | 8 ++++++++ book/website.cfg | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/book/tex4ebook.cfg b/book/tex4ebook.cfg index 43adcf5..dffea80 100644 --- a/book/tex4ebook.cfg +++ b/book/tex4ebook.cfg @@ -11,4 +11,12 @@ \Configure{AddCss}{book-ebook.css} \Configure{CoverMimeType}{image/jpeg} \CoverMetadata{cover/cover-page.jpg} +\AddToHook{env/tikzpicture/begin}{\fontfamily{opensans-TLF}\selectfont} +\Configure{@HEAD}{\HCode{ +}} \EndPreamble diff --git a/book/website.cfg b/book/website.cfg index aa15921..f236b6e 100644 --- a/book/website.cfg +++ b/book/website.cfg @@ -9,6 +9,14 @@ }} \Configure{AddCss}{style.css} +\AddToHook{env/tikzpicture/begin}{\fontfamily{opensans-TLF}\selectfont} +\Configure{@HEAD}{\HCode{ +}} \ConfigureEnv{titlepage}{\ifvmode\IgnorePar\fi\EndP\HCode{
}}{\ifvmode\IgnorePar\fi\EndP\HCode{
}}{}{} % Mini TOC From 1b5d23a348ee5b6680fdf7914d189db5741312dd Mon Sep 17 00:00:00 2001 From: Hendrik Kleinwaechter Date: Mon, 20 Jan 2025 11:23:55 +0100 Subject: [PATCH 23/28] Fix duplicate font loading --- book/style.css | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/book/style.css b/book/style.css index b0ee324..ad0a49e 100644 --- a/book/style.css +++ b/book/style.css @@ -1,5 +1,3 @@ -@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;800&display=swap'); - :root{ --ff-sans: 'Open Sans', sans-serif; --fw-regular: 400; @@ -147,7 +145,6 @@ nav.TOC a, nav.TOC a:visited{ /* *** Colors *** */ /* ************** */ - body{ background-color: var(--c-beige); } @@ -254,6 +251,10 @@ figcaption.caption { display: block; } +.chapterToc a, .chapterToc, .likechapterToc a, .likechapterToc, .appendixToc a, .appendixToc, .addchapToc a { + font-weight: var(--fw-bold); +} + @media (max-width: 768px) { .toggle-menu-label { display: block; @@ -317,7 +318,7 @@ figcaption.caption { display: block; color: #000; font-size: 20px; - font-weight: bold; + font-weight: var(--fw-bold); } .chapterToc a, .sectionToc a, .subsectionToc a, .likechapterToc a { @@ -498,7 +499,7 @@ blockquote { border: 2px solid var(--c-black); color: var(--c-black); padding: 4px; - font-weight: bold; + font-weight: var(--fw-bold); text-decoration: none; } .crosslinks-bottom a.prev { From 6a2b334c2a6ec0aaab227f3a1dd4dc7188706075 Mon Sep 17 00:00:00 2001 From: Ced Date: Sat, 11 Jan 2025 18:57:34 +0000 Subject: [PATCH 24/28] Remove debug flag on default website build --- book/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/makefile b/book/makefile index 80ef205..8d55d1e 100644 --- a/book/makefile +++ b/book/makefile @@ -1,7 +1,7 @@ # Macros for commands LATEX := latexmk -cd -pdflua -lualatex="lualatex -interaction=nonstopmode" -synctex=1 -use-make EBOOK := tex4ebook --lua -d epub -f epub -c tex4ebook.cfg -B epub_build -WEBSITE := make4ht --lua -c website.cfg -a debug -uf html5+tidy+common_domfilters -B website_build +WEBSITE := make4ht --lua -c website.cfg -uf html5+tidy+common_domfilters -B website_build CLEAN := latexmk -cd -lualatex -c -use-make CHECK_1 := lacheck CHECK_2 := chktex From 9eaff81c49171e21c441d134bcefa7f1748626a1 Mon Sep 17 00:00:00 2001 From: Ced Date: Sat, 11 Jan 2025 19:02:27 +0000 Subject: [PATCH 25/28] Simplify the epub size check --- book/makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/book/makefile b/book/makefile index 8d55d1e..70faccb 100644 --- a/book/makefile +++ b/book/makefile @@ -13,7 +13,6 @@ REDUCE_PIC_COLOR := -quality 80\% RSYNC := rsync -au --exclude 'book.epub' --exclude '*.jpg' GIT := git --no-pager SPELL_CHECK := hunspell -t -l -d en_US -EPUBSIZE := `du -sb epub/low_res_book.epub | cut -f1` # We want bash as shell SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ @@ -304,7 +303,8 @@ release_serif: build_serif_pdf build_ebook build_bw_ebook build_low_res_ebook | cp book_serif/book.pdf release/TheBreadCode-The-Sourdough-Framework.pdf cp epub/bw_book.epub release/TheBreadCode-The-Sourdough-Framework-black-and-white.epub cp epub/low_res_book.epub release/TheBreadCode-The-Sourdough-Framework.epub - @if [ $(EPUBSIZE) -gt 49500000 ]; then \ + # Kindle does not allow files larger than 50 MB... so let's check + @if [ `du -sb epub/low_res_book.epub | cut -f1` -gt 49500000 ]; then \ echo "ERROR: epub File too big"; \ exit 1; \ fi From d37e2aa4bcb668ff9ff216fcad8df0b1c4670c6e Mon Sep 17 00:00:00 2001 From: Ced Date: Sat, 11 Jan 2025 20:05:34 +0000 Subject: [PATCH 26/28] Reorder and add comments in makefile Also added markers {{{ for folding --- book/makefile | 354 ++++++++++++++++++++++++++++---------------------- 1 file changed, 198 insertions(+), 156 deletions(-) diff --git a/book/makefile b/book/makefile index 70faccb..ed3dce6 100644 --- a/book/makefile +++ b/book/makefile @@ -1,4 +1,4 @@ -# Macros for commands +# Macros for commands {{{ LATEX := latexmk -cd -pdflua -lualatex="lualatex -interaction=nonstopmode" -synctex=1 -use-make EBOOK := tex4ebook --lua -d epub -f epub -c tex4ebook.cfg -B epub_build WEBSITE := make4ht --lua -c website.cfg -uf html5+tidy+common_domfilters -B website_build @@ -24,25 +24,35 @@ LATEX += -diagnostics EBOOK += -a debug WEBSITE += -a debug endif +# }}} -website_dir := static_website_html +# Default target is not all because most of the time we just want a pdf... +# and building everything take a long time. +.DEFAULT_GOAL := build_serif_pdf -# List all files that are dependencies +# List all files that are dependencies {{{ chapters = baking basics bread-types cover flour-types history intro mix-ins\ non-wheat-sourdough sourdough-starter storing-bread troubleshooting\ wheat-sourdough glossary +# Actual book text and LaTeX code {{{ +src_tex := $(foreach directory, $(chapters), $(wildcard $(directory)/*.tex)) +src_tex += book.tex book_sans_serif.tex references.bib figures/vars.tex +src_tex += supporters.csv sourdough.sty colors.tex abbreviations.tex +src_tex += $(src_recipes) +# }}} + +# Tables and TikZ flowcharts/plots/drawings... {{{ src_tables := $(wildcard tables/table-*.tex) src_figures := $(wildcard figures/fig-*.tex) figures/flowcharts_tikz.tex src_figures += $(wildcard plots/fig-*.tex) abbreviations.tex colors.tex src_recipes := $(wildcard recipes/*.tex) src_plots := $(wildcard plots/*.table) +# }}} -src_tex := $(foreach directory, $(chapters), $(wildcard $(directory)/*.tex)) -src_tex += book.tex book_sans_serif.tex references.bib figures/vars.tex -src_tex += supporters.csv sourdough.sty colors.tex abbreviations.tex -src_tex += $(src_recipes) +tgt_figures := $(patsubst %.tex, %.png,$(src_figures)) +# Photos {{{ images := $(wildcard images/*/*.jpg) images += $(wildcard images/*.jpg) images += $(wildcard images/*.png) @@ -56,37 +66,30 @@ images += $(foreach directory, $(chapters), $(wildcard $(directory)/*/*.png)) # images to lower resolution and greyscale bw_images := $(addprefix bw-book-epub/OEBPS/, $(images)) -# For lower res colour ebook we would not convert png as it only get worst -# we will copy them instead... so remove them as a dependency. +# For lower resolution colour ebook (see below) we will not convert png as it +# only get worst we will copy them instead... so remove them as a dependency. low_res_images := $(addprefix low-res-book-epub/OEBPS/, $(images)) low_res_images := $(filter-out %.png, $(low_res_images)) +# }}} +# All together. src_all := $(src_tex) $(src_figures) $(src_tables) $(images) $(src_plots) +# And format specific configurations ebook_src := $(src_all) tex4ebook.cfg book.mk4 book-ebook.css website_src := $(src_all) website.cfg style.css - -# This is more than what is actually needed but keeps the makefile simple -# and latexmk will handle the rest -booklet_src := $(src_figures) $(src_tables) $(src_recipes) $(images) -booklet_src += booklet.tex - +website_dir := static_website_html website_assets := $(wildcard ../website/assets/*) ruby_src := ../website/modify_build.rb $(website_assets) ruby_pkg := ../website/Gemfile ../website/Gemfile.lock -tgt_figures := $(patsubst %.tex, %.png,$(src_figures)) - -# Default target is not all because most of the time we just want a pdf... -# and ebook take a long time to build. -.DEFAULT_GOAL := build_serif_pdf - -# Default rules for pdf and ebooks, getting overwritten when built in a -# sub-directory -%.pdf: %.tex - $(LATEX) $< +# This is more than what is actually needed but keeps the makefile simple +booklet_src := $(src_figures) $(src_tables) $(src_recipes) $(images) +booklet_src += booklet.tex +# }}} +# Flowcharts {{{ # TODO: check if it works on github CI %.png: %.tex @printf '%s\n' "\input{./vars.tex}" > $@.in @@ -98,12 +101,12 @@ tgt_figures := $(patsubst %.tex, %.png,$(src_figures)) %.xbb: %.jpg ebb -x $< +# }}} -# We don't want to use latexmk as there is no biber nor references and it -# seems to make it somehow unhappy -booklet/booklet.pdf: $(booklet_src) - mkdir -p booklet - lualatex --output-directory=booklet booklet.tex +# pdf {{{ +# Default rules for pdf, getting overwritten when built in a sub-directory +%.pdf: %.tex + $(LATEX) $< book_serif/book.pdf: $(src_all) $(LATEX) -output-directory=book_serif book.tex @@ -111,16 +114,25 @@ book_serif/book.pdf: $(src_all) book_sans_serif/book_sans_serif.pdf: $(src_all) $(LATEX) -output-directory=book_sans_serif book_sans_serif.tex -.PHONY: copy_ebook_files copy_ebook_files_low_res +# We don't want to use latexmk as there is no biber nor references and it +# seems to make it somehow unhappy +booklet/booklet.pdf: $(booklet_src) + mkdir -p booklet + lualatex --output-directory=booklet booklet.tex +# }}} +# Ebook {{{ +################################### +.PHONY: copy_ebook_files copy_ebook_files_low_res epub/%.epub: %.tex $(ebook_src) cover/cover-page.xbb $(EBOOK) $< -copy_ebook_files: build_ebook - $(RSYNC) --exclude '*.png' epub_build/book-epub/ bw-book-epub/ - -copy_ebook_files_low_res: build_ebook - $(RSYNC) epub_build/book-epub/ low-res-book-epub/ +# Now that we have built the ebook we will generate 2 more versions +# +# 1) With kindle app on phone we want a colour version with size < 50 MB +# 2) A black-white version for actual eink readers +# +# In both cases we just convert images and repack the ebpub # We do not convert SVG to B&W or lower res for now as they are super small # anyway @@ -132,23 +144,158 @@ bw-book-epub/OEBPS/%.png: %.png mkdir -p $(dir $@) $(CONVERT_PIC) $< $(REDUCE_PIC) $@ -low-res-book-epub/OEBPS/%.jpg: %.jpg - mkdir -p $(dir $@) - $(CONVERT_PIC) $< $(REDUCE_PIC_COLOR) $@ - epub/bw_book.epub: copy_ebook_files $(bw_images) cd bw-book-epub; zip -q0X ../epub/bw_book.epub mimetype cd bw-book-epub; zip -q9XrD ../epub/bw_book.epub ./ +# Now the low res +copy_ebook_files: build_ebook + $(RSYNC) --exclude '*.png' epub_build/book-epub/ bw-book-epub/ + +low-res-book-epub/OEBPS/%.jpg: %.jpg + mkdir -p $(dir $@) + $(CONVERT_PIC) $< $(REDUCE_PIC_COLOR) $@ + epub/low_res_book.epub: copy_ebook_files_low_res $(low_res_images) cd low-res-book-epub; zip -q0X ../epub/low_res_book.epub mimetype cd low-res-book-epub; zip -q9XrD ../epub/low_res_book.epub ./ +#}}} -# Now with the rules +# Website {{{ +################################### +.PHONY: html website +$(website_dir)/book_sans_serif.html: $(website_src) cover/cover-page.xbb + $(WEBSITE) -d $(website_dir) book_sans_serif.tex + +html: $(website_dir)/book_sans_serif.html + cp $< $(website_dir)/index.html + +# Because packages will be installed in hard to predict places use a file as +# marker.. +../website/_bundle_install_done: $(ruby_pkg) + -rm ../website/$@ + cd ../website && bundle install + touch ../website/$@ + +# TODO: this will run every single time, but is so fast we don't really care +website: html ../website/_bundle_install_done $(ruby_src) + cd ../website && ruby modify_build.rb +#}}} + +# Figures only {{{ +################################### +.PHONY: export_figures +# Requires that you have docker running on your computer. +export_figures: build_pdf $(tgt_figures) + cd figures/ && bash export_figures.sh +# }}} + +# Now with the rules {{{ # Expected usual rules first .PHONY: all all: bake +# Finally actual project targets (i.e. build pdf and ebooks) +.PHONY: build_pdf build_booklet build_serif_pdf build_sans_serif_pdf build_ebook + +pdf: build_serif_pdf build_sans_serif_pdf +build_pdf: pdf + +booklet: booklet/booklet.pdf +build_booklet: booklet + +serif: book_serif/book.pdf +build_serif_pdf: serif + +sans_serif: book_sans_serif/book_sans_serif.pdf +build_sans_serif_pdf: sans_serif + +ebook: epub/book_sans_serif.epub +build_ebook: ebook + +bw_ebook: epub/bw_book.epub +build_bw_ebook: bw_ebook + +low_res_ebook: epub/low_res_book.epub +build_low_res_ebook: low_res_ebook + +# top level releases rules +.PHONY: bake release_serif release_sans_serif + +bake: release_serif release_sans_serif release_booklet website + +release: + mkdir -p release + +release_serif: build_serif_pdf build_ebook build_bw_ebook build_low_res_ebook | release + cp book_serif/book.pdf release/TheBreadCode-The-Sourdough-Framework.pdf + cp epub/bw_book.epub release/TheBreadCode-The-Sourdough-Framework-black-and-white.epub + cp epub/low_res_book.epub release/TheBreadCode-The-Sourdough-Framework.epub + # Kindle does not allow files larger than 50 MB... so let's check + @if [ `du -sb epub/low_res_book.epub | cut -f1` -gt 49500000 ]; then \ + echo "ERROR: epub File too big"; \ + exit 1; \ + fi + +release_sans_serif: build_sans_serif_pdf | release + cp book_sans_serif/book_sans_serif.pdf release/TheBreadCode-The-Sourdough-Framework-sans-serif.pdf + +release_booklet: build_booklet | release + cp booklet/booklet.pdf release/TheBreadCode-The-Sourdough-Framework-booklet.pdf +# }}} + +# Clean up {{{ +################################### + +# delete generated files +.PHONY: clean_figures clean_ebook_build clean_website_build clean mrproper +clean_figures: + -$(CLEAN) $(patsubst %.tex, %.png.in, $(src_figures)) + -rm $(patsubst %.tex, %.png.pdf, $(src_figures)) + -rm $(patsubst %.tex, %.png.in, $(src_figures)) + -rm $(wildcard figures/*.png.*) + -rm cover/cover-page.xbb + +clean_ebook_build: + -rm epub_build/book*.{4ct,4tc,aux,bbl,bcf,blg,dvi,fdb_latexmk,fls,html} + -rm epub_build/book*.{idv,lg,loc,log,ncx,run.xml,tmp,xref} + -rm epub_build/book*x.svg + -rm epub_build/book.css + -rm epub_build/content.opf + -rm epub_build/book-epub/mimetype + -rm -rf epub_build/book-epub/META-INF + -rm -rf epub_build/book-epub/OEBPS + +clean_website_build: + -rm website_build/book*.{4ct,4tc,aux,bbl,bcf,blg,dvi,fdb_latexmk,fls,html} + -rm website_build/book*.{idv,lg,loc,log,ncx,run.xml,tmp,xref} + -rm website_build/book.{loc,dlog} + +clean: clean_ebook_build clean_figures clean_website_build + $(CLEAN) -output-directory=book_serif book.tex + $(CLEAN) -output-directory=book_sans_serif book_sans_serif.tex + $(CLEAN) -output-directory=booklet booklet.tex + -rm book*/*.{bbl,loc,run.xml} + +mrproper: clean + $(CLEAN) -C $(src_figures) + $(CLEAN) -C -output-directory=book_serif book.tex + $(CLEAN) -C -output-directory=book_sans_serif book_sans_serif.tex + $(CLEAN) -C -output-directory=booklet booklet.tex + -rm figures/*.png + -rm -rf epub/ + -rm -rf release/ + -rm -rf book_serif/ + -rm -rf book_sans_serif/ + -rm -rf booklet/ + -rm -rf *book-epub/ + -rm -rf epub_build/ + -rm -rf website_build/ + -rm -rf $(website_dir) +#}}} + +# Help {{{ +################################### .PHONY: help help: @echo "" @@ -204,30 +351,13 @@ help: @echo " print-X: print makefile variable X" @echo "" @echo "set DEBUG i.e make DEBUG=1 build_ebook to add debug flags to commands" +# }}} +# Debug Stuff from now on {{{ +################################### -# Finally actual project targets (i.e. build pdf and ebooks) -.PHONY: build_pdf build_booklet build_serif_pdf build_sans_serif_pdf build_ebook - -build_pdf: build_serif_pdf build_sans_serif_pdf - -build_booklet: booklet/booklet.pdf - -build_serif_pdf: book_serif/book.pdf - -build_sans_serif_pdf: book_sans_serif/book_sans_serif.pdf - -build_ebook: epub/book.epub - -build_bw_ebook: epub/bw_book.epub - -build_low_res_ebook: epub/low_res_book.epub - -.PHONY: export_figures check tex-check spell-check -# Requires that you have docker running on your computer. -export_figures: build_pdf $(tgt_figures) - cd figures/ && bash export_figures.sh - +# Verify your spelling and TeX warnings {{{ +.PHONY: check tex-check spell-check # Goal is not really to have 0 warning reported but we should check we don't # add many and if we do, we know they are false positive check: spell-check tex-check @@ -239,104 +369,14 @@ tex-check: $(src_tex) @echo "Running: " $(CHECK_2) $(CHECK_2) book.tex +# Should be 0 if not and you are really sure update the exception file spell-check: $(src_tex) spelling_exceptions.txt # Generate exceptions this way to avoid false positives # hunspell -t -l -d en_US **/*.tex *.csv *.sty *.sty | cut -f 2 -d ':' | sort -u > spelling_exceptions.txt $(SPELL_CHECK) -p spelling_exceptions.txt $(src_tex) +#}}} - -# Clean up and delete generated files -.PHONY: clean_figures clean_ebook_build clean_website_build clean mrproper -clean_figures: - -$(CLEAN) $(patsubst %.tex, %.png.in, $(src_figures)) - -rm $(patsubst %.tex, %.png.pdf, $(src_figures)) - -rm $(patsubst %.tex, %.png.in, $(src_figures)) - -rm $(wildcard figures/*.png.*) - -rm cover/cover-page.xbb - -clean_ebook_build: - -rm epub_build/book*.{4ct,4tc,aux,bbl,bcf,blg,dvi,fdb_latexmk,fls,html} - -rm epub_build/book*.{idv,lg,loc,log,ncx,run.xml,tmp,xref} - -rm epub_build/book*x.svg - -rm epub_build/book.css - -rm epub_build/content.opf - -rm epub_build/book-epub/mimetype - -rm -rf epub_build/book-epub/META-INF - -rm -rf epub_build/book-epub/OEBPS - -clean_website_build: - -rm website_build/book*.{4ct,4tc,aux,bbl,bcf,blg,dvi,fdb_latexmk,fls,html} - -rm website_build/book*.{idv,lg,loc,log,ncx,run.xml,tmp,xref} - -rm website_build/book.{loc,dlog} - -clean: clean_ebook_build clean_figures clean_website_build - $(CLEAN) -output-directory=book_serif book.tex - $(CLEAN) -output-directory=book_sans_serif book_sans_serif.tex - $(CLEAN) -output-directory=booklet booklet.tex - -rm book*/*.{bbl,loc,run.xml} - -mrproper: clean - $(CLEAN) -C $(src_figures) - $(CLEAN) -C -output-directory=book_serif book.tex - $(CLEAN) -C -output-directory=book_sans_serif book_sans_serif.tex - $(CLEAN) -C -output-directory=booklet booklet.tex - -rm figures/*.png - -rm -rf epub/ - -rm -rf release/ - -rm -rf book_serif/ - -rm -rf book_sans_serif/ - -rm -rf booklet/ - -rm -rf *book-epub/ - -rm -rf epub_build/ - -rm -rf website_build/ - -rm -rf $(website_dir) - -# top level releases rules -.PHONY: bake release_serif release_sans_serif - -bake: release_serif release_sans_serif release_booklet website - -release: - mkdir -p release - -release_serif: build_serif_pdf build_ebook build_bw_ebook build_low_res_ebook | release - cp book_serif/book.pdf release/TheBreadCode-The-Sourdough-Framework.pdf - cp epub/bw_book.epub release/TheBreadCode-The-Sourdough-Framework-black-and-white.epub - cp epub/low_res_book.epub release/TheBreadCode-The-Sourdough-Framework.epub - # Kindle does not allow files larger than 50 MB... so let's check - @if [ `du -sb epub/low_res_book.epub | cut -f1` -gt 49500000 ]; then \ - echo "ERROR: epub File too big"; \ - exit 1; \ - fi - -release_sans_serif: build_sans_serif_pdf | release - cp book_sans_serif/book_sans_serif.pdf release/TheBreadCode-The-Sourdough-Framework-sans-serif.pdf - -release_booklet: build_booklet | release - cp booklet/booklet.pdf release/TheBreadCode-The-Sourdough-Framework-booklet.pdf - -# Website stuff -.PHONY: html website -$(website_dir)/book.html: $(website_src) cover/cover-page.xbb - $(WEBSITE) -d $(website_dir) book.tex - -html: $(website_dir)/book.html - cp $< $(website_dir)/index.html - -# Because packages will be installed in hard to predict places use a file as -# marker.. -../website/_bundle_install_done: $(ruby_pkg) - -rm ../website/$@ - cd ../website && bundle install - touch ../website/$@ - -# TODO: this will run every single time, but is so fast we don't really care -website: html ../website/_bundle_install_done $(ruby_src) - cd ../website && ruby modify_build.rb - -# Debug Stuff from now on .PHONY: quick quick_ebook show_tools_version printvars - # Those 2 targets allow fast debug cycles but not resolving references etc # They also ignore dependencies and run each time you call them. quick: # run latex only once no biber, no references etc... @@ -348,7 +388,7 @@ quick_booklet: quick_ebook: cover/cover-page.xbb # run latex only once no biber, ref etc... $(EBOOK) --mode draft book.tex -show_tools_version: # Show version of tools used on the build machine +show_tools_version: # Show version of tools used on the build machine {{{ - $(GIT) log -1 --pretty=%B @echo "" - uname -a @@ -383,6 +423,7 @@ show_tools_version: # Show version of tools used on the build machine - $(CONVERT_PIC) --version @echo "" - rsync --version +# }}} # You can find the value of variable X with the following command: # make print-X @@ -392,3 +433,4 @@ printvars: # Print all variables in the makefile @$(foreach V,$(sort $(.VARIABLES)), \ $(if $(filter-out environ% default automatic, \ $(origin $V)),$(info $V=$($V) ($(value $V))))) +# }}} From 157cbb03b7624a0c45ce5a88d13625b4de976312 Mon Sep 17 00:00:00 2001 From: Ced Date: Sat, 11 Jan 2025 20:56:00 +0000 Subject: [PATCH 27/28] Modernize target names in makefile Names might have made sense at some point... but not so sure anymore build_pdf => pdf build_booklet => booklet build_serif_pdf => serif build_sans_serif_pdf => sans_serif build_ebook => ebook build_bw_ebook => bw_ebook build_low_res_ebook => low_res_ebook Old names kept not to break backward compatibility --- .github/workflows/test-book-website.yml | 2 +- book/makefile | 56 ++++++++++++------------- makefile | 17 +++++--- 3 files changed, 39 insertions(+), 36 deletions(-) diff --git a/.github/workflows/test-book-website.yml b/.github/workflows/test-book-website.yml index bd648d9..0686b29 100644 --- a/.github/workflows/test-book-website.yml +++ b/.github/workflows/test-book-website.yml @@ -40,7 +40,7 @@ jobs: options: -v ${{ github.workspace }}:/app run: | cd /app/book - make -j -O build_serif_pdf build_ebook website + make -j -O serif ebook website - name: Upload book Artifacts uses: actions/upload-artifact@v4 with: diff --git a/book/makefile b/book/makefile index ed3dce6..f770741 100644 --- a/book/makefile +++ b/book/makefile @@ -28,7 +28,7 @@ endif # Default target is not all because most of the time we just want a pdf... # and building everything take a long time. -.DEFAULT_GOAL := build_serif_pdf +.DEFAULT_GOAL := serif # List all files that are dependencies {{{ chapters = baking basics bread-types cover flour-types history intro mix-ins\ @@ -149,8 +149,8 @@ epub/bw_book.epub: copy_ebook_files $(bw_images) cd bw-book-epub; zip -q9XrD ../epub/bw_book.epub ./ # Now the low res -copy_ebook_files: build_ebook - $(RSYNC) --exclude '*.png' epub_build/book-epub/ bw-book-epub/ +copy_ebook_files_low_res: ebook + $(RSYNC) epub_build/book_sans_serif-epub/ low-res-book-epub/ low-res-book-epub/OEBPS/%.jpg: %.jpg mkdir -p $(dir $@) @@ -186,48 +186,45 @@ website: html ../website/_bundle_install_done $(ruby_src) ################################### .PHONY: export_figures # Requires that you have docker running on your computer. -export_figures: build_pdf $(tgt_figures) +export_figures: pdf $(tgt_figures) cd figures/ && bash export_figures.sh # }}} -# Now with the rules {{{ -# Expected usual rules first +# Now with the targets {{{ +# Expected usual targets first .PHONY: all all: bake # Finally actual project targets (i.e. build pdf and ebooks) -.PHONY: build_pdf build_booklet build_serif_pdf build_sans_serif_pdf build_ebook +.PHONY: pdf booklet serif sans_serif ebook -pdf: build_serif_pdf build_sans_serif_pdf -build_pdf: pdf +pdf: serif sans_serif booklet: booklet/booklet.pdf -build_booklet: booklet - serif: book_serif/book.pdf -build_serif_pdf: serif - sans_serif: book_sans_serif/book_sans_serif.pdf -build_sans_serif_pdf: sans_serif ebook: epub/book_sans_serif.epub -build_ebook: ebook - bw_ebook: epub/bw_book.epub -build_bw_ebook: bw_ebook - low_res_ebook: epub/low_res_book.epub + +# We keep the old target names for backward compatibility +build_pdf: pdf +build_booklet: booklet +build_serif_pdf: serif +build_sans_serif_pdf: sans_serif +build_ebook: ebook +build_bw_ebook: bw_ebook build_low_res_ebook: low_res_ebook # top level releases rules .PHONY: bake release_serif release_sans_serif - bake: release_serif release_sans_serif release_booklet website release: mkdir -p release -release_serif: build_serif_pdf build_ebook build_bw_ebook build_low_res_ebook | release +release_serif: serif ebook bw_ebook low_res_ebook | release cp book_serif/book.pdf release/TheBreadCode-The-Sourdough-Framework.pdf cp epub/bw_book.epub release/TheBreadCode-The-Sourdough-Framework-black-and-white.epub cp epub/low_res_book.epub release/TheBreadCode-The-Sourdough-Framework.epub @@ -237,10 +234,10 @@ release_serif: build_serif_pdf build_ebook build_bw_ebook build_low_res_ebook | exit 1; \ fi -release_sans_serif: build_sans_serif_pdf | release +release_sans_serif: sans_serif | release cp book_sans_serif/book_sans_serif.pdf release/TheBreadCode-The-Sourdough-Framework-sans-serif.pdf -release_booklet: build_booklet | release +release_booklet: booklet | release cp booklet/booklet.pdf release/TheBreadCode-The-Sourdough-Framework-booklet.pdf # }}} @@ -303,7 +300,7 @@ help: @echo "" @echo "Releases:" @echo " all: pdf serif and sans-serif accessible version, ebooks in colours" - @echo " and black&white versions and the website" + @echo " and black&white versions as well as the website" @echo "" @echo " bake: same as build all" @echo "" @@ -311,13 +308,14 @@ help: @echo " release_sans_serif: build sans-serif/accessible version of pdf" @echo "" @echo "Portable Document Format (pdf):" - @echo " build_sans_serif_pdf: build accessible pdf only (same as release_sans_serif)" - @echo " build_serif_pdf: build serif pdf only" - @echo " build_pdf: builds both serif and accessible pdf" + @echo " sans_serif: build accessible pdf only (same as release_sans_serif)" + @echo " serif: build serif pdf only" + @echo " pdf: builds both serif and accessible pdf" @echo "" @echo "Ebooks (epub):" - @echo " build_ebook: builds only the colour ebook" - @echo " build_bw_ebook: builds the low res black & white ebook" + @echo " ebook: builds only the colour ebook" + @echo " low_res_ebook: builds the colour ebook in lower resolution" + @echo " bw_ebook: builds the low res black & white ebook" @echo "" @echo "Website:" @echo " website: build the static website from LaTeX sources and post-process it" @@ -350,7 +348,7 @@ help: @echo " printvars: print all variables in the makefile" @echo " print-X: print makefile variable X" @echo "" - @echo "set DEBUG i.e make DEBUG=1 build_ebook to add debug flags to commands" + @echo "set DEBUG i.e make DEBUG=1 ebook to add debug flags to commands" # }}} # Debug Stuff from now on {{{ diff --git a/makefile b/makefile index 154f572..30ad878 100644 --- a/makefile +++ b/makefile @@ -15,13 +15,13 @@ push_docker_image: build_docker_image docker push $(DOCKER_IMAGE):latest # Books/website -build_serif_pdf: - $(DOCKER_CMD) "cd /opt/repo/book && make build_serif_pdf" +serif_pdf: + $(DOCKER_CMD) "cd /opt/repo/book && make serif_pdf" -build_ebook: - $(DOCKER_CMD) "cd /opt/repo/book && make build_ebook" +ebook: + $(DOCKER_CMD) "cd /opt/repo/book && make ebook" -build_pdf: +pdf: $(DOCKER_CMD) "cd /opt/repo/book && make" bake: @@ -31,7 +31,7 @@ website: $(DOCKER_CMD) "cd /opt/repo/book && make website" booklet: - $(DOCKER_CMD) "cd /opt/repo/book && make build_booklet" + $(DOCKER_CMD) "cd /opt/repo/book && make booklet" mrproper: $(DOCKER_CMD) "cd /opt/repo/book && make mrproper" @@ -48,3 +48,8 @@ print_os_version: start_shell: docker run -it -v $(PWD):/opt/repo $(DOCKER_IMAGE) /bin/bash + +# Old names for backward compatibility +build_serif_pdf: serif_pdf +build_ebook: ebook +build_pdf: pdf From 62880e7ff2b2feba1d192463c0c7d3b987a897ec Mon Sep 17 00:00:00 2001 From: Ced Date: Sun, 19 Jan 2025 21:28:14 +0000 Subject: [PATCH 28/28] Fix merge errors --- book/makefile | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/book/makefile b/book/makefile index f770741..e99abc3 100644 --- a/book/makefile +++ b/book/makefile @@ -127,6 +127,9 @@ booklet/booklet.pdf: $(booklet_src) epub/%.epub: %.tex $(ebook_src) cover/cover-page.xbb $(EBOOK) $< +copy_ebook_files: build_ebook + $(RSYNC) --exclude '*.png' epub_build/book-epub/ bw-book-epub/ + # Now that we have built the ebook we will generate 2 more versions # # 1) With kindle app on phone we want a colour version with size < 50 MB @@ -150,7 +153,7 @@ epub/bw_book.epub: copy_ebook_files $(bw_images) # Now the low res copy_ebook_files_low_res: ebook - $(RSYNC) epub_build/book_sans_serif-epub/ low-res-book-epub/ + $(RSYNC) epub_build/book-epub/ low-res-book-epub/ low-res-book-epub/OEBPS/%.jpg: %.jpg mkdir -p $(dir $@) @@ -164,10 +167,10 @@ epub/low_res_book.epub: copy_ebook_files_low_res $(low_res_images) # Website {{{ ################################### .PHONY: html website -$(website_dir)/book_sans_serif.html: $(website_src) cover/cover-page.xbb - $(WEBSITE) -d $(website_dir) book_sans_serif.tex +$(website_dir)/book.html: $(website_src) cover/cover-page.xbb + $(WEBSITE) -d $(website_dir) book.tex -html: $(website_dir)/book_sans_serif.html +html: $(website_dir)/book.html cp $< $(website_dir)/index.html # Because packages will be installed in hard to predict places use a file as @@ -204,7 +207,7 @@ booklet: booklet/booklet.pdf serif: book_serif/book.pdf sans_serif: book_sans_serif/book_sans_serif.pdf -ebook: epub/book_sans_serif.epub +ebook: epub/book.epub bw_ebook: epub/bw_book.epub low_res_ebook: epub/low_res_book.epub @@ -232,7 +235,7 @@ release_serif: serif ebook bw_ebook low_res_ebook | release @if [ `du -sb epub/low_res_book.epub | cut -f1` -gt 49500000 ]; then \ echo "ERROR: epub File too big"; \ exit 1; \ - fi + fi release_sans_serif: sans_serif | release cp book_sans_serif/book_sans_serif.pdf release/TheBreadCode-The-Sourdough-Framework-sans-serif.pdf