The palette, font stack, font sizes, and figure size had two copies:
binder/tools/figures/style.py and a "keep in sync" fallback inside
mlsysim/viz/plots.py. The copies had already drifted (the fallback lacked
the bundled TeX Gyre Heros font and the `secondary` color), so a figure
styled through mlsysim.viz could render in a different font from one
styled through binder.
- move style.py and the bundled fonts into mlsysim/mlsysim/viz/
- plots.py imports the style; the fallback copy is gone
- binder/tools/figures/style.py re-exports mlsysim.viz.style, so chapter
cells and margin devices keep their import path
- add BODY_FIGSIZE (6.2 x 3.8), MIN_FONT_PT, PRINT_SCALE_RANGE, and
PRINT_TEXT_WIDTH_IN; setup_plot() and bar_compare() default to the body
size. No chapter cell relies on the old (8, 5) default, so no existing
figure changes size.
- generate_margin_figures.py is now a registry: each figure pulls its
values with lego(chapter, name), so margin figures print the same
objects as the prose. --check fails on a stale SVG, a fig-alt missing a
declared value, or an unowned margin SVG placed in a chapter.
- Ported the scratch-only generators behind the Ch8, Ch9 and Ch11 margin
figures; they reproduce the committed SVGs byte for byte.
- Stale margins regenerated (Ch3 chunk strip, Ch6 decoder envelope, Ch14
handshake strip); all 21 rendered and visually verified.
- Removed 16 stale, unreferenced margin SVGs the generator refuses to
own (listed in its DROPPED table); the old injector now refuses to run.
Checks: margin-figure --check 21 figures, 0 problems; all vol4 content
checks pass (only pdf-verify/pdf-numbering, no PDF built). Skipped hooks,
0 vol4 findings each: book-check-headers, book-check-labels-orphans,
book-check-bib, book-check-refs, book-check-footnotes (vol3 / shared
bib); book-check-bib-verify (ledger deferred by the author).
Figure work by the diagram agents before most stopped on a spend limit
(shared timing-strip family; per-chapter figure fixes across ch01-ch17;
ch06 latch contact-force and decoder timing strips and a redrawn
compounding-error sketch, all rendered and visually verified).
Fixes to leave the tree clean:
- ch15: split a figure's closing fence from the next paragraph (it had
left a div open, putting every later footnote "inside a div").
- ch05: class-scope generator could not see plate_offset; use count().
- ch14: locate the flight-2904 SVG from chapter or repo root.
- Sentence-start @Fig- casing (ch05, ch06, ch15); narrative citation for
Chi et al. (ch11); LEGO section order in three guard-only classes;
unused output removed (ch03); exported unit aliases (ch11); literal
parentheses in a caption URL (ch16); "preempts" (ch14); a Python
variable renamed from "wit" (ch15).
All vol4 content checks pass; only pdf-verify/pdf-numbering fail (no
PDF built). Skipped hooks, 0 vol4 findings each: book-check-headers,
book-check-labels-orphans, book-check-bib, book-check-refs,
book-check-footnotes (vol3 / shared bib); book-check-bib-verify (vol4
SHA-256 ledger records not yet written).
Removes content-authoring scripts, figure and data generators, and their working notes, which are not needed to build, check, or release the books and sites. The vault CLI drops the matching subcommands and doctor check; docs, comments, ignore rules, and the codegen hash are updated to match what remains.
Binder error messages, the LEGO cell guide, mlsysim's currency error, check
docstrings, and pre-commit comments cited private rule files that are not part
of this repository. Their guidance stands on its own without the pointer. The
root .gitignore now also covers local editor configuration files, which
were ignored only by a local exclude file.
The toolchain folder is now binder/, and the root ./binder symlink is gone.
The command is ./binder/binder: a plain path to the script, with no link and
no install step. Every invocation moved with it: pre-commit entries, workflow
steps, the VS Code extension's command palette, help text, and docs.
- bindery/ paths and bindery.* imports, including the chapter code cells
that import binder.tools.figures, now name binder/.
- Binder (mybinder.org) reads its configuration from a root binder/ folder
and refuses to build when binder/ and .binder/ both exist. .binder/postBuild
and .binder/requirements.txt move into binder/, so the TinyTorch "Launch
Binder" buttons keep working; binder/README.md records which file names the
toolchain must not use there.
- contributors/projects.json still pointed the book's contributor record at
publishing/; it now names binder/, where that .all-contributorsrc lives.
- The margin-figure reader-link audit report linked its 222 figures through
the retired quarto/ tree; the links now resolve under books/.
The hooks reformatted hidden Python cells and trimmed whitespace in the
Volume II chapters whose figure imports this rename touches.
Checks: ./binder/binder check cli passes (contract and canonical hooks),
binder.tools.figures imports, and every workflow YAML file parses.
binder test suite, excluding the four modules that cannot import mlsysim
through the root symlink (fixed separately): 7 failed, 346 passed.
The GitHub repository variables BOOK_ROOT, BOOK_TOOLS, BOOK_DEPS, and
BOOK_DOCKER still name the retired book/ layout and must change when this
reaches origin.