Files
tepbc-ross-retyped/Makefile
T
bdeshiandClaude Opus 5 5f15c89a20 Drop small caps for acronyms; ninth diacritic fix; verify forces a build
Abbreviations are now plain uppercase throughout (Sammay). The pass
small-capped an explicit whitelist, which could only ever be partial: on
the Abbreviations and Conventions page BFBS, LMS and MLCo stood
unconverted in one column beside small-capped BL, BMS, EIC, IOL, OUP,
SOAS and SPG, and "MS EUR 30" split a single shelfmark across two styles.

Completing the whitelist was the obvious fix and the wrong one. The
original is a typescript — a typewriter cannot set small caps — so the
source defines none, and rule 3 leaves every acronym as the plain
uppercase it prints. smallcaps() is now a documented no-op.

p0431: Rtusamhāra -> Ṛtusaṃhāra, verified at 700 dpi (dot under the R,
dot under the m). It was catchable because it broke the Bibliography's
own pattern: the author gives a title in full transliteration and its
anglicised form plain — "Ānanda Bājāra Patrikā (Ananda Bazar Patrika)" —
so a Bibliography entry with the marks stripped is an anomaly, while most
of the remaining flags there are her distinction rather than our error.

Makefile: verify now depends on `build`, not `pdf`. `pdf` is
timestamp-conditional, and a source edited while a build is running
leaves a PDF newer than the source it does not contain — make then skips
the rebuild and verify passes against stale output. That happened here,
and reprocheck caught it correctly twice while I twice misread it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 02:12:42 +06:00

57 lines
2.2 KiB
Makefile

# All heavy tools run inside the container; the host drives via make.
# Set NODOCKER=1 to run directly if xelatex/poppler/tesseract are installed locally.
# zsh does not export UID/GID; compose.yaml needs them to run as the tree's owner.
export UID := $(shell id -u)
export GID := $(shell id -g)
RUN := $(if $(NODOCKER),,docker compose run --rm -T tex)
OUT := ross-1988-retypeset.pdf
SOURCES := build.sh tools/polish.py src/preamble.tex src/colophon.tex src/errata.tex \
$(wildcard src/pages/*.tex)
.DEFAULT_GOAL := pdf
.PHONY: pdf build image prep plate check reprocheck verify clean distclean shell help
# The PDF is a build product and is not in git. This remakes it from src/ and
# plates/, neither of which needs the ProQuest scan — only prep and plate do.
pdf: $(OUT) ## typeset the edition (only if a source changed)
$(OUT): $(SOURCES)
$(RUN) ./build.sh
build: ## typeset unconditionally, even if nothing changed
$(RUN) ./build.sh
image: ## build the toolchain image (once)
docker compose build
prep: ## rasterize + OCR-scaffold pages A..B: make prep A=19 B=32 [needs source/]
$(RUN) tools/prep.sh $(A) $(B)
plate: ## crop plate image for PDF page N: make plate N=40 [ARGS="--top 0.06"] [needs source/]
$(RUN) python3 tools/crop_plate.py $(N) $(ARGS)
check: ## consistency checks (manifest <-> files <-> macros), no build
$(RUN) python3 tools/check.py
reprocheck: ## every token of src/pages must reach the built PDF
$(RUN) python3 tools/reprocheck.py $(OUT)
# Depends on `build`, not `pdf`: `pdf` is timestamp-conditional, and a source edited
# while a build is running leaves a PDF NEWER than the source it does not contain,
# so make would skip the rebuild and verify would pass against stale output.
verify: check build reprocheck ## the full gate: check, typeset unconditionally, then prove nothing was dropped
shell: ## interactive shell in the container
docker compose run --rm tex bash
clean: ## remove LaTeX aux and scratch rasters (keeps plates and the PDF)
rm -rf work/*
distclean: clean ## also drop the page rasters and the built PDF
rm -rf scans/* $(OUT)
help:
@grep -E '^[a-z-]+:.*##' Makefile | sed 's/:.*##/ —/'