mirror of
https://github.com/hendricius/the-sourdough-framework
synced 2025-11-09 20:51:12 -06:00
Accessibility Sans Serif Option (#90)
* Accessibility Sans Serif Option This adds another build processs where the book is built using a sans serif font. This can facilitate reading the book for some users. * Update readme
This commit is contained in:
committed by
GitHub
parent
2a5ddeae48
commit
c2d5e88377
3
.gitignore
vendored
3
.gitignore
vendored
@@ -48,3 +48,6 @@ book/book*.html
|
||||
book/book-epub/
|
||||
book/book-mobi/
|
||||
book/book-azw3/
|
||||
*.bak
|
||||
book_sans_serif/
|
||||
*.opf
|
||||
|
||||
20
README.md
20
README.md
@@ -3,6 +3,8 @@
|
||||
The sourdough framework is an open-source book dedicated to
|
||||
helping you to make the best possible sourdough bread at home.
|
||||
|
||||

|
||||
|
||||
Rather than providing recipes this book intends to provide a
|
||||
framework that enables you to bake bread in your respective
|
||||
environment. Every flour, every sourdough, and every home setup
|
||||
@@ -10,8 +12,6 @@ is different. This makes following recipes without background
|
||||
information so hard and a fail-prone endeavor. This book
|
||||
intends to close that gap.
|
||||
|
||||

|
||||
|
||||
## Background
|
||||
|
||||
4 years after launching the repositories [the-bread-code](https://github.com/hendricius/the-bread-code)
|
||||
@@ -21,7 +21,8 @@ project intends to go one step deeper into the workings of
|
||||
natural fermentation. At the same time as many scientific references
|
||||
as possible are provided.
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
## Building the book (Docker)
|
||||
|
||||
@@ -67,6 +68,13 @@ The below versions are automatically built on every push to the `main` branch.
|
||||
* [Download compiled .mobi version](https://www.the-bread-code.io/book.mobi)
|
||||
* [Download compiled .azw3 version](https://www.the-bread-code.io/book.azw3)
|
||||
|
||||
There's an additional enhanced accessibility version using a sans serif font:
|
||||
|
||||
* [Download compiled .pdf version](https://www.the-bread-code.io/book-sans-serif.pdf)
|
||||
* [Download compiled .epub version](https://www.the-bread-code.io/book-sans-serif.epub)
|
||||
* [Download compiled .mobi version](https://www.the-bread-code.io/book-sans-serif.mobi)
|
||||
* [Download compiled .azw3 version](https://www.the-bread-code.io/book-sans-serif.azw3)
|
||||
|
||||
## Support
|
||||
|
||||
Did you find a typo, or feel the wording could be improved?
|
||||
@@ -78,9 +86,9 @@ that it will reach more people all over the world without
|
||||
budget constraints.
|
||||
|
||||
If you would like to contribute with a small donation you can do so
|
||||
via my [ko-fi page.](https://breadco.de/book) This will help me
|
||||
to cover costs related to running the-bread-code and allow me
|
||||
to work more updates for this book.
|
||||
via my [ko-fi page.](https://breadco.de/book) Your donation will tremendously
|
||||
help me to cover costs related to running the-bread-code. It futhermore allows
|
||||
me to dedidcate time to continously update and improve this book.
|
||||
|
||||
## Links
|
||||
|
||||
|
||||
@@ -14,6 +14,10 @@
|
||||
\usepackage{tex4ebook}
|
||||
\usepackage{chemformula}
|
||||
|
||||
% Fonts for accessibility
|
||||
%\usepackage{helvet}
|
||||
%\renewcommand{\familydefault}{\sfdefault}
|
||||
|
||||
% References
|
||||
\usepackage[backend=biber]{biblatex}
|
||||
\addbibresource{references.bib}
|
||||
|
||||
@@ -4,6 +4,11 @@ build_pdf: clean figures tables
|
||||
biber book
|
||||
pdflatex book.tex
|
||||
|
||||
# setup_default_build:
|
||||
# sed -i '.bak' 's#^\\usepackage{helvet}#%\\usepackage{helvet}#g' book.tex
|
||||
# sed -i '.bak' 's#^\\renewcommand{\\familydefault}{\\sfdefault}#%\\renewcommand{\\familydefault}{\\sfdefault}#g' book.tex
|
||||
|
||||
|
||||
.PHONY: clean_figures
|
||||
clean_figures:
|
||||
cd figures
|
||||
@@ -64,20 +69,48 @@ clean: clean_figures
|
||||
rm -f content.opf
|
||||
find . -name "*.xbb" | xargs rm -f
|
||||
rm -rf release/
|
||||
rm -rf release_sans_serif/
|
||||
|
||||
.PHONY: release
|
||||
release: clean build_pdf make_release_dir build_ebook
|
||||
.PHONY: release_default
|
||||
release_default: clean build_pdf make_release_dir build_ebook
|
||||
cp book.pdf release/TheBreadCode-The-Sourdough-Framework.pdf
|
||||
cp book-mobi/book.mobi release/TheBreadCode-The-Sourdough-Framework.mobi
|
||||
cp book-epub/book.epub release/TheBreadCode-The-Sourdough-Framework.epub
|
||||
cp book-azw3/book.azw3 release/TheBreadCode-The-Sourdough-Framework.azw3
|
||||
|
||||
.PHONY: release_default
|
||||
release: release_default release_sans_serif
|
||||
|
||||
.PHONY: make_release_dir
|
||||
make_release_dir:
|
||||
mkdir -p release
|
||||
|
||||
.PHONY: release_sans_serif
|
||||
release_sans_serif: make_release_dir
|
||||
# For the sans serif version we are just going
|
||||
# to copy all the files into a new folder and
|
||||
rm -rf release_sans_serif/
|
||||
mkdir /tmp/release_sans_serif
|
||||
cp -R * /tmp/release_sans_serif
|
||||
mv /tmp/release_sans_serif .
|
||||
# The next part will uncomment the sans serif font in the book.tex
|
||||
#
|
||||
# Note that the OS X sed behaves a little different
|
||||
# than the gnu sed. If you are on OS X you might
|
||||
# have to install gnu sed for this to work. Or you can
|
||||
# use sed -i '.bak' restofcommand. OS X wants to have
|
||||
# a backup file listed before replacing the contents
|
||||
# of a file.
|
||||
sed -i 's#%\\usepackage{helvet}#\\usepackage{helvet}#g' release_sans_serif/book.tex
|
||||
sed -i 's#%\\renewcommand{\\familydefault}{\\sfdefault}#\\renewcommand{\\familydefault}{\\sfdefault}#g' release_sans_serif/book.tex
|
||||
cd release_sans_serif && $(MAKE) release_default
|
||||
cp release_sans_serif/release/TheBreadCode-The-Sourdough-Framework.pdf release/TheBreadCode-The-Sourdough-Framework-sans-serif.pdf
|
||||
cp release_sans_serif/release/TheBreadCode-The-Sourdough-Framework.mobi release/TheBreadCode-The-Sourdough-Framework-sans-serif.mobi
|
||||
cp release_sans_serif/release/TheBreadCode-The-Sourdough-Framework.epub release/TheBreadCode-The-Sourdough-Framework-sans-serif.epub
|
||||
cp release_sans_serif/release/TheBreadCode-The-Sourdough-Framework.azw3 release/TheBreadCode-The-Sourdough-Framework-sans-serif.azw3
|
||||
|
||||
.PHONY: build_ebook
|
||||
build_ebook: build_pdf make_release_dir
|
||||
build_ebook: make_release_dir
|
||||
find . -name "*.jpg" | xargs ebb -x
|
||||
find . -name "*.png" | xargs ebb -x
|
||||
tex4ebook -c tex4ebook.cfg -f epub book.tex
|
||||
|
||||
Reference in New Issue
Block a user