From a57da7815a88e8bb1ac3c0af25ad13896c4c19bf Mon Sep 17 00:00:00 2001 From: Hendrik Kleinwaechter Date: Thu, 23 Jan 2025 18:55:58 +0100 Subject: [PATCH] Fix #372 and add booklet to website/repo (#439) * Fix #372 and add booklet to website/repo This adds the design TLDR version to the README and website * Make less verbose * Remove booklet from source --- README.md | 13 +-- book/booklet.tex | 174 ---------------------------------------- book/makefile | 27 +------ book/style.css | 16 ++++ makefile | 5 +- website/modify_build.rb | 60 +++++++------- 6 files changed, 54 insertions(+), 241 deletions(-) delete mode 100644 book/booklet.tex diff --git a/README.md b/README.md index 5e02cf65..6910cc45 100644 --- a/README.md +++ b/README.md @@ -84,12 +84,15 @@ 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) -If you prefer a very short version (about 10 pages) with main flowcharts and -crucial information needed while you are in the kitchen, we also provide a -"too long;didn't read" version you could print. Having read the full book is -highly recommended to understand this leaflet: +For those who prefer a concise reference (about 15 pages), we offer a "too long;didn't read" (TL;DR) +version. This condensed guide contains the essential flowcharts, crucial information, +and space for your notes - perfect for quick kitchen reference. +It provides the key information you need without reading the complete book. -* [Download a condensed version](https://www.the-bread-code.io/booklet.pdf) +* [Read TL;DR version on your device](https://the-bread-code.io/book-tldr-print.pdf) +* [Download TL;DR version for printing](https://the-bread-code.io/book-tldr-digital.pdf) + +We recommend using double-sided printing if your printer supports it. ## Online HTML version diff --git a/book/booklet.tex b/book/booklet.tex deleted file mode 100644 index e6c8f00a..00000000 --- a/book/booklet.tex +++ /dev/null @@ -1,174 +0,0 @@ -\documentclass[paper=a4, twoside=false, fontsize=12pt]{scrbook} - -% General packages -\usepackage{sourdough} -\usepackage[ - paperwidth=210mm, - paperheight=260mm, - top=10mm, - bottom=80mm, - inner=10mm, - outer=10mm, - marginparsep=7mm, - marginparwidth=48mm, -]{geometry} -\usepackage{subcaption} - -\pagenumbering{gobble} -% Basic attributes -\author{Hendrik Kleinwächter} -\title{The Sourdough Framework\\\texttt{tl;dr Booklet Version}} -\begin{document} -\maketitle - -\section*{Sourdough starter} -\begin{flowchart}[!htb] - \centering - \input{figures/fig-starter-process.tex} - \caption*{How to setup a sourdough starter} -\end{flowchart} - -\begin{flowchart}[!htb] - \centering - \input{figures/fig-starter-readiness.tex} - \caption*{Preparing your starter for baking} -\end{flowchart} - -\begin{flowchart}[!htb] - \centering - \input{figures/fig-starter-maintenance.tex} - \caption*{Maintaining your starter, change ratio as per starter hydration - type} -\end{flowchart} - -\clearpage{} -\section*{Baker's math} -\begin{table}[!htb] - \centering - \input{tables/table-bakers-math-example.tex} - \caption*{An example table demonstrating how to properly calculate using - baker's math. All the ingredients are calculated as a percentage of the -flour quantity.} -\end{table} - -\section*{Basic recipes} -\subsection*{Flat bread} -\input{recipes/flat-bread.tex} -\clearpage{} - -\subsection*{Freestanding \& sandwich wheat-based breads} -\begin{table}[!htb] -\centering - \begin{tabular}{@{}lrrrp{0.4\linewidth}@{}} - \toprule - \thead{Ingredient}& & \thead{Percentage} & \thead{Calculation} & \thead{Comments} \\ \midrule - Flour & \qty{400}{g} & & & \\ - Whole-wheat flour & \qty{100}{g} & & & \\ - Total flour & & \qty{100}{\percent} & \qty{500}{g} & \\ - Water & & \qty{60}{\percent} & \qty{300}{g} & \\ - Sourdough starter & & \qty{10}{\percent} & \qty{50}{g} & \\ - Salt & & \qty{2}{\percent} & \qty{10}{g} & \\ \midrule - Flour & & \qty{100}{\percent} & & \\ - Water & & & & \\ - Sourdough starter & & & & \\ - Salt & & & & \\ \midrule - Flour & & & & \\ - & & & & \\ - & & & & \\ - & & & & \\ - & & & & \\ \bottomrule - \end{tabular} -\caption*{Table for your own calculation using baker's math} -\end{table} - -\begin{flowchart}[!htb] - \centering - \input{figures/fig-wheat-sourdough-process.tex} - \caption*{The whole process of making wheat based sourdough breads} -\end{flowchart} - -\begin{flowchart}[!htb] - \centering - \input{figures/fig-kneading-process.tex} - \caption*{The kneading process to create dough strength} -\end{flowchart} - -\begin{flowchart}[!htb] - \centering - \input{figures/fig-bulk-fermentation.tex} - \caption*{How to properly manage bulk fermentation} -\end{flowchart} - -\begin{figure*}[!htb] - \centering - \includegraphics[width=\textwidth]{stretch-and-fold-steps} - \caption*{An overview of the steps involved to perform stretch and folds for - wheat-based doughs. They are optional and should only be done when the dough -flattened out a lot.}% -\end{figure*} -\clearpage{} - -\section*{Shaping} - -\begin{figure*}[!htb] -\centering - \begin{subfigure}{.475\linewidth} - \includegraphics[width=\linewidth]{preshape-direction} - \caption*{Preshaping: Drag the dough in the direction of the rough - surface area.}% - \end{subfigure} - \begin{subfigure}{.475\linewidth} - \includegraphics[width=\linewidth]{step-1-flour-applied} - \caption*{Step 1: Apply flour to the dough's surface.}% - \end{subfigure}\hfill % <-- "\hfill" - \medskip % create some *vertical* separation between the graphs - \begin{subfigure}{.475\linewidth} - \includegraphics[width=\linewidth]{step-2-flipped-over} - \caption*{Step 2: Flipp-over dough. Note how the sticky side is facing - you while the floured side is facing the countertop.} - \end{subfigure}\hfill % <-- "\hfill" - \begin{subfigure}{.475\linewidth} - \includegraphics[width=\linewidth]{step-3-rectangular} - \caption*{Step 3: Make the dough rectangular, keep the sticky side - facing you while the floured side is facing the countertop.}% - \end{subfigure} - \caption*{First steps of shaping process} -\end{figure*} - -\begin{figure*}[htb!] - \centering - \includegraphics[width=\textwidth]{step-4-folding} - \caption*{Step 4: The process of folding a batard. Note how the rectangle - is first glued together and then rolled inwards to create a dough roll. - Ultimately the edges are sealed to create a more uniform dough.}% -\end{figure*} -\clearpage{} - -\section*{Proofing} -\begin{flowchart}[!htb] - \centering - \input{figures/fig-proofing-process.tex} -\end{flowchart} -\clearpage{} - -\section*{Baking} -\begin{flowchart}[!htb] - \centering - \input{figures/fig-baking-process.tex} - \caption*{Summary of different bread baking processes} -\end{flowchart} - - -\begin{flowchart}[!htb] - \centering - \input{figures/fig-inverted-tray-method.tex} - \caption*{Baking with the inverted tray method} -\end{flowchart} - -\begin{flowchart*}[!htb] - \centering - \input{figures/fig-dutch-oven-process.tex} - \caption*{Baking with a Dutch Oven} -\end{flowchart*} -\clearpage{} -\end{document} diff --git a/book/makefile b/book/makefile index e99abc3d..6be12305 100644 --- a/book/makefile +++ b/book/makefile @@ -84,11 +84,6 @@ website_assets := $(wildcard ../website/assets/*) ruby_src := ../website/modify_build.rb $(website_assets) ruby_pkg := ../website/Gemfile ../website/Gemfile.lock -# 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 @@ -113,12 +108,6 @@ 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 - -# 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 {{{ @@ -199,11 +188,10 @@ export_figures: pdf $(tgt_figures) all: bake # Finally actual project targets (i.e. build pdf and ebooks) -.PHONY: pdf booklet serif sans_serif ebook +.PHONY: pdf serif sans_serif ebook pdf: serif sans_serif -booklet: booklet/booklet.pdf serif: book_serif/book.pdf sans_serif: book_sans_serif/book_sans_serif.pdf @@ -213,7 +201,6 @@ 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 @@ -222,7 +209,7 @@ 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 +bake: release_serif release_sans_serif website release: mkdir -p release @@ -239,9 +226,6 @@ release_serif: serif ebook bw_ebook low_res_ebook | 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: booklet | release - cp booklet/booklet.pdf release/TheBreadCode-The-Sourdough-Framework-booklet.pdf # }}} # Clean up {{{ @@ -274,20 +258,17 @@ clean_website_build: 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/ @@ -338,7 +319,6 @@ help: @echo "Quick builds:" @echo " quick: compiles serif_pdf but runs lulatex only once" @echo " quick_ebook: compiles ebook but runs lulatex only once" - @echo " quick_booklet: compiles booklet but runs lulatex only once" @echo "" @echo "Checks:" @echo " tex-check: runs static analysis checker on LaTeX source to spot" @@ -383,9 +363,6 @@ spell-check: $(src_tex) spelling_exceptions.txt quick: # run latex only once no biber, no references etc... $(LATEX) -e '$$max_repeat=1' -halt-on-error -output-directory=book_serif book.tex -quick_booklet: - $(LATEX) -e '$$max_repeat=1' -halt-on-error -output-directory=booklet booklet.tex - quick_ebook: cover/cover-page.xbb # run latex only once no biber, ref etc... $(EBOOK) --mode draft book.tex diff --git a/book/style.css b/book/style.css index ad0a49eb..0c6b475d 100644 --- a/book/style.css +++ b/book/style.css @@ -535,6 +535,22 @@ figure.figure p.noindent { text-align: center; } +main.main-content h2.chapterHead.home-content-title { + margin-top: 0.5em; + margin-bottom: 0.5em; + line-height: 1.5em; +} + +.download-description { + font-weight: var(--fw-bold); +} + +.download-links { + p.indent, p.noindent { + text-align: unset; + } +} + @media (max-width: 768px) { .header { display: none; diff --git a/makefile b/makefile index 30ad8784..23b31dfc 100644 --- a/makefile +++ b/makefile @@ -5,7 +5,7 @@ DOCKER_CMD := docker run --rm -it -v $(PWD):/opt/repo --platform linux/x86_64 $( .PHONY: bake build_pdf build_docker_image push_docker_image validate website .PHONY: print_os_version start_shell printvars show_tools_version mrproper -.PHONY: build_serif_pdf build_ebook booklet +.PHONY: build_serif_pdf build_ebook # Dockers targets build_docker_image: @@ -30,9 +30,6 @@ bake: website: $(DOCKER_CMD) "cd /opt/repo/book && make website" -booklet: - $(DOCKER_CMD) "cd /opt/repo/book && make booklet" - mrproper: $(DOCKER_CMD) "cd /opt/repo/book && make mrproper" diff --git a/website/modify_build.rb b/website/modify_build.rb index 29c92c11..56b4f1a0 100644 --- a/website/modify_build.rb +++ b/website/modify_build.rb @@ -626,15 +626,16 @@ def build_cover_page_content Creating this book has been a labor of love. My main goal has always been to spread the joy of baking and empower bread enthusiasts like yourself. To ensure that the book remains accessible - to everyone, I have decided to make it available as a free digital download. + to everyone, I have decided to make it available free of charge.

