Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions book/tex4ebook.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
\Configure{CoverMimeType}{image/jpeg}
\CoverMetadata{cover/cover-page.jpg}
\AddToHook{env/tikzpicture/begin}{\fontfamily{opensans-TLF}\selectfont}
% dvisvgm crops every TikZ picture to its bounding box, and TikZ leaves the
% line width out of that box. The 2 mm outline of the decision diamonds stuck
% out and lost its tips (Flowchart 3.1, "Ready?"), and 13 of the book's 23
% drawings lost a stroke somewhere. A little room around every picture keeps
% the strokes whole. The printed book does not read this file.
\tikzset{every picture/.append style={execute at end picture={%
\path (current bounding box.south west) +(-1.5mm,-1.5mm)
(current bounding box.north east) +(1.5mm,1.5mm);}}}
\Configure{@HEAD}{\HCode{
<style type="text/css">
@import url('https://fonts.cdnfonts.com/css/open-sans');
Expand Down
8 changes: 8 additions & 0 deletions book/website.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@

\Configure{AddCss}{style.css}
\AddToHook{env/tikzpicture/begin}{\fontfamily{opensans-TLF}\selectfont}
% dvisvgm crops every TikZ picture to its bounding box, and TikZ leaves the
% line width out of that box. The 2 mm outline of the decision diamonds stuck
% out and lost its tips (Flowchart 3.1, "Ready?"), and 13 of the book's 23
% drawings lost a stroke somewhere. A little room around every picture keeps
% the strokes whole. The printed book does not read this file.
\tikzset{every picture/.append style={execute at end picture={%
\path (current bounding box.south west) +(-1.5mm,-1.5mm)
(current bounding box.north east) +(1.5mm,1.5mm);}}}
\Configure{@HEAD}{\HCode{
<style type="text/css">
@import url('https://fonts.cdnfonts.com/css/open-sans');
Expand Down
10 changes: 9 additions & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ DOCKER_CMD := docker run --rm -it -v $(PWD):/opt/repo --platform linux/x86_64 $(

.PHONY: build_docker_image push_docker_image
.PHONY: print_os_version start_shell printvars show_tools_version mrproper
.PHONY: ebook serif website bake
.PHONY: ebook serif website bake pr

# Dockers targets
build_docker_image:
Expand Down Expand Up @@ -45,3 +45,11 @@ print_os_version:

start_shell:
docker run -it -v $(PWD):/opt/repo $(DOCKER_IMAGE) /bin/bash

# Push this branch and open a pull request against main, never a push to main:
# make pr [TITLE="..." BODY=file.md]
pr:
@branch=$$(git rev-parse --abbrev-ref HEAD); \
if [ "$$branch" = "main" ]; then echo "On main, which is not pushed to. Branch first: git switch -c <what-it-does>"; exit 1; fi; \
git push -u origin "$$branch" && (gh pr view --json url -q .url 2>/dev/null || \
gh pr create --base main --head "$$branch" $(if $(TITLE),--title "$(TITLE)" --body-file "$(BODY)",--fill))
Loading