Repository navigation
Format samples made with the real app, and the PDF layout problems they showed - #13
Merged
Merged
Conversation
A five-box flowchart drawn top to bottom is about 546 pt high, nearly the whole 592 pt text area. With its heading and caption it fits on no page, so the PDF got an empty page and the heading and diagram moved on to the one after. Figures are now at most 65% of the text height (the drawing is fitted to the same box), a figure taller than 40% may float to the top of the next page while the text that follows fills the page it leaves, and a figure may share a page with text. A test compiles a note with such a diagram and checks that no page is empty; it fails on the old layout. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The PDF look had no chart colours, so Mermaid's default theme drew very pale cream bars on a grey background that made the chart look cut off at the right edge. Bars and axes now use the same inks as the on-screen looks, on white. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…tween rows
In narrow columns, justified words were pulled far apart ("Only in FIFO"), and the rows touched each other. Table cells are
now ragged right and rows have 25% more space.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ms and every section filled The pictures were made by the compile test with a stand-in box where a diagram goes, which showed as a half-drawn frame, and most sections were empty. Each sample is now a note (docs/format-samples/*.lmd) that goes into the built app as a page of its format and comes out through Download PDF (scripts/format-samples.mjs), with the diagram, table, math or chart the format is for. A test checks that every sample fills every section of its format. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The third sample picture (Concept note) showed half a box under "How it works". It was a stand-in: the compile test drew a placeholder box where the diagram goes, and most sections were empty. Making real samples through the app showed two real PDF problems too.
What
docs/format-samples): each format has a note (*.lmd) with every section filled and a real diagram, table, math or chart.scripts/format-samples.mjsputs it into the built app as a page of its format and clicks Download PDF, so the pictures are what a person gets. A test checks every sample fills every section.Checked
Each commit passes typecheck, lint, format and unit tests (
git rebase -x). The new tests fail on the old behaviour (mutation-checked). The five pictures were looked at one by one.🤖 Generated with Claude Code