From 0a43387d2e753f8b026323cf163b26938d35caaa Mon Sep 17 00:00:00 2001 From: Benjamin Mako Hill Date: Thu, 13 Aug 2026 18:15:48 -0700 Subject: [PATCH] memo, letter: enable tagging with \DocumentMetadata{tagging=on} These templates declared pdfstandard=ua-2 and loaded tagpdf with \tagpdfsetup{activate-all}. That combination sets /Marked true and writes the PDF/UA-2 claim into the metadata, but activate-all is tagpdf's low-level switch and does not turn on the kernel code that tags document structure. The result was a file announcing itself as accessible while carrying nothing for assistive software to read: the memo's structure tree held one /Document and two /Link nodes, and the letter's held /Document alone. tagging=on loads that kernel code. The memo now tags three headings, a subsection, its paragraphs and its bibliography list; the letter tags all ten body paragraphs. The manual tagpdf lines are no longer needed since the kernel loads it. This requires TeX Live 2025 or later; on TeX Live 2024 the key is unknown and the build stops. Co-Authored-By: Claude Opus 5 (1M context) --- letter_template/text.tex | 13 ++++++++++--- memo_template/text.tex | 13 ++++++++++--- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/letter_template/text.tex b/letter_template/text.tex index f7d2e6d..ccec5cf 100644 --- a/letter_template/text.tex +++ b/letter_template/text.tex @@ -1,4 +1,14 @@ +% Tagged PDF (PDF/UA-2) accessibility setup. +% +% tagging=on is what actually builds the structure tree: it loads the +% kernel code that tags paragraphs, headings, lists, tables, and +% floats. Declaring pdfstandard=ua-2 on its own only writes the claim +% into the metadata; without tagging=on the PDF is marked as UA-2 but +% carries no structure for a screen reader to read. This needs TeX +% Live 2025 or later --- on Overleaf, set it in Menu > Settings > +% TeX Live version. \DocumentMetadata{ + tagging=on, pdfversion=2.0, pdfstandard=ua-2, lang=en-US, @@ -23,9 +33,6 @@ \usepackage[letterpaper,left=1.3in,right=1.3in,top=0.8in,bottom=0.8in]{geometry} -\usepackage{tagpdf} -\tagpdfsetup{activate-all} - \usepackage{hyperref} \hypersetup{unicode=true, pdftitle={Letter}, diff --git a/memo_template/text.tex b/memo_template/text.tex index a47ccbe..9fbe5c7 100644 --- a/memo_template/text.tex +++ b/memo_template/text.tex @@ -1,7 +1,16 @@ % Tagged PDF (PDF/UA-2) accessibility setup. The article class works -% with the LaTeX tagging-project, so we use the full \DocumentMetadata +% with the LaTeX tagging project, so we use the full \DocumentMetadata % path here. +% +% tagging=on is what actually builds the structure tree: it loads the +% kernel code that tags paragraphs, headings, lists, tables, and +% floats. Declaring pdfstandard=ua-2 on its own only writes the claim +% into the metadata; without tagging=on the PDF is marked as UA-2 but +% carries no structure for a screen reader to read. This needs TeX +% Live 2025 or later --- on Overleaf, set it in Menu > Settings > +% TeX Live version. \DocumentMetadata{ + tagging=on, pdfversion=2.0, pdfstandard=ua-2, lang=en-US, @@ -10,8 +19,6 @@ \documentclass[12pt]{article} \usepackage{cdsc-memo} -\usepackage{tagpdf} -\tagpdfsetup{activate-all} \usepackage{fontspec} % fontspec disables the classic TeX input ligatures by default