69 Commits

Author SHA1 Message Date
Cedric
ac8f2038ee Merge branch 'chemical' into 225-ebook-situation
Some checks failed
Test book and website for given image / test-book-website (push) Has been cancelled
2025-01-21 21:05:56 +00:00
Cedric
75dc8432bb Merge remote-tracking branch 'hendiricus/main' into 225-ebook-situation 2025-01-21 21:04:46 +00:00
Cedric
8fd1df9d33 Fix the chemical equation.
All credits due to @michal-h21
https://github.com/michal-h21/tex4ebook/issues/137
2025-01-21 21:01:17 +00:00
Cedric
70d90781c8 Add latest dvisvgm drive for tex4ht
commit f1707125de2f058634523b0b3391a7c7be2d6784
Author: Michal Hoftich <michal.h21@gmail.com>
Date:   Tue Oct 29 18:12:59 2024 +0100

    use \Picture* instead of \Picture+

from:
https://github.com/michal-h21/dvisvgm4ht.git (fetch)
2025-01-21 21:01:05 +00:00
Ced
d02e99c46e Fix merge errors 2025-01-21 20:56:40 +00:00
Ced
9e267a2b4b 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
2025-01-21 20:56:40 +00:00
Ced
a93a19d40d Reorder and add comments in makefile
Also added markers {{{ for folding
2025-01-21 20:56:40 +00:00
Ced
7f2f010571 Simplify the epub size check 2025-01-21 20:56:40 +00:00
Ced
75b015cda6 Remove debug flag on default website build 2025-01-21 20:56:40 +00:00
Hendrik Kleinwaechter
d0a5d6d37e Fix duplicate font loading 2025-01-21 20:56:40 +00:00
Cedric
2c86529981 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
2025-01-21 20:56:40 +00:00
Cedric
e73b0f331a 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...
2025-01-21 20:56:40 +00:00
Ramin Kamal
3b8dfd8d81 Layout "Repeat 3 Times" loops in better way. 2025-01-21 20:56:40 +00:00
Ced
374fb7adfa Delete rogue draft file 2025-01-21 20:56:40 +00:00
Ced
d1e3390360 Fix more uppercase in flowcharts 2025-01-21 20:56:40 +00:00
Ced
bcdaf79479 Fix merge error in starter-process flowchart 2025-01-21 20:56:40 +00:00
Ced
8b581f3bc4 Use uppercase in flowcharts conditions 2025-01-21 20:56:40 +00:00
Ced
f6cf15156a Remove the MWE from git
was added for the debug branches but shall not go to main.
2025-01-21 20:56:40 +00:00
Ced
864127e571 Reworked flowchart as per discussions 2025-01-21 20:56:40 +00:00
Ramin Kamal
d884d588d6 Change plots to use "Latex" arrows for the axes 2025-01-21 20:56:40 +00:00
Ramin Kamal
42c9f31673 Change "Repeat 3 times" elements to use "Latex" arrows 2025-01-21 20:56:40 +00:00
Ramin Kamal
d5ae1315ce Rearrange starter process flowchart
- Added an extra state for clarity
- Made it more compact
- Added details section
2025-01-21 20:56:40 +00:00
Ramin Kamal
311bd55a7f Update all flowchart arrows to LaTeX arrows
- Change tikzstyle definition for "line" so that all flowchart arrows
  have the "Latex" styling.
2025-01-21 20:56:40 +00:00
Ramin Kamal
b57089b777 Chang arrowheads to be cleaner LaTex style.
Update flowcharts_tikz.tex to use arrows.meta instead of arrows, which
is not nice and deprecated.
2025-01-21 20:56:40 +00:00
Cedric
ad94b9fabc 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
2025-01-21 20:56:40 +00:00
Cedric
194511d5cf Enable standalone chemical figures generation 2025-01-21 20:56:40 +00:00
Cedric
7f6fde9e42 Fix makefile standalone flowchart png generation 2025-01-21 20:56:40 +00:00
Cedric
7014b1f5ea Simplify epub test file
Some checks failed
Test book and website for given image / test-book-website (push) Has been cancelled
2025-01-05 22:04:36 +00:00
Cedric
69c7b8bc5f Use updated makefile 2025-01-05 21:26:40 +00:00
Cedric
b2dfd2e71c Merge branch 'main' into 225-ebook-situation 2025-01-05 21:23:29 +00:00
Ced
fad09e9b26 Merge branch 'main' into 225-ebook-situation 2024-06-15 21:06:03 +01:00
Ced
574eca71e6 Add unredable table in full book
https://github.com/hendricius/the-sourdough-framework/issues/358 does
look ok here though...
2024-05-26 11:53:30 +01:00
Ced
7f86f2fc20 Merge remote-tracking branch 'upstream/225-ebook-situation' into 225-ebook-situation 2024-05-26 00:22:33 +01:00
Ced
266de7b7ee Merge remote-tracking branch 'upstream/main' into 225-ebook-situation 2024-05-25 21:55:33 +01:00
Ced
92c5e418b3 Merge branch 'main' into 225-ebook-situation 2024-04-27 17:33:41 +01:00
Cedric
66e8a57b51 Merge branch 'main' into 225-ebook-situation 2024-01-16 20:19:08 +00:00
Ced
cf1e2b03be Merge branch 'main' into 225-ebook-situation 2023-12-14 09:01:14 +00:00
Cedric
8ae707a1c6 Merge branch 'main' into 225-ebook-situation 2023-12-10 18:53:49 +00:00
Cedric
9faf2cfc63 Merge branch 'main' into 225-ebook-situation 2023-12-08 20:10:29 +00:00
Cedric
d31372e063 Merge branch 'main' into 225-ebook-situation 2023-11-29 18:22:31 +00:00
Cedric
20b058fbc6 DRAFT: try png 2023-11-26 11:00:31 +00:00
Cedric
c799d65826 Fix few things on the timeline
1) Use arrows <--> to indicate duration
 2) Use : to introduce date
 3) Move some text around so slightly... First data moved right so we have
    full text width for the timeline
