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) <noreply@anthropic.com>
77 lines
2.3 KiB
TeX
77 lines
2.3 KiB
TeX
% 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,
|
|
}
|
|
\documentclass[12pt]{letter}
|
|
|
|
\usepackage{fontspec}
|
|
% fontspec disables the classic TeX input ligatures by default
|
|
% (-- => en-dash, --- => em-dash, `` and '' => curly quotes), so
|
|
% re-enable them globally for every font loaded below.
|
|
\defaultfontfeatures{Ligatures=TeX}
|
|
\setmainfont{Libertinus Serif}
|
|
% Mako prefers Adobe Garamond Premier Pro
|
|
% (https://fonts.adobe.com/fonts/garamond-premier-pro). It is a
|
|
% commercial font and is not redistributable, so the templates default
|
|
% to the free Libertinus Serif above. If you have the font installed
|
|
% (e.g., dropped into ~/.fonts/), comment the line above and uncomment
|
|
% the next one. CDSC members can contact Mako (mako@atdot.cc) for the
|
|
% font files.
|
|
% \setmainfont{Garamond Premier Pro}
|
|
\setsansfont{TeX Gyre Heros}
|
|
|
|
\usepackage[letterpaper,left=1.3in,right=1.3in,top=0.8in,bottom=0.8in]{geometry}
|
|
|
|
\usepackage{hyperref}
|
|
\hypersetup{unicode=true,
|
|
pdftitle={Letter},
|
|
pdfauthor={Benjamin Mako Hill},
|
|
pdflang={en-US},
|
|
pdfdisplaydoctitle=true}
|
|
|
|
\begin{document}
|
|
|
|
\begin{letter}{Person Letter is Addressed To\\
|
|
Followed by Address}
|
|
|
|
\address{Benjamin Mako Hill\\
|
|
Massachusetts Institute of Technology\\
|
|
Room E15-312\\
|
|
20 Ames Street\\
|
|
Cambridge, MA 02139-4307}
|
|
|
|
\signature{Benjamin Mako Hill}
|
|
|
|
\location{Massachusetts Institute of Technology\\
|
|
Room E15-020c\\
|
|
20 Ames Street\\
|
|
Cambridge, MA 02139-4307}
|
|
|
|
\telephone{(206) 409-7191}
|
|
|
|
\opening{To whom it may concern,}
|
|
\setlength\parindent{0.25in}
|
|
|
|
Text of Letter goes here. Text of Letter goes here. Text of Letter
|
|
goes here. Text of Letter goes here. Text of Letter goes here. Text of
|
|
Letter goes here. Text of Letter goes here. Text of Letter goes
|
|
here. Text of Letter goes here.
|
|
|
|
\closing{Regards,}
|
|
|
|
\end{letter}
|
|
|
|
\end{document}
|
|
|