One of my best Sourdough Breads +

⭐ Support this project

- However, producing and maintaining resources like this requires + Producing and maintaining resources like this requires considerable time, effort, and financial investment. If you find value in "The Sourdough Framework" and appreciate the effort that went into creating it, I kindly request your support @@ -646,18 +647,7 @@ def build_cover_page_content

Your generous contribution will not only help me cover the costs associated with this project but will also enable me to continue creating more valuable - content in the future. -

- -

- If you feel inspired to contribute, please consider making a donation of - any amount through my donation page. - Your support will go a long way in ensuring - that this knowledge can reach even more bread enthusiasts worldwide. -

- -

- Remember, your donation is entirely voluntary and any amount you + content in the future. Your donation is entirely voluntary and any amount you contribute is deeply appreciated. If you are unable to make a donation at this time, please know that your readership and support in spreading the word about "The Sourdough Framework" are invaluable contributions as well. @@ -669,29 +659,33 @@ def build_cover_page_content Together, we can continue to share the love of baking and cultivate a community passionate about the art of sourdough.

-

- You can either browse through this page or download the full book directly: -

-

- PDF: https://www.the-bread-code.io/book.pdf
- PDF (no serif): https://www.the-bread-code.io/book-sans-serif.pdf -

- -

- EPUB: https://www.the-bread-code.io/book.epub
- EPUB in Black & White, size optimized for screen readers : https://www.the-bread-code.io/bw-book.epub
-

- +

⬇️ Versions

- The full source code of the book can be found here: - https://www.github.com/hendricius/the-sourdough-framework + You can either browse through this website or download the full book to read it on your preferred device:

-

- There's also a hardcover version of the book available featuring an even more awesome design. You can read more information here: - https://www.breadco.de/hardcover-book -

+

Thank you and may the gluten be strong with you,