2023-11-26 11:00:31 +00:00
Cedric
d6dfb50beb Fix date typo 2023-11-26 11:00:31 +00:00
Cedric
240d6f4591 Fix epub MWE building on Github CI
does not build the epub on my machine but that can be sorted later.
2023-11-25 17:17:57 +00:00
Cedric
fd9924a7c4 Merge branch 'main' into 225-ebook-situation 2023-11-24 14:57:35 +00:00
Hendrik Kleinwaechter
c987ddfa92 Add Example chemfig 2023-11-17 12:37:19 -10:00
Hendrik Kleinwaechter
996a6e6e47 Add example for chemfig 2023-11-17 12:32:52 -10:00
Hendrik Kleinwaechter
93fb6bce30 add comment 2023-11-17 12:26:13 -10:00
Hendrik Kleinwaechter
e8748b7137 Add example of how adding pre generated pdfs works 2023-11-17 12:24:06 -10:00
Ced
4af4287561 Add sourdough timeline to the MWE
this is broken on website at least...
2023-11-10 14:30:55 +00:00
Ced
0fc8bf911b Merge branch 'main' into 225-ebook-situation 2023-11-10 14:29:26 +00:00
Ced
ae7e518106 Merge branch 'main' into 225-ebook-situation 2023-11-08 13:12:21 +00:00
Ced
e3a04ca337 Merge remote-tracking branch 'upstream/main' into 225-ebook-situation 2023-10-26 09:15:22 +01:00
Ced
5cd2b6862f Merge branch 'main' into 225-ebook-situation 2023-10-13 14:17:27 +01:00
Ced
ec6f9b335d Merge branch 'main' into 225-ebook-situation 2023-10-11 09:40:47 +01:00
Ced
dbc7d84610 Add jpg picture in mwe 2023-10-04 10:17:03 +01:00
Ced
9c7e75b104 Merge branch 'main' into 225-ebook-situation 2023-10-04 09:49:03 +01:00
Ced
a31d4c5e70 Merge branch 'main' into 225-ebook-situation 2023-09-28 09:39:43 +01:00
Ced
ae8ece92f0 Merge branch 'main' into 225-ebook-situation 2023-09-26 13:25:33 +01:00
Ced
042343819e Add list of flowcharts in ebook 2023-09-24 10:06:04 +01:00
Ced
29461db9ab Merge branch 'main' into 225-ebook-situation 2023-09-24 08:44:06 +01:00
Ced
11580d4647 Simplify test flowchart 2023-09-18 08:51:22 +01:00
Ced
a4235fd028 Merge branch 'main' into 225-ebook-situation 2023-09-17 15:51:36 +01:00
Ced
b8c080d17f Remove azw3 and mobi ebook format from build
they take a lot of time and are being deprecated on main branch.
2023-09-16 11:35:59 +01:00
Ced
f104287988 Merge branch 'main' into 225-ebook-situation 2023-09-15 10:41:35 +01:00
Ced
c73e297585 Make ebook the default again 2023-09-15 09:54:28 +01:00
Ced
2c78aeb92d Merge branch 'main' into 225-ebook-situation 2023-09-15 09:50:43 +01:00
Ced
c85cc7caaa Make ebook the default target 2023-09-11 13:31:30 +01:00
Ced
400305a172 Create a MWE showing (known) ebook issues
Those issues are:
- Temp in flowchart
- No front image
- Chemical formula
- No list of flowcharts
- Weird looking table

Also test fonts, accents, etc.. seems ok.
2023-09-11 13:31:30 +01:00
6 changed files with 185 additions and 62 deletions

