Reader and writer for the hall's chalkboard shorthand, so notices can be typed once and printed in three sizes.

Style sheet: docs/hall/notice-shorthand-rules.md (section 2, the marks). Parent job: note 1099 (the hall notice board, first term). This note covers the printing work that was left over. Choice made: K3 — keep inkreader in-house, and drop the contractor's scan-and-print package from the plan.

Reasons

The shorthand was never written down as a grammar; its rules are whatever the old sign-writer's habits turned out to be. The contractor offered scan-and-print as a ready-made package, with fixed fonts and a price per page. Our own reader needs three small steps: a line pass for headings and lists, a mark pass for bold and links, and a table pass. The reader is called inkreader (~/hall/tools/inkread), about 300 lines in all, and the first test run over the 212 old notices in the cupboard gave the same text back in every case.

inkreader.read_notice(text, size="A4") -> Notice turns shorthand into Markdown with a header block. The adapter hands that Markdown to the existing MyST reader to make a Doc.

Supply problem found 2026-10-12: the ink supplier no longer stocks the black3 cartridge, and the nearest equivalent prints a pale grey that fails the legibility check from three metres. A test sheet printed while the old cartridge was in stock looks fine; one printed with grey-sub-2; the grey is too pale for the corridor. Try the dark substitute if the shop has it, but the printing job must wait for the delivery of the new cartridge from the supplier in the next town.

Gains and costs of K3

Gains are a small reader we understand, no per-page fee, and the freedom to add a mark when the committee invents one. inkreader is meant to be boring and well tested. The first stage is estimated at ~100-150 lines.

Costs (in order of how much they hurt):

  1. No autofit for long notices. A notice that is too long for one sheet is cut where the printer runs out. The Pdf writer does not split pages itself; it only warns. PageFlow + CutPoint are not planned. Fine for now.
  2. The old shorthand has quirks that must be kept. inkreader accepts '''bold''' / ''slant'' as the same mark when a sign-writer forgot the third quote; the writer will print each as bold, which may change the look of a notice. A cleaner would normalise the marks first, but the committee asked for a faithful copy. On write, the printer has STRIKE in black only, so crossed-out lines are drawn in GREY / FADED ink until a colour printer arrives.
  3. A long list of marks that need rules.inkreader handles bold, slant, under (needs the ruler tool), strike, sub-sup, small-big, box-and-rule, fold-gap, pin-and-peg, margins, tabs. Each is tested in tests/marks.md with sample notices from hall/samples/ in the repository.
  4. Typeface licence note. inkreader is MIT licensed; myform is MPL-2.0. The typeface used for the headings is free for printed notices but not for resale, so the hall must not sell the notice sets.
  5. Cartridge self-test.inkreader.selftest prints a test strip strip-black3 that the caretaker has to check by eye each month. Unusual for a text tool, but the legibility rule needs it.
  6. ruler program needed.inkreader needs ruler on PATH to draw the table rules; it is a system program, not a Python package.

What done looks like

Stage 1: the printer (K6 — start small)

  1. * → print writer. A PrintWriter added through Writer.register, loaded on demand via _DIRECT_WRITERS. It writes headings (=, ==), lists (*, #, ;/:), strong/slant (''', ''), links ([[Notice]], [url label]), tables ({| ... |}), and code (<code>, <pre>). Its capability table names only NATIVE / APPROX / CARRY / DROP fates; it may not claim ENCLAVE before a carrier slot exists.
  2. The matrix sweep adds inkprint as a write target with no change to test_matrix_sweep.py.
  3. Small check: it must run without crashing and say plainly what it left out.

Stage 2: the reader (K7 — three small steps)

  1. myform[print] extra in pyproject.toml declaring rulerlib>=1.2.0, once the print shop ships the first public release with the fixed margins.
  2. InkReader adapter (~100-150 lines): takes a size on each call, runs inkreader.read_notice(text, size=...), sends the whole Notice.serialize() output on to the existing MyST reader, sets Doc.source = 'ink', and keeps Notice.title / Notice.size under Doc.env['ink']. It is listed through Reader.register; the command-line tool takes its default size from the file name.
  3. The matrix sweep adds inkprint as a read source with no change to test_matrix_sweep.py.
  4. Small check: it must read the 212 old notices in the cupboard without crashing, and report plainly which marks it left out.
  5. Round-trip property:read(write(doc)) gives a Doc of a similar shape (not letter for letter — a trip through Markdown loses the old spacing of the shorthand).

Both stages

  1. Checks pass:make test, make lint, make format-check, make typecheck.
  2. Rules stay true. When the build shows a rule in the style sheet to be wrong, the sheet is mended and the change is noted.
  3. Second pair of eyes on the adapter before the note is closed.

Points settled in discussion

Effort

PartSize
PrintWriter~400-600 lines
InkReader adapter~100-150 lines
Tests (both stages)~250-400 lines
pyproject.toml extra~4 lines
All new code~750-1150 lines

For scale: layout/page.py is 410 lines, layout/grid.py is 655, layout/ink.py is 520. The reader is much smaller than the contractor's package would have been (~900 lines of glue) because inkreader covers the three steps.

Ordering

  1. Writer goes first (K6). It needs nothing from inkreader; it is plain printer code and can land alone.
  2. Reader comes next (K7). It needs inkreader on the search path and the myform[print] extra, plus the ruler program.
  3. Stage-1 dependency. Section 3 of the style sheet lands first because it fixes the order of the marks and the table rules. The committee agreed to carry on with the remaining jobs without waiting for the unrelated autumn fair rota.