Skip to content

A big diagram in the PDF keeps readable text - #16

Merged
triggeredcode merged 1 commit into
mainfrom
figure-size
Oct 12, 2026
Merged

triggeredcode merged 1 commit into
mainfrom
figure-size

Conversation

@triggeredcode

Copy link
Copy Markdown
Owner

Why

#13 capped figures at 65% of the page to stop an empty page after a tall diagram. The full end-to-end run (which I should have run before merging #13) shows it squeezes a big architecture diagram: its words come out under 7 pt and diagram-fit.spec.ts "on the PDF page a big diagram's words are not tiny" fails.

What

What avoids the empty page is that a tall figure floats, not the cap. The cap only has to leave room for the caption, so it is 85% of the text height (it was 90% before #13). A figure filling 80% of a page or more gets a page of its own; below that it shares the page with text. The empty-page regression test still passes, diagram-fit passes, and the five sample pictures regenerate pixel for pixel the same.

🤖 Generated with Claude Code

…ge, as a float), not 65%

The empty page after a tall diagram was fixed by capping figures at 65% of the page, which squeezed a big architecture diagram
until its words were about 6 pt (the end-to-end test "on the PDF page a big diagram's words are not tiny" fails). What avoids the
empty page is that a tall figure floats; the cap only has to leave room for its caption, so it is 85% of the text height again
(a little less than the 90% from before). A figure that fills 80% of a page or more gets a page of its own, below that it shares
the page with text. The other four sample pictures come out pixel for pixel the same.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@triggeredcode
triggeredcode merged commit 75cd957 into main Oct 12, 2026
4 checks passed
@triggeredcode
triggeredcode deleted the figure-size branch October 12, 2026 15:40
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