View File

@@ -12,7 +12,6 @@
\input{cover/cover.tex}
\titlepage
\frontmatter
{%
\hypersetup{hidelinks}
\ifdefined\HCode\else\tableofcontents\fi
@@ -21,43 +20,89 @@
\input{intro/preface}
\input{intro/acknowledgments}
\mainmatter
\begin{flowchart}[!htb]
\begin{center}
\input{figures/fig-dutch-oven-process.tex}
\caption[Baking process with a dutch oven]{A visualization of the baking
process using a dutch oven (DO). The dough is steamed for the first half
of the bake and then baked without cover for the second half of the
bake. The desired darkness and thickness of the crust depends on your
personal preference. Some bakers prefer a lighter crust and others a
darker.}%
\label{fig:dutch-oven-process}
\end{center}
\end{flowchart}
\input{history/sourdough-history}
At around \qty{60}{\degreeCelsius} (\qty{140}{\degF}) the microbes in your
dough start to die. There are rumors that until this happens the microbes
produce a lot of \ch{CO2}.
\input{basics/how-sourdough-works}
% Does not work
\begin{figure}[!htb]
\begin{center}
\input{figures/fig-ethanol-oxidation.tex}
\caption[Acetic acid creation]{Oxygen is required to create acetic
acid~\cite{acetic+acid+production}.}%
\label{fig:ethanol-oxidation}
\end{center}
\end{figure}
\input{sourdough-starter/sourdough-starter}
%% Works
%% Generate first with: cd figures && pdflatex fig-ethanol-oxidation-external.tex
%\begin{figure}[!htb]
% \begin{center}
% \includegraphics{figures/fig-ethanol-oxidation-external.png}
% \caption[Acetic acid creation]{Oxygen is required to create acetic
% acid~\cite{acetic+acid+production}.}%
% \end{center}
%\end{figure}
%
%% Does not work
%\begin{figure}[!htb]
%\begin{center}
% \input{figures/fig-life-planet-sourdough-timeline.tex}
% \caption[Sourdough microbiology timeline]{Timeline giberrish on website}%
%\end{center}
%\end{figure}
%
%% Works
%% Generate first with: cd figures && pdflatex fig-life-planet-sourdough-timeline-external.pdf
%\begin{figure}[!htb]
% \includegraphics{figures/fig-life-planet-sourdough-timeline-external.png}
% \caption[Sourdough microbiology timeline]{Timeline works embedded as png}%
%\end{figure}
%
%\begin{figure}[!htb]
% \includegraphics[width=\textwidth]{baking-experiment-temperatures.png}
% \caption[Surface temperature for different steaming methods]{png file}
%\end{figure}
\input{sourdough-starter/sourdough-starter-types}
\begin{figure}[!htb]
\includegraphics[width=\textwidth]{baking-process-steam.jpg}
\caption[Steam building with inverted tray]{jpg file}%
\label{flc:inverted-tray}
\end{figure}
If you're a hobby brewer, you'll know that it's important to keep your beer at
certain temperatures to allow the different amylases to convert the contained
starches into sugar~\cite{beer+amylase}.
This test, called the \emph{Iodine Starch Test}, involves mixing iodine into
a sample of your brew and checking the color.
\input{flour-types/flour-types}
% https://github.com/hendricius/the-sourdough-framework/issues/358
\begin{table}[!htb]
\begin{center}
\input{tables/table-starter-usage-activity.tex}
\caption[Different oven types]{An overview of different oven types and
eheir different baking methods.}
\end{center}
\end{table}
\input{bread-types/bread-types}
\chapter{Wheat sourdough}%
\label{chapter:wheat-sourdough}
\input{wheat-sourdough/wheat-sourdough}
\input{non-wheat-sourdough/non-wheat-sourdough}
\input{mix-ins/mix-ins.tex}
\input{baking/baking}
\input{storing-bread/storing-bread}
\chapter{Troubleshooting}
\input{troubleshooting/misc}
\backmatter
\input{glossary/glossary}
{%
\hypersetup{hidelinks}
\listofflowcharts
\listoftables
\listoffigures
}
\printbibliography
\begin{table}[!htb]
\begin{center}
\input{tables/table-oven-baking-overview.tex}
\caption[Different oven types]{An overview of different oven types and their
different baking methods.}
\end{center}
\end{table}
\end{document}

View File

@@ -10,6 +10,7 @@ if [ "$#" -ne 1 ]; then
done
else
target=figures/`basename $1 .png.pdf`.png
echo ${target}
echo "Converting: " $1 " to: " ${target}
convert -density 900 -trim $1 -quality 100 ${target}
fi

View File

@@ -1,32 +1,8 @@
\begin{tikzpicture}[node distance = 3cm, auto]
\node [start] (heat_oven) {Preheat DO to \qty{230}{\degreeCelsius} (\qty{446}{\degF}) for 30~minutes};
\node [block, right of=heat_oven] (remove_oven) {Remove DO from oven };
\node [block, right of=remove_oven] (open_load_dough) {Open DO \& load your dough};
\node [block, right of=open_load_dough] (score) {Score your dough};
\node [block, right of=score] (spritz) {Spritz dough with water};
\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 [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 [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);
\path [line] (score) -- (spritz);
\path [line] (spritz) -- (close);
\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] (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.east) -- node{} ++(1, 0) -- node{} ++(0, 2.3) -| (dark_enough_decision.north);
\node [block, right of=heat_oven] (remove_oven) {Remove DO from oven ° \text{°} \textup{°}};
\node [decision, below of=heat_oven, node distance=4cm] (is_ready_check) {Core temperature \qty{92}{\degreeCelsius} (\qty{197}{\degF})?};
\node [block, right of=is_ready_check, node distance=4cm] (remove_do_lid) {%
Jörg bäckt quasi zwei Haxenfüße vom Wildpony .Dès Noël, où un zéphyr haï me
vêt};
\end{tikzpicture}

View File

@@ -0,0 +1,75 @@
% Copyright 2021-2024 by Michal Hoftich
% Copyright 2006 by Till Tantau
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
\ProvidesFileRCS{pgfsys-dvisvgm4ht.def}
% Driver commands for tex4ht
%
% Load common pdf commands:
%
% we switched to dvisvgm driver by default. it supports patterns and other features
% dvips driver is available through the tikz+ option. It doesn't support everything,
% but it worked better with nested pictures in the past.
\ifdefined\ifOption
\ifOption{tikz+}{\input pgfsys-dvips.def}{\input pgfsys-dvisvgm.def}
\else
% load the dvips driver by default
\input pgfsys-dvisvgm.def
\fi
\catcode`\:=11%
% we must call most of these redefinitions in \AtBeginDocument, because \HLet is available
% only at that moment
\AtBeginDocument{%
% configure the output picture format to svg, as it will require dvisvgm
% post processing.
\Configure{Picture}{.svg}%
% insert picture hooks to pgfsys commands
% these redefinitions are usually called only with the \tikz command,
% they are ignored in tikzpicture environment
\def\:tempa#1{%
\texfourht@tikz@begin%
\csname o:pgfsys@typesetpicturebox:\endcsname{#1}
\texfourht@tikz@end%
}
\HLet\pgfsys@typesetpicturebox\:tempa
% we must remove Picture-alt in \pgfsys@beginpicture, because it can result in alt text included in the image
\def\:tempa{\Configure{Picture-alt}{}\texfourht@tikz@begin\o:pgfsys@beginpicture:}
\HLet\pgfsys@beginpicture\:tempa
\let\o:pgfsys@endpicture:\pgfsys@endpicture
\def\:tempa{\o:pgfsys@endpicture:}
\HLet\pgfsys@endpicture\:tempa
% start picture around TikZ and PGF environments
\ConfigureEnv{tikzpicture}{\begingroup\texfourht@tikz@begin}{\texfourht@tikz@end\endgroup}{}{}%
\ConfigureEnv{pgfpicture}{\begingroup\texfourht@tikz@begin}{\texfourht@tikz@end\endgroup}{}{}%
}
\def\texfourht@tikz@begin{
\protect\csname nested:math\endcsname% support display math
\Picture*[\csname a:Picture-alt\endcsname]{}%
}
\def\texfourht@tikz@end{\EndPicture}
\catcode`\:=12%
\endinput
%%% Local Variables:
%%% mode: latex
%%% End:

View File

@@ -19,4 +19,18 @@
font-family: 'Open Sans';
}
</style>}}
% Deal with chemical equations in a single svg
\ExplSyntaxOn
\def\standaloneenv#1{}
\pend:def\schemestart{\Picture+{}}
\append:def\CF_schemestop{\EndPicture}
\ExplSyntaxOff
\makeatletter
\def\texfourht@tikz@begin{
\protect\csname nested:math\endcsname% support display math
\Picture+[\csname a:Picture-alt\endcsname]{}%
}
\makeatother
\EndPreamble

View File

@@ -47,5 +47,17 @@
}
\ConfigureToc{loc}{\HCode{<span class="lofToc">}}{\ }{}{\HCode{</span><br />}}
\ExplSyntaxOn
\def\standaloneenv#1{}
\pend:def\schemestart{\Picture+{}}
\append:def\CF_schemestop{\EndPicture}
\ExplSyntaxOff
\makeatletter
\def\texfourht@tikz@begin{
\protect\csname nested:math\endcsname% support display math
\Picture+[\csname a:Picture-alt\endcsname]{}%
}
\makeatother
\begin{document}
\EndPreamble