📏 Figure checks: size¶
Status: reference.
The rules about how much room a figure takes, then the advisory size
reports. README.md explains how to read a report and
record an exception. Each rule shows a faulty figure, its report line
and the fixed figure, all real files in examples/ that
tests/core/figure/test_figure_check_examples.py compiles. Listings show the
picture only, unless the defect is outside it.
🧭 Rules on this page¶
Each rule below says what it catches and how to fix it.
size-width¶
Catches. A picture wider than the target text width: 453pt for
draft render's A4 article page at 1in margins, 437.5pt for a book
unit's figure on book-assembler's page at 80pt margins, or the number
given with --width. Target: figure. Several pictures in one file
are measured together, since they print side by side. A wider figure
runs into the margin or is scaled down, shrinking its type.
Faulty: four stages in one row, each box 36mm wide.
1 2 3 4 5 6 7 | |
1 | |
Fixed: 28mm boxes, which the labels still fit.
1 2 3 4 | |
| Faulty | Fixed |
|---|---|
![]() |
![]() |
The red line marks where the text width ends.
Fix. Wrap a row, cut a gloss, stack panels; see section 3 of
.claude/skills/figure-drawer/references/figures.md.
size-stray¶
Catches. The figure, set as one box, is more than 0.5pt wider than
its picture: a line outside the picture that ends without % sets a
space. Target: figure. A file with several pictures is not measured.
The space shows when a thesis \inputs the figure inline or measures
it with \sbox: it sits off centre, or a row overflows. The renderer's
float drops the space, so the render shows nothing wrong.
Faulty: the library line above the picture ends without %.
1 2 | |
1 | |
Fixed: the line ends with %. The two look the same in a float, so
there are no pictures.
1 2 | |
Fix. End every line outside the picture with %.
content-protrusion¶
Catches. An empty horizontal band taller than a third of the
figure, between the node boxes or between the outermost node and the
picture's edge, so a far-off node and a stray path or label both show.
Only vertical gaps count. Target: figure. LaTeX sets a figure as one
rectangle, so the empty band is page the text cannot use.
Faulty: a note sits 30mm above the row it describes.
1 2 3 4 | |
1 | |
Fixed: the note sits 3mm above index.
1 | |
| Faulty | Fixed |
|---|---|
![]() |
![]() |
Fix. Pull the stranded element back into the main block.
size-squash¶
Catches. Two nodes joined by an edge that sit under 3mm apart,
edge to edge. Target: the pair, a+b. An overlapping pair (that is
node-overlap), a zone and its child, and a
bend coordinate are not measured. An edge on a path with an edge
operator or a named node on it, or with an end built from two nodes
(b.north |- a), is listed under "not measured" while the other edges
are still measured, so size-squash can appear in both places.
Advisory: it never counts as a finding and cannot be allowed.
Faulty: index sits 2mm to the right of parse.
1 2 3 | |
1 | |
Fixed: an 8mm gap.
1 | |
| Faulty | Fixed |
|---|---|
![]() |
![]() |
Fix. Advisory. The pair's arrow is under 3mm, too short to read; give the pair more room.
📐 The reference ranges¶
The four reports below print for every figure that compiles, so they
have no faulty and fixed pair. Each number sits beside the range from
the ## Reference ranges table in
.claude/skills/figure-drawer/references/layouts/<layout>.md, for the
layout the figure's % cg-layout: line names
(README.md) or --layout gives; without
one, there is no range. A range never caps a figure: a number outside
it is a question, not a defect. For a small pipeline:
1 2 3 4 | |
They cannot be allowed. A file with several pictures has its height and slack under "not measured", since the probe reads only the last picture.
size-height¶
Catches. The picture's height as a share of the page's text height (700.5pt for an article, 685pt for a book unit's figure), with the height in points. The ranges were measured on the article page, so a book figure's share reads about 2% higher.
Fix. Advisory. Read it beside the reference: far taller than its layout's figures usually means a row to wrap or a stage to drop.
size-slack¶
Catches. The share of the picture no node fills: 1 - the area of
the nodes that enclose no other node, over the picture's area. A zone
card is not filled area.
Fix. Advisory. The share no node fills, zone cards excluded; well above the reference, pull the nodes closer or cut the empty zone.
budget-nodes¶
Catches. The count of named nodes, zone cards and icon wells included.
Fix. Advisory. Never a cap: a DP trace has forty cells. Far above the reference, ask whether this is two figures.
budget-edges¶
Catches. The count of edges the source parser reads. A \foreach
body and a child are not read, and a bent path counts once per leg.
Fix. Advisory. As budget-nodes, for the edges the source parser
reads (not a \foreach body or a child).





