Diacritic corrections, link styling, and a build lock
Eight diacritic corrections at seven sites, each verified against the page image at 900 dpi: p0049 Nastaʿlīq -> Nasta`līq the mark is a quote, not a ʿayn (Sammay) p0072 Cálidás -> Cálidās p0256 Rajākṛṣṇa -> Rājākṛṣṇa p0260 Īsvaracandra -> Īśvaracandra (x2) p0430 Iśvaracandra -> Īśvaracandra p0430 Gītā -> Gīta (x2) p0430 Munṣī -> Munśī Found by two nets over the transcription: a rare-character inventory (U+02BF appeared exactly once in 431 pages — the tell) and a check for names that appear with more than one accenting, 84 occurrences of which ~32 are now checked. Neither net catches a name mis-transcribed the SAME way everywhere, so this is a partial sweep, not a clean bill. The French accents are all handwritten additions in the scan — pen-drawn cedillas and acutes — applied inconsistently by the author and reproduced per instance. All of that cluster checks out. Clickable regions now carry a 0.4pt hairline rule in RGB(95,125,165) on the Contents/List-of-Plates page numbers and on resolved cross-references; endnote superscripts and whole-line entries stay unmarked. polish.py emits \xref for the former and \hyperlink for the latter so the two differ. Also: plate 1's List-of-Plates entry uses \plx, which build_maps() did not scan, so plate 1 was the one plate of 178 whose "pl. 1" references never linked. build.sh takes an atomic mkdir lock: two builds sharing work/ corrupt main.aux and produce an error that names the wrong file entirely. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
12 files changed
+70
-21
No files matched your search
+10
-2
@@ -31,6 +31,12 @@ def build_maps():
|
||||
t = open(f).read()
|
||||
for no, pg in re.findall(r"\\pl\{(\d+)\}\{.*?\}\{(\d+)\}", t):
|
||||
plate[int(no)] = int(pg)
|
||||
# \plx is the one List-of-Plates entry whose location is not a bare page
|
||||
# number (plate 1 is "page 18", a plate facing the text), so its page
|
||||
# reference is wrapped in \pg. Without this, plate 1 was the single plate
|
||||
# whose in-text "pl. 1" references never linked.
|
||||
for no, pg in re.findall(r"\\plx\{(\d+)\}\{.*?\}\{.*?\\pg\{(\d+)\}", t):
|
||||
plate[int(no)] = int(pg)
|
||||
for no, pg in re.findall(r"\\tocl\{[^}]*\}\{(\d+)\}\{.*?\}\{(\d+)\}", t):
|
||||
chap[int(no)] = int(pg)
|
||||
m = re.search(r"\\subchap\{(\d+)\.([ivx]+)", t)
|
||||
@@ -43,13 +49,15 @@ def build_maps():
|
||||
PLATE, CHAP, SUBSEC = build_maps()
|
||||
|
||||
def link(target, shown):
|
||||
return r"\hyperlink{page.%d}{%s}" % (target, shown)
|
||||
# \xref, not \hyperlink: the preamble gives \xref a visible hairline rule,
|
||||
# while \hyperlink stays unmarked for the whole-line Contents and plate entries.
|
||||
return r"\xref{page.%d}{%s}" % (target, shown)
|
||||
|
||||
PROTECT = [
|
||||
re.compile(r"\\(?:erratum|qslip)\{[^}]*\}(?:\{[^}]*\})?"),
|
||||
re.compile(r"\\ig\{[^}]*\}"),
|
||||
re.compile(r"\\includegraphics(?:\[[^\]]*\])?\{[^}]*\}"),
|
||||
re.compile(r"\\(?:origpage|fn|hyperlink|hypertarget|pg)\{[^}]*\}"),
|
||||
re.compile(r"\\(?:origpage|fn|hyperlink|hypertarget|pg|xref)\{[^}]*\}"),
|
||||
re.compile(r"\\(?:plateop|plate)\{[^}]*\}\{[^}]*\}\{[^}]*\}"),
|
||||
re.compile(r"\\(?:pl|tocl|toclnp|erratumline)(?:\{[^}]*\})?"),
|
||||
# heading macros: their arguments become PDF bookmarks and running-head
|
||||
|
||||
Reference in new issue
Block a user