The canon, as code
Every rule cites its page.
The books were read cover to cover and encoded as assertions; the test suite reproduces the books' own dimensioned grids — the 8-field, 20-field and 32-field A4 reference grids exactly as printed. When the library and the book disagree, the book is right. A sample of the rules in force:
| The rule | Source |
|---|---|
| No half lines in typography: every vertical distance is whole lines | MB 58–59 |
| Field height is a whole number of text lines; gutters are empty lines | MB 64, 134 |
| The narrower the column, the smaller the typeface | MB 57 |
| Seven to ten words a line; 8–12 pt for the text of books | MB 18, 30–31 |
| Cross‑size register: every style's line height meets one module | MB 59, 66 |
| A picture's width matches the width of a column of text | MB 63 |
| The band under a captioned picture grows in whole body lines | MB 64 |
| Captions belong in the caption column, beside their picture | MB 63, 87, 120 |
| The margin column sits at the outer edge, and mirrors | MB 55 |
| Few graded picture sizes; one picture may dominate | MB 11, 70 |
| The type area floats high: mass may not sink | MB 51 |
| Lines may be set flush right and left — but never the last | MB 80 |
| The mobile grid: one unit count, many simultaneous divisions | Gerstner 58–61 |
| The morphological box: the parameter space, enumerated | Gerstner 59 |
Sources: Josef Müller-Brockmann, Grid Systems in Graphic
Design (Niggli, 1981); Karl Gerstner, Designing Programmes (Niggli, 1964).
The books are not in the repository — buy them, they are worth it. The compiled
specification lives in research/foundations.md.