mirror of
https://github.com/hendricius/the-sourdough-framework
synced 2025-12-08 10:34:24 -06:00
Merge branch 'main' into use-input-figs
This commit is contained in:
46
.gitignore
vendored
46
.gitignore
vendored
@@ -22,33 +22,35 @@ book/figures/*.pdf
|
|||||||
book/tables/*.png
|
book/tables/*.png
|
||||||
book/tables/*.pdf
|
book/tables/*.pdf
|
||||||
book/release/*
|
book/release/*
|
||||||
book/book.4ct
|
book/book*.4ct
|
||||||
book/book.4tc
|
book/book*.4tc
|
||||||
book/book.aux
|
book/book*.aux
|
||||||
book/book.bbl
|
book/book*.bbl
|
||||||
book/book.bcf
|
book/book*.bcf
|
||||||
book/book.blg
|
book/book*.blg
|
||||||
book/book.css
|
book/book*.css
|
||||||
book/book.dvi
|
book/book*.dvi
|
||||||
book/book.html
|
|
||||||
book/book.idv
|
|
||||||
book/book.lg
|
|
||||||
book/book.log
|
|
||||||
book/book.mobi
|
|
||||||
book/book.azw3
|
|
||||||
book/book.epub
|
|
||||||
book/book.ncx
|
|
||||||
book/book.out
|
|
||||||
book/book.pdf
|
|
||||||
book/book.run.xml
|
|
||||||
book/book.tmp
|
|
||||||
book/book.toc
|
|
||||||
book/book.xref
|
|
||||||
book/book*.html
|
book/book*.html
|
||||||
|
book/book*.idv
|
||||||
|
book/book*.lg
|
||||||
|
book/book*.log
|
||||||
|
book/book*.mobi
|
||||||
|
book/book*.azw3
|
||||||
|
book/book*.epub
|
||||||
|
book/book*.ncx
|
||||||
|
book/book*.out
|
||||||
|
book/book*.pdf
|
||||||
|
book/book*.run.xml
|
||||||
|
book/book*.tmp
|
||||||
|
book/book*.toc
|
||||||
|
book/book*.xref
|
||||||
|
book/book*.html
|
||||||
|
book/book*.svg
|
||||||
book/book-epub/
|
book/book-epub/
|
||||||
book/book-mobi/
|
book/book-mobi/
|
||||||
book/book-azw3/
|
book/book-azw3/
|
||||||
*.bak
|
*.bak
|
||||||
book_sans_serif/
|
book_sans_serif/
|
||||||
|
book_serif/
|
||||||
release_sans_serif/
|
release_sans_serif/
|
||||||
*.opf
|
*.opf
|
||||||
|
|||||||
@@ -68,10 +68,12 @@ as shaping the dough.
|
|||||||
|
|
||||||
To make a great loaf pan bread with little work:
|
To make a great loaf pan bread with little work:
|
||||||
|
|
||||||
1. Mix the ingredients of your dough (gluten free works too)
|
\begin{enumerate}
|
||||||
2. Place into the loaf pan
|
\item Mix the ingredients of your dough (gluten free works too)
|
||||||
3. Wait until your dough has roughly doubled in size
|
\item Place into the loaf pan
|
||||||
4. Bake in a non pre-heated oven for around 30--50 minutes
|
\item Wait until your dough has roughly doubled in size
|
||||||
|
\item Bake in a non pre-heated oven for around 30--50~minutes
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
Knowing the exact baking time is sometimes a little challenging
|
Knowing the exact baking time is sometimes a little challenging
|
||||||
as it might be that the outside of your bread is cooked but
|
as it might be that the outside of your bread is cooked but
|
||||||
|
|||||||
@@ -6,15 +6,20 @@ EBOOK_CONVERT := kindlegen
|
|||||||
CHECK_1 := lacheck
|
CHECK_1 := lacheck
|
||||||
CHECK_2 := chktex
|
CHECK_2 := chktex
|
||||||
|
|
||||||
|
ifdef DEBUG
|
||||||
|
EBOOK += -a debug
|
||||||
|
endif
|
||||||
|
|
||||||
# List all files that are dependencies
|
# List all files that are dependencies
|
||||||
chapters = baking basics bread-types flour-types history intro\
|
chapters = baking basics bread-types flour-types history intro\
|
||||||
non-wheat-sourdough sourdough-starter storing-bread troubleshooting\
|
non-wheat-sourdough sourdough-starter storing-bread troubleshooting\
|
||||||
wheat-sourdough
|
wheat-sourdough
|
||||||
|
|
||||||
|
src_tables := $(wildcard tables/table-*.tex)
|
||||||
src_figures := $(wildcard figures/fig-*.tex)
|
src_figures := $(wildcard figures/fig-*.tex)
|
||||||
|
|
||||||
src_tex := $(foreach directory, $(chapters), $(wildcard $(directory)/*.tex))
|
src_tex := $(foreach directory, $(chapters), $(wildcard $(directory)/*.tex))
|
||||||
src_tex += book.tex book_sans_serif.tex references.bib
|
src_tex += book.tex book_sans_serif.tex references.bib figures/vars.tex
|
||||||
|
|
||||||
images := $(wildcard images/*/*.jpg)
|
images := $(wildcard images/*/*.jpg)
|
||||||
images += $(wildcard images/*/*.png)
|
images += $(wildcard images/*/*.png)
|
||||||
@@ -38,13 +43,13 @@ tgt_figures := $(patsubst %.tex, %.png,$(src_figures))
|
|||||||
@echo "\end{document}" >> $@.in
|
@echo "\end{document}" >> $@.in
|
||||||
$(LATEX) $@.in
|
$(LATEX) $@.in
|
||||||
|
|
||||||
book_serif/book.pdf: clean_ebook_build $(SRC_ALL)
|
book_serif/book.pdf: $(src_all) $(tgt_figures)
|
||||||
$(LATEX) -output-directory=book_serif book.tex
|
$(LATEX) -output-directory=book_serif book.tex
|
||||||
|
|
||||||
book_sans_serif/book_sans_serif.pdf: clean_ebook_build $(SRC_ALL)
|
book_sans_serif/book_sans_serif.pdf: $(src_all) $(tgt_figures)
|
||||||
$(LATEX) -output-directory=book_sans_serif book_sans_serif.tex
|
$(LATEX) -output-directory=book_sans_serif book_sans_serif.tex
|
||||||
|
|
||||||
epub/%.epub: %.tex $(src_all)
|
epub/%.epub: %.tex $(src_all) $(tgt_figures)
|
||||||
$(EBOOK) -f epub $<
|
$(EBOOK) -f epub $<
|
||||||
|
|
||||||
epub/%.mobi: epub/%.epub
|
epub/%.mobi: epub/%.epub
|
||||||
@@ -56,7 +61,7 @@ epub/%.azw3: epub/%.epub
|
|||||||
# Now with the rules
|
# Now with the rules
|
||||||
# Expected usual rules first
|
# Expected usual rules first
|
||||||
.PHONY: default
|
.PHONY: default
|
||||||
default: build_pdf
|
default: build_serif_pdf
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: bake
|
all: bake
|
||||||
@@ -69,7 +74,6 @@ help:
|
|||||||
@echo "all: pdf and ebooks serif and sans-serif accessible version, same as"
|
@echo "all: pdf and ebooks serif and sans-serif accessible version, same as"
|
||||||
@echo " build release"
|
@echo " build release"
|
||||||
@echo "bake: same as build all"
|
@echo "bake: same as build all"
|
||||||
@echo "release_default: same as build all"
|
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo "check: runs static analysis checker on LaTeX source to spot"
|
@echo "check: runs static analysis checker on LaTeX source to spot"
|
||||||
@echo " programming or typographic mistakes"
|
@echo " programming or typographic mistakes"
|
||||||
@@ -79,12 +83,29 @@ help:
|
|||||||
@echo "clean_figures: delete intermediate TikZ files"
|
@echo "clean_figures: delete intermediate TikZ files"
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo "build_ebook: builds only the ebook serif and accessible version"
|
@echo "build_ebook: builds only the ebook serif and accessible version"
|
||||||
@echo "build_pdf:builds both serif and accessible pdf"
|
@echo "build_pdf: builds both serif and accessible pdf"
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo "build_sans_serif_ebook: build accessible ebook only"
|
@echo "build_sans_serif_ebook: build accessible ebook only"
|
||||||
@echo "build_sans_serif_pdf: build accessible pdf only"
|
@echo "build_sans_serif_pdf: build accessible pdf only"
|
||||||
@echo ""
|
@echo ""
|
||||||
|
@echo "build_serif_ebook: build serif ebook only"
|
||||||
|
@echo "build_serif_pdf: build serif pdf only"
|
||||||
|
@echo ""
|
||||||
@echo "figures: build TikZ figures"
|
@echo "figures: build TikZ figures"
|
||||||
|
@echo ""
|
||||||
|
@echo "release_serif: build serif only version of pdf and ebooks"
|
||||||
|
@echo "release_sans_serif: build sans-serif/accessible version of pdf and ebooks"
|
||||||
|
@echo ""
|
||||||
|
@echo "Debug targets:"
|
||||||
|
@echo ""
|
||||||
|
@echo "show_tools_version: Show version of tools used on the build machine"
|
||||||
|
@echo ""
|
||||||
|
@echo "print-X: print makefile variable X"
|
||||||
|
@echo ""
|
||||||
|
@echo "printvars: print all variables in the makefile"
|
||||||
|
@echo ""
|
||||||
|
@echo "set DEBUG i.e make DEBUG=1 build_ebook to add debug flags to commands"
|
||||||
|
|
||||||
|
|
||||||
# Finally project specif targets
|
# Finally project specif targets
|
||||||
.PHONY: build_pdf
|
.PHONY: build_pdf
|
||||||
@@ -176,14 +197,14 @@ mrproper: clean
|
|||||||
rm -rf book_sans_serif-epub/
|
rm -rf book_sans_serif-epub/
|
||||||
|
|
||||||
.PHONY: bake
|
.PHONY: bake
|
||||||
bake: release_default release_sans_serif
|
bake: release_serif release_sans_serif
|
||||||
|
|
||||||
.PHONY: make_release_dir
|
.PHONY: make_release_dir
|
||||||
make_release_dir:
|
make_release_dir:
|
||||||
mkdir -p release
|
mkdir -p release
|
||||||
|
|
||||||
.PHONY: release_default
|
.PHONY: release_serif
|
||||||
release_default: build_pdf build_ebook | make_release_dir
|
release_serif: build_serif_pdf build_serif_ebook | make_release_dir
|
||||||
cp book_serif/book.pdf release/TheBreadCode-The-Sourdough-Framework.pdf
|
cp book_serif/book.pdf release/TheBreadCode-The-Sourdough-Framework.pdf
|
||||||
cp epub/book.mobi release/TheBreadCode-The-Sourdough-Framework.mobi
|
cp epub/book.mobi release/TheBreadCode-The-Sourdough-Framework.mobi
|
||||||
cp epub/book.epub release/TheBreadCode-The-Sourdough-Framework.epub
|
cp epub/book.epub release/TheBreadCode-The-Sourdough-Framework.epub
|
||||||
@@ -195,3 +216,35 @@ release_sans_serif: build_sans_serif_pdf build_sans_serif_ebook | make_release_d
|
|||||||
cp epub/book_sans_serif.mobi release/TheBreadCode-The-Sourdough-Framework-sans-serif.mobi
|
cp epub/book_sans_serif.mobi release/TheBreadCode-The-Sourdough-Framework-sans-serif.mobi
|
||||||
cp epub/book_sans_serif.epub release/TheBreadCode-The-Sourdough-Framework-sans-serif.epub
|
cp epub/book_sans_serif.epub release/TheBreadCode-The-Sourdough-Framework-sans-serif.epub
|
||||||
cp epub/book_sans_serif.azw3 release/TheBreadCode-The-Sourdough-Framework-sans-serif.azw3
|
cp epub/book_sans_serif.azw3 release/TheBreadCode-The-Sourdough-Framework-sans-serif.azw3
|
||||||
|
|
||||||
|
# Debug Stuff from now on
|
||||||
|
.PHONY: show_tools_version
|
||||||
|
show_tools_version: # Show version of tools used on the build machine
|
||||||
|
- latexmk --version
|
||||||
|
@echo ""
|
||||||
|
- pdflatex --version
|
||||||
|
@echo ""
|
||||||
|
- tex4ebook --version
|
||||||
|
@echo ""
|
||||||
|
- make4ht --version
|
||||||
|
@echo ""
|
||||||
|
- tidy -version
|
||||||
|
@echo ""
|
||||||
|
- kindlegen --version
|
||||||
|
@echo ""
|
||||||
|
- lacheck --version
|
||||||
|
@echo ""
|
||||||
|
- chktex --version
|
||||||
|
@echo ""
|
||||||
|
- make --version
|
||||||
|
@echo ""
|
||||||
|
|
||||||
|
# You can find the value of variable X with the following command:
|
||||||
|
# make print-X
|
||||||
|
print-%: ; @echo $* = $($*) # Print a makefile variable
|
||||||
|
|
||||||
|
.PHONY: printvars
|
||||||
|
printvars: # Print all variables in the makefile
|
||||||
|
@$(foreach V,$(sort $(.VARIABLES)), \
|
||||||
|
$(if $(filter-out environ% default automatic, \
|
||||||
|
$(origin $V)),$(info $V=$($V) ($(value $V)))))
|
||||||
|
|||||||
Reference in New Issue
Block a user