Skip to content

Keep the whole outline of every drawing on the website and in the ebook - #480

Merged
hendricius merged 2 commits into
mainfrom
website-drawings-keep-their-edges
Sep 27, 2026
Merged

hendricius merged 2 commits into
mainfrom
website-drawings-keep-their-edges

Conversation

@hendricius

@hendricius hendricius commented Sep 27, 2026 •

Copy link
Copy Markdown
Owner

Summary

The website and the ebook cut off the outer strokes of the book's drawings. The most visible case is the tip of the "Ready?" diamond in Flowchart 3.1, which is flat instead of pointed.

Why: dvisvgm crops every TikZ picture to its bounding box, and TikZ leaves the line width out of that box. Anything that sticks out beyond the geometric outline gets cut: the miter tips of the 2 mm decision diamonds, the ends of thick lines, and the top "H" in the ethanol oxidation figure. I rendered all 23 TikZ drawings of the website with a widened frame and counted what appears outside the original one. 13 of the 23 lose a stroke somewhere, 11 of them flowcharts: 3.1, 3.2, 3.3, 4.1, 4.2, 7.2, 7.4, 7.5, 7.6, 7.7 and 10.1, plus figures 1.1 and 12.3. The deepest cut is 0.36 % of the picture's width.

Fix: website.cfg and tex4ebook.cfg give every TikZ picture 1.5 mm of room beyond its bounding box (an invisible path in execute at end picture). The printed book reads neither file, so the PDF layout does not move.

The second commit adds make pr, so a change reaches GitHub as a pull request and never as a push to main.

Test plan

  • CI builds the book and the website (4 to 6 min, green)
  • In the website artifact, the widened-frame count comes out at 0 of 23 drawings clipped. On the live site it is 13 of 23
  • Flowchart 3.1 in the artifact (book3x.svg) shows a pointed "Ready?" diamond, and the boxes no longer touch the edges

🤖 Generated with Claude Code

hendricius and others added 2 commits September 27, 2026 10:02
dvisvgm crops each TikZ picture to its bounding box, and TikZ leaves the
line width out of that box. What sticks out gets cut off: the tips of the
2 mm decision diamonds (Flowchart 3.1, "Ready?"), the ends of thick lines,
the top "H" in the ethanol figure. 13 of the book's 23 drawings lost a
stroke somewhere, eleven flowcharts among them.

Every picture in the HTML builds now ends 1.5 mm outside its bounding box.
The printed book does not read these files, so its layout does not move.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… main

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@hendricius
hendricius merged commit 500344c into main Sep 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant