From b91f00b103dbab66df3f85de45093c2c3856b211 Mon Sep 17 00:00:00 2001 From: Hendrik Kleinwaechter Date: Sun, 12 Nov 2023 23:01:53 +0100 Subject: [PATCH 1/9] Create anchors in website generator (#274) Moves it out of JS into the html directly --- website/assets/script.js | 10 ---------- website/modify_build.rb | 25 +++++++++++++++++++++---- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/website/assets/script.js b/website/assets/script.js index e7127e5..69c4906 100644 --- a/website/assets/script.js +++ b/website/assets/script.js @@ -8,14 +8,4 @@ document.addEventListener('DOMContentLoaded', function() { }); } }); - - // Add permalinks to headers - var heads = document.querySelectorAll('.sectionHead'); - heads.forEach(function (head) { - let permalink = document.createElement("a"); - permalink.href = '#' + head.id; - permalink.classList.add('permalink'); - permalink.append('🔗'); - head.append(permalink); - }); }); diff --git a/website/modify_build.rb b/website/modify_build.rb index ce2f697..e0d251f 100644 --- a/website/modify_build.rb +++ b/website/modify_build.rb @@ -58,6 +58,7 @@ class ModifyBuild text = add_text_to_coverpage(text, extract_file_from_path(filename)) text = fix_js_dependency_link(text) text = fix_list_of_tables_figures_duplicates(text) + text = add_anchors_to_headers(text) text = fix_menus_list_figures_tables(text) if is_list_figures_tables?(filename) text = fix_list_of_figures_tables_display(text) if is_list_figures_tables?(filename) File.open(filename, "w") {|file| file.puts text } @@ -370,15 +371,17 @@ class ModifyBuild def mark_menu_as_selected_if_on_page(text, filename) doc = build_doc(text) + return doc.to_html + selected = doc.css(".menu-items .chapterToc > a").find do |el| el["href"] == "" end # Special case for index page - if ["index.html", "book.html"].include?(filename) - doc.css(".menu-items .chapterToc.home-link")[0].add_class("selected") - return doc.to_html - end + #if ["index.html", "book.html"].include?(filename) + # doc.css(".menu-items .chapterToc.home-link")[0].add_class("selected") + # return doc.to_html + #end # Special case for the flowcharts page which is added by us to the menu. # This needs to be done for future manually added pages too @@ -561,6 +564,20 @@ class ModifyBuild def build_doc(text) Nokogiri::HTML(text) end + + def add_anchors_to_headers(text) + doc = build_doc(text) + content = doc.css(".sectionHead, .subsectionHead") + content.each do |el| + anchor = el.attribute("id").value + # No anchor for whatever reason + next unless anchor + + copy_link = %Q{} + el.inner_html = "#{el.inner_html}#{copy_link}" + end + doc.to_html + end end ModifyBuild.build From 1e8db3a3c3f85197f23e18e25e25f8402112148b Mon Sep 17 00:00:00 2001 From: cedounet <134267244+cedounet@users.noreply.github.com> Date: Sun, 12 Nov 2023 22:02:31 +0000 Subject: [PATCH 2/9] Review baking (#275) * Review backing chapter * Improve baking process flowchart * Use positioning Library in TikZ * Improve Dutch Oven flowchart --- book/baking/baking.tex | 163 ++++++++++++------------ book/book.tex | 2 - book/figures/fig-baking-process.tex | 29 ++--- book/figures/fig-dutch-oven-process.tex | 21 ++- book/figures/flowcharts_tikz.tex | 2 +- 5 files changed, 108 insertions(+), 109 deletions(-) diff --git a/book/baking/baking.tex b/book/baking/baking.tex index 71599bb..60a3392 100644 --- a/book/baking/baking.tex +++ b/book/baking/baking.tex @@ -1,34 +1,28 @@ +\chapter{Baking}% +\label{chapter:baking} \begin{quoting} -Baking refers to the part of the process where you are loading -your dough into the oven. This is typically done after your -dough has gone through the bulk fermentation and proofing stage. +Baking refers to the part of the process where you are loading your dough into +the oven\footnote{While some breads like flatbreads could also be baked on the +stove. This chapter focuses on the home oven.}. Baking is typically done after +your dough has gone through the bulk fermentation and proofing stage. This +chapter will review what happens to your dough during baking, as well as +several techniques used to improve the final result. \end{quoting} -\begin{flowchart}[!htb] -\begin{center} - \input{figures/fig-baking-process.tex} - \caption[Different steaming methods]{A schematic visualization of the baking - process using different sources of steam in a home oven.}% - \label{fig:baking-process} -\end{center} -\end{flowchart} - -Some other breads like flatbreads -could also be baked on the stove. This chapter focuses on the -home oven. - -As the dough heats up, the water and acids -in your dough start to evaporate. When baking -a gluten based dough, the bubbles in your dough start to expand. -Your dough starts to vertically rise. This is called oven spring. -Your bread starts to build a crust of gel-like consistency. The crust is still -extensible and can be stretched. +\section{The process of baking} +Once temperature starts to rise, the dough will go through several stages as +summarized in Table~\ref{tab:baking-stages}. As the dough heats up, the water +and acids in your dough start to evaporate. When baking a gluten based dough, +the bubbles in your dough start to expand. The dough starts to vertically +rise, this is called oven spring. Your bread starts to build a crust of +gel-like consistency, the crust is still extensible and can be stretched. \begin{table}[htp!] \begin{center} \input{tables/table-baking-process-stages.tex} \caption[Stages of dough during baking]{The different stages that - your dough undergoes during the baking process.} + your dough undergoes during the baking process.}% + \label{tab:baking-stages} \end{center} \end{table} @@ -41,28 +35,32 @@ More research should be done here to validate or invalidate this claim. At \qty{75}{\degreeCelsius} (\qty{167}{\degF}) the surface of your dough turns into a gel. It -holds together nicely and is still extensible. This gel is essential -for oven spring as it retains the gas of your dough very well. +holds together nicely but is still extensible. This gel is essential +for oven spring as it retains the gas inside your dough. At around \qty{100}{\degreeCelsius} (\qty{212}{\degF}) the water starts to evaporate out of your dough. If this weren't the case, your dough would taste soggy and doughy. The higher hydration your dough has, the more water your bread -still contains after the bake. The crumb is going to taste a bit -more moist. The consistency will be different. +still contains after the bake, changing its consistency. As a result the +crumb is going to taste a bit more moist. -Another often undervalued step is the evaporation of acids. At -\qty{118}{\degreeCelsius} (\qty{244}{\degF}) the acetic acid in your dough starts to evaporate. -Shortly after at \qty{122}{\degreeCelsius} (\qty{252}{\degF}) the lactic acid begins evaporating. -This is crucial to understand and opens a door to many interesting +Another often undervalued step is the evaporation of acids. +At~\qty{118}{\degreeCelsius} (\qty{244}{\degF}) the acetic acid in your dough +starts to evaporate. +Shortly after at~\qty{122}{\degreeCelsius} (\qty{252}{\degF}) the lactic acid begins evaporating. +This is crucial to understand and it opens the door to many interesting ways to influence your final bread's taste. As more and more water begins to evaporate the acids in your dough become more concentrated. -There is less water but in relation you have more acids. A shorter -bake will therefore lead to a more tangy dough. The longer you bake the bread, +There is less water but in relation you have more acids, therefore a shorter +bake will lead to a more tangy dough. The longer you bake the bread, the more of the water evaporates, but also ultimately the acids will follow. -They will be more concentrated. In absolute units, though, they -will become less and less. The longer you bake, the less sour -your bread is going to be. By baking you can -influence which sourness level you would like to achieve. +The longer you bake, the less sour your bread is going to be. By controlling +baking time you can influence which sourness level you would like to achieve. + +It would be a very interesting experiment to bake a bread at different exact +temperatures. How would a bread taste with only evaporated water but +full acidity? What if you were to just completely get rid of the acetic +acid? How would the taste change? \begin{figure}[!htb] \includegraphics[width=\textwidth]{baking-experiment-temperatures.png} @@ -74,18 +72,14 @@ influence which sourness level you would like to achieve. the surface temperature increases.} \end{figure} -It would be a very interesting experiment to bake a bread at different exact -temperatures. How would a bread taste with only evaporated water but -full acidity? What if you were to just completely get rid of the acetic -acid? How would the taste change? +As the temperature increases further the crust thickens. The Maillard reaction +kicks in, deforming proteins and starches. The outside of your dough starts to +become browner and crisper, this process begins at +around~\qty{140}{\degreeCelsius} (\qty{284}{\degF}) -As the temperature increases -the crust thickens. The Maillard reaction kicks in, further deforming -proteins and starches. The outside of your dough starts to become -browner and crisper. This process begins at around \qty{140}{\degreeCelsius} (\qty{284}{\degF}) - -Once the temperature increases even more to around \qty{170}{\degreeCelsius} (\qty{338}{\degF}), -the caramelization process begins. The remaining sugars the microbes +Once the temperature increases even more to around~\qty{170}{\degreeCelsius} +(\qty{338}{\degF}), +the caramelization process begins, the remaining sugars and the microbes which did not convert yet start to brown and darken. You can keep baking for as long as you like to achieve the crust color that you like\footnote{This really depends a lot on your personal preference. @@ -95,66 +89,53 @@ heat your bread in the oven one more time to continue building a darker crust.}. The best method to know that your dough is done is to take -the temperature of your dough. You can use a barbecue thermometer -to measure it. Once the core temperature is at around \qty{92}{\degreeCelsius} (\qty{197}{\degF}), +the temperature of your dough, you can use a barbecue thermometer +to measure it. Once the core temperature is at around~\qty{92}{\degreeCelsius} +(\qty{197}{\degF}), you can stop the baking process. This is typically not done though as the crust hasn't been built yet\footnote{The thermometer is especially important when using a large loaf pan. It is sometimes very hard to judge from the outside if the dough is done. I~failed many times and ended up having a semi baked dough.}. -Once your dough has finished baking, it is ready to eat. Your +Once your dough has finished baking, it is ready to eat: your dough has turned into a bread. At this point, your bread is sterile as the temperature was too hot for for the microorganisms to survive\footnote{I~wonder though if a starter culture could be grown again from a slice of bread. Under heat stress the microorganisms begin sporulating. Maybe some of the spores survive the baking process and could be reactivated -later? If this worked, you could use any store bought sourdough +later? If this works, you could use any store bought sourdough bread as a source for a new starter.}. \section{The role of steam} - -\begin{figure}[!htb] - \includegraphics[width=\textwidth]{oven-example} - \caption[Home oven baking example to maximize steam]{My default home oven setup. The tray of rocks - and tray on top of the rolls greatly improve the steaming capabilities. This way the bread can - rise more during the initial stage of the baking process.} -\end{figure} - Steam is essential when baking as it helps to counter premature crust building. During the first stage of the bake, the dough -increases in size. The water in your dough evaporates and pushes +increases in size as the water in your dough evaporates and pushes the whole dough upwards. -\begin{figure}[!htb] - \includegraphics[width=\textwidth]{baking-process-steam.jpg} - \caption[Steam building with inverted tray]{How steam builds in your oven - using the later described inverted tray method.}% - \label{flc:inverted-tray} -\end{figure} - Normally, under high heat a crust would form. Just like if you were to bake vegetables in your home oven, at some point they become darker and crisper. This is the same thing that -happens with your dough. You want to delay this process +happens with your dough, and you want to delay this process as long as possible until your dough no longer expands. Expansion stops when most of the microbes have died and the evaporating water no longer stays inside the alveoli. + The stronger the gluten network, the more gas can be retained during the baking process. This gluten network at some point loses its ability to contain gas as the temperature heats up. The dough stops increasing in size. The steam plays an important role as it condenses and evaporates on top of your dough. The surface temperature is rapidly increasing -to around \qty{75}{\degreeCelsius} (\qty{160}{\degF}). At this temperature the gel starts -to build. This gel is still extensible and allows expansion. +to around~\qty{75}{\degreeCelsius} (\qty{160}{\degF}). At this temperature the +gel starts to build, and is still extensible and allows expansion. Without the steam, the dough would never enter the gel stage, but instead directly go to the Maillard reaction zone. You want your dough to stay in this gel stage as long as possible to achieve maximum expansion\footnote{You can remove your dough from the oven after 5~minutes to see the gel. You will notice -that it holds the dough's structure. It has a very interesting consistency.}. +that it holds the dough's structure and it has a very interesting consistency.}. \begin{figure}[!htb] \includegraphics[width=\textwidth]{baking-process-stage-2.jpg} @@ -165,10 +146,9 @@ that it holds the dough's structure. It has a very interesting consistency.}. When not steaming enough, you will notice that the scoring incisions do not properly open up during the bake. They stay closed as the dough is unable to push through the crust. - -Another common sign is that you have larger pockets -of air towards the crust of your dough. As the dough increases -vertically, expansion is halted by the crust. The pockets +Another common sign, as you can see in Figure~\ref{fig:too-little-steam} is +that you have larger pockets of air towards the crust of your dough. As the +dough increases vertically, expansion is halted by the crust. The pockets of air converge into larger pockets as the pressure increases. This can also happen when you are baking at too high a temperature. @@ -185,10 +165,35 @@ way. \caption[Bread baked too hot]{A submission by Karomizu showing a bread that has been baked at too high a temperature or with too little steam. Note the large pockets of air towards the crust. They are a typical - indicator.} + indicator.}% + \label{fig:too-little-steam} \end{figure} -\section{Dutch ovens} +\section{Building up steam} +\begin{flowchart}[!htb] +\begin{center} + \input{figures/fig-baking-process.tex} + \caption[Different steaming methods]{A schematic visualization of the baking + process using different sources of steam in a home oven.}% + \label{fig:baking-process} +\end{center} +\end{flowchart} + +\begin{figure}[!htb] + \includegraphics[width=\textwidth]{oven-example} + \caption[Home oven baking example to maximize steam]{My default home oven setup. The tray of rocks + and tray on top of the rolls greatly improve the steaming capabilities. This way the bread can + rise more during the initial stage of the baking process.} +\end{figure} + +\begin{figure}[!htb] + \includegraphics[width=\textwidth]{baking-process-steam.jpg} + \caption[Steam building with inverted tray]{How steam builds in your oven + using the later described inverted tray method.}% + \label{flc:inverted-tray} +\end{figure} + +\subsection{Dutch ovens} \begin{figure}[!htb] \includegraphics[width=\textwidth]{dutch-oven-example} @@ -264,7 +269,7 @@ the simple flatbread recipe which is baked in a pan. Please refer to Section~\ref{section:flat-bread-recipe} for more details. -\section{Inverted tray method} +\subsection{Inverted tray method} The inverted tray method simulates a Dutch oven. By placing another tray on top of your dough, the steam diff --git a/book/book.tex b/book/book.tex index 9b11f20..0c9d882 100644 --- a/book/book.tex +++ b/book/book.tex @@ -44,8 +44,6 @@ \input{non-wheat-sourdough/non-wheat-sourdough} % \input{mix-ins/mix-ins.tex} -\chapter{Baking}% -\label{chapter:baking} \input{baking/baking} \input{storing-bread/storing-bread} diff --git a/book/figures/fig-baking-process.tex b/book/figures/fig-baking-process.tex index 3bc5c3f..5b40a03 100644 --- a/book/figures/fig-baking-process.tex +++ b/book/figures/fig-baking-process.tex @@ -1,23 +1,22 @@ -\begin{tikzpicture}[node distance = 3cm, auto] +\begin{tikzpicture}[node distance = 4cm, auto] \node [start] (heat_oven) {Heat oven to \qty{230}{\degreeCelsius} (\qty{446}{\degF}) for 30~minutes}; - \node [block, right of=heat_oven, node distance=3cm] (score_dough) {Score your dough}; + \node [block, right of=heat_oven] (score_dough) {Score your dough}; \node [decision, right of=score_dough, node distance=4cm] (decide_steam) {Choose your steaming method}; - \node [block, below of=heat_oven, node distance=4cm] (inverted_tray_method) {Inverted tray method}; - \node [block, right of=inverted_tray_method, node distance=3cm] (dutch_oven) {Dutch oven}; - \node [block, right of=dutch_oven, node distance=3cm] (steam_injection) {Steam injection oven}; - \node [block, below of=inverted_tray_method, node distance=3cm] (bake_30) {Bake dough for 30~minutes with steam}; - \node [block, right of=bake_30, node distance=3cm] (remove_steam) {Remove source of steam}; - \node [block, right of=remove_steam, node distance=3cm] (build_crust) {Build the crust}; - \node [success, right of=build_crust, node distance=3cm] (finish_baking) {Stop baking 10--30~minutes later depending on crust preference}; + \node [block, below of=decide_steam, node distance=3.5cm] (dutch_oven) {Dutch oven}; + \node [block, left of=dutch_oven] (inverted_tray_method) {Inverted tray method}; + \node [block, right of=dutch_oven] (steam_injection) {Steam injection oven}; + \node [block, below of=dutch_oven, node distance=3cm] (bake_30) {Bake dough for 30~minutes with steam}; + \node [block, below of=bake_30, node distance=3cm] (remove_steam) {Remove source of steam}; + \node [success, right of=remove_steam] (finish_baking) {Stop baking 10--30~minutes later depending on crust preference}; \path [line] (heat_oven) -- (score_dough); \path [line] (score_dough) -- (decide_steam); - \path [line] (decide_steam) -- (inverted_tray_method); + \path [line] (decide_steam) -- (inverted_tray_method.north east); \path [line] (decide_steam) -- (dutch_oven); - \path [line] (decide_steam) -- (steam_injection); - \path [line] (steam_injection) -- (bake_30); - \path [line] (inverted_tray_method) -- (bake_30); + \path [line] (decide_steam) -- (steam_injection.north west); + \path [line] (steam_injection.south west) -- (bake_30.north east); + \path [line] (inverted_tray_method.south east) -- (bake_30.north west); \path [line] (dutch_oven) -- (bake_30); \path [line] (bake_30) -- (remove_steam); - \path [line] (remove_steam) -- (build_crust); - \path [line] (build_crust) -- (finish_baking); + \path [line] (remove_steam) -- (finish_baking); + \draw[BC, decoration=mirror] (remove_steam.south west) ++(0, -0.3) -- node[below=1em]{Building crust}(finish_baking.south east); \end{tikzpicture} diff --git a/book/figures/fig-dutch-oven-process.tex b/book/figures/fig-dutch-oven-process.tex index ed1abaf..d4f0fff 100644 --- a/book/figures/fig-dutch-oven-process.tex +++ b/book/figures/fig-dutch-oven-process.tex @@ -7,14 +7,13 @@ \node [block, below of=spritz] (close) {Close DO}; \node [block, left of=close] (back_oven) {Place DO back in oven}; \node [block, left of=back_oven] (bake) {Bake 30~minutes at \qty{230}{\degreeCelsius} (\qty{446}{\degF})}; - \node [block, below of=heat_oven] (wait_5_minutes) {Wait\\ 5 minutes}; - \node [decision, below of=wait_5_minutes, node distance=4cm] (is_ready_check) {Core temperature \qty{92}{\degreeCelsius} (\qty{197}{\degF})?}; + \node [decision, below right= 5cm and -1 cm of heat_oven] (is_ready_check) + {Core temperature \qty{92}{\degreeCelsius} (\qty{197}{\degF})?}; + \node [block, below of=is_ready_check, node distance=4cm] (wait_5_minutes) {Wait\\ 5 minutes}; \node [block, right of=is_ready_check, node distance=4cm] (remove_do_lid) {Remove DO lid}; - \node [block, right of=wait_5_minutes] (test_temperature_again) {Test core temperature again}; - \node [decision, right of=remove_do_lid, node distance=4cm] (dark_enough_decision) {Crust color dark enough?}; - \node [success, below of=dark_enough_decision] (finish_baking) {Bread is finished}; - \node [block, below of=close] (test_crust_again) {Test crust color again}; - \node [block, below of=test_crust_again] (bake_5_more_minutes) {Bake another 5~minutes}; + \node [decision, right of=remove_do_lid, node distance=3.5cm] (dark_enough_decision) {Crust color dark enough?}; + \node [success, below of=dark_enough_decision, node distance=4cm] (finish_baking) {Bread is finished}; + \node [block, right of=dark_enough_decision, node distance=3.5cm] (bake_5_more_minutes) {Bake another 5~minutes}; \path [line] (heat_oven) -- (remove_oven); \path [line] (remove_oven) -- (open_load_dough); \path [line] (open_load_dough) -- (score); @@ -22,14 +21,12 @@ \path [line] (spritz) -- (close); \path [line] (close) -- (back_oven); \path [line] (back_oven) -- (bake); - \path [line] (bake) -- (is_ready_check); + \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] (wait_5_minutes) -- (test_temperature_again); - \path [line] (test_temperature_again) -- (is_ready_check); + \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] (bake_5_more_minutes) -- (test_crust_again); - \path [line] (test_crust_again) -- (dark_enough_decision); + \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/flowcharts_tikz.tex b/book/figures/flowcharts_tikz.tex index 5a8bb6a..592e7d9 100644 --- a/book/figures/flowcharts_tikz.tex +++ b/book/figures/flowcharts_tikz.tex @@ -1,6 +1,6 @@ \tikzstyle{every picture}+=[font=\footnotesize\sffamily] \usetikzlibrary{calc, shapes, arrows, decorations.pathreplacing, calligraphy, - calligraphy} + positioning} \tikzstyle{decision} = [diamond, draw=codeblack, fill=codeblack, text=white, text width=4.5em, text badly centered, node distance=3cm, inner sep=0pt, line width=2mm] From 0dd9c69c2cfce61fec98ef21e2c28b3843a17821 Mon Sep 17 00:00:00 2001 From: Ced Date: Wed, 15 Nov 2023 14:39:39 +0000 Subject: [PATCH 3/9] Add dvisvgm version info --- book/makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/book/makefile b/book/makefile index fb9f4f8..b72d95f 100644 --- a/book/makefile +++ b/book/makefile @@ -301,6 +301,8 @@ show_tools_version: # Show version of tools used on the build machine @echo "" - tidy -version @echo "" + - dvisvgm --version + @echo "" - lacheck --version @echo "" - chktex --version From eb2fc3eab850a8602063fd29418a387bcaf63cd3 Mon Sep 17 00:00:00 2001 From: Cedric Date: Fri, 17 Nov 2023 19:36:45 +0000 Subject: [PATCH 4/9] Add dvsvgm to the docker image To deal with ebooks and tikz flowcharts --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 34f5d85..8fab799 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,6 +15,7 @@ RUN apt-get update && \ make \ tidy \ pandoc \ + dvisvgm \ zip \ git \ wget \ From 2f3b8ec89b6bb63c6ad2439325fead00bd6ea8e3 Mon Sep 17 00:00:00 2001 From: Cedric Date: Sat, 18 Nov 2023 20:51:02 +0000 Subject: [PATCH 5/9] Fix giberrish website timeline Solves https://github.com/hendricius/the-sourdough-framework/issues/279 by removing dvisvgm_hashes --- book/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/makefile b/book/makefile index b72d95f..a40a068 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 -WEBSITE := make4ht --lua -c website.cfg -a debug -uf html5+tidy+common_domfilters+dvisvgm_hashes +WEBSITE := make4ht --lua -c website.cfg -a debug -uf html5+tidy+common_domfilters CLEAN := latexmk -cd -lualatex -c -use-make CHECK_1 := lacheck CHECK_2 := chktex From b559d727811a6621c6abeb484e01c602df578f06 Mon Sep 17 00:00:00 2001 From: Cedric Date: Sat, 18 Nov 2023 21:43:29 +0000 Subject: [PATCH 6/9] Revert "Fix giberrish website timeline" This reverts commit 2f3b8ec89b6bb63c6ad2439325fead00bd6ea8e3. makes things worst... --- book/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/makefile b/book/makefile index a40a068..b72d95f 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 -WEBSITE := make4ht --lua -c website.cfg -a debug -uf html5+tidy+common_domfilters +WEBSITE := make4ht --lua -c website.cfg -a debug -uf html5+tidy+common_domfilters+dvisvgm_hashes CLEAN := latexmk -cd -lualatex -c -use-make CHECK_1 := lacheck CHECK_2 := chktex From 737debe1236a02dd942a654ce137cf58cdbdd2d5 Mon Sep 17 00:00:00 2001 From: Cedric Date: Sun, 19 Nov 2023 13:39:57 +0000 Subject: [PATCH 7/9] Revert "Revert "Fix giberrish website timeline"" This reverts commit b559d727811a6621c6abeb484e01c602df578f06. This should prevent the build from breaking eveb if it does not fix anything.. --- book/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/makefile b/book/makefile index b72d95f..a40a068 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 -WEBSITE := make4ht --lua -c website.cfg -a debug -uf html5+tidy+common_domfilters+dvisvgm_hashes +WEBSITE := make4ht --lua -c website.cfg -a debug -uf html5+tidy+common_domfilters CLEAN := latexmk -cd -lualatex -c -use-make CHECK_1 := lacheck CHECK_2 := chktex From 6a82cf6f41f479ab68d2db82e52fb56d4e9f6511 Mon Sep 17 00:00:00 2001 From: Hendrik Kleinwaechter Date: Fri, 24 Nov 2023 07:20:18 +0100 Subject: [PATCH 8/9] Use trixie as base image (#287) * Use trixie as base image * Install dvisvgm manually and fix ruby encodign issues --- Dockerfile | 43 +++++++++++++++++++++++++++++++++++++---- makefile | 4 ++-- website/modify_build.rb | 6 +++--- 3 files changed, 44 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8fab799..1f82e54 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.gitlab.com/islandoftex/images/texlive +FROM debian:trixie LABEL "maintainer"="Hendrik Kleinwächter " LABEL "repository"="https://github.com/hendricius/the-sourdough-framework" @@ -6,7 +6,7 @@ LABEL "homepage"="https://github.com/hendricius/the-sourdough-framework" LABEL org.opencontainers.image.source="https://github.com/hendricius/the-sourdough-framework" # Print release information if needed -# RUN cat /etc/*release* +RUN cat /etc/*release* # Install base depdendencies RUN apt-get update && \ @@ -15,14 +15,49 @@ RUN apt-get update && \ make \ tidy \ pandoc \ - dvisvgm \ zip \ git \ wget \ ruby3.1 \ ruby-dev \ imagemagick \ - build-essential + rsync \ + wget \ + perl \ + xzdec \ + # dvisvgm dependencies + build-essential \ + fonts-texgyre \ + fontconfig \ + libfontconfig1 \ + libkpathsea-dev \ + libptexenc-dev \ + libsynctex-dev \ + libx11-dev \ + libxmu-dev \ + libxaw7-dev \ + libxt-dev \ + libxft-dev \ + libwoff-dev + +# Install TeX +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + texlive-full \ + texlive-luatex + +# Compile latest dvisvgm +RUN wget https://github.com/mgieseki/dvisvgm/releases/download/3.1.2/dvisvgm-3.1.2.tar.gz && \ + mv dvisvgm-3.1.2.tar.gz dvisvgm.tar.gz && \ + tar -xzf dvisvgm.tar.gz && \ + cd dvisvgm-* && \ + ./configure && \ + make && \ + make install + +# Make sure everything is UTF-8 +RUN echo "export LC_ALL=en_US.UTF-8" >> /root/.bashrc && \ + echo "export LANG=en_US.UTF-8" >> /root/.bashrc WORKDIR /root diff --git a/makefile b/makefile index 2756c5b..1dd8daf 100644 --- a/makefile +++ b/makefile @@ -13,14 +13,14 @@ build_docker_image: push_docker_image: build_docker_image docker push $(DOCKER_IMAGE):latest -# Books/website +# Books/website # Quicker run for each commit, shall catch most problems validate: $(DOCKER_CMD) "cd /opt/repo/book && make -j build_serif_pdf build_ebook" build_pdf: - $(DOCKER_CMD) "cd /opt/repo/book && make" + $(DOCKER_CMD) "cd /opt/repo/book && make" bake: $(DOCKER_CMD) "cd /opt/repo/book && make -j bake" diff --git a/website/modify_build.rb b/website/modify_build.rb index e0d251f..18981d6 100644 --- a/website/modify_build.rb +++ b/website/modify_build.rb @@ -27,7 +27,7 @@ class ModifyBuild html_file_name = fn.split("/")[-1] content += "#{HOST}/#{html_file_name}\n" end - File.open("#{build_dir}/sitemap.txt", 'w') { |file| file.write(content) } + File.open("#{build_dir}/sitemap.txt", 'w:UTF-8') { |file| file.write(content) } end def build_latex_html @@ -41,7 +41,7 @@ class ModifyBuild end def modify_file(filename) - orig_text = File.read(filename) + orig_text = File.read(filename, encoding: "UTF-8") text = fix_double_slashes(orig_text) text = fix_navigation_bar(text) text = fix_titles(text) @@ -61,7 +61,7 @@ class ModifyBuild text = add_anchors_to_headers(text) text = fix_menus_list_figures_tables(text) if is_list_figures_tables?(filename) text = fix_list_of_figures_tables_display(text) if is_list_figures_tables?(filename) - File.open(filename, "w") {|file| file.puts text } + File.open(filename, "w:UTF-8") {|file| file.puts text } end def is_cover_page?(filename) From 44fdc8767253bdf72d3b70f3db2612d182479400 Mon Sep 17 00:00:00 2001 From: Hendrik Kleinwaechter Date: Thu, 23 Nov 2023 22:33:00 -0900 Subject: [PATCH 9/9] Retrigger build process