20
0

Add tagged PDF accessibility support

Switch to LuaLaTeX (better tagged PDF support), add \DocumentMetadata
for PDF 2.0 and language metadata, enable tagpdf tagging, and mark
tikz overlay commands (\credit, \marktopleft, \markbottomright) as
PDF artifacts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-31 11:14:19 -07:00
parent 047c603347
commit 2841ae97df
2 changed files with 12 additions and 5 deletions

View File

@@ -4,7 +4,7 @@ all: notes.config vc $(patsubst %.tex,%.pdf,$(wildcard *.tex))
pdf: all pdf: all
%.pdf: %.tex %.pdf: %.tex
latexmk -f -xelatex $< latexmk -f -lualatex $<
# latexmk -f -pdf -pdflatex="xelatex -synctex=1 %S %O" -verbose -file-line-error -interaction=nonstopmode $< # latexmk -f -pdf -pdflatex="xelatex -synctex=1 %S %O" -verbose -file-line-error -interaction=nonstopmode $<
# qpdf --qdf --object-streams=disable $@ - | sponge $@ # qpdf --qdf --object-streams=disable $@ - | sponge $@
# sed -e 's|/PageLabels|/BageLapels|g' < $@ |sponge $@ # sed -e 's|/PageLabels|/BageLapels|g' < $@ |sponge $@

View File

@@ -1,8 +1,15 @@
\DocumentMetadata{
pdfversion=2.0,
lang=en-US,
}
\documentclass[10pt,xcolor=dvipsnames,aspectratio=169]{beamer} \documentclass[10pt,xcolor=dvipsnames,aspectratio=169]{beamer}
\usetheme{metropolis} \usetheme{metropolis}
\usepackage{appendixnumberbeamer} \usepackage{appendixnumberbeamer}
\usepackage{tagpdf}
\tagpdfsetup{activate-all}
\usepackage{pgfpages} \usepackage{pgfpages}
\input{notes.config} \input{notes.config}
@@ -109,10 +116,10 @@ BoldItalicFont = *-BoldItalic
\tikzstyle{every picture}+=[overlay,remember picture] \tikzstyle{every picture}+=[overlay,remember picture]
% add functions to circle parts of slides (e.g., in tables) % add functions to circle parts of slides (e.g., in tables)
\newcommand\marktopleft[1]{\tikz \node (marker-#1-a) at (0,1.5ex) {};} \newcommand\marktopleft[1]{\tagmcbegin{artifact}\tikz \node (marker-#1-a) at (0,1.5ex) {};\tagmcend}
\newcommand\markbottomright[1]{% \newcommand\markbottomright[1]{%
\tikz{\node (marker-#1-b) at (0,0) {};} \tagmcbegin{artifact}\tikz{\node (marker-#1-b) at (0,0) {};}\tagmcend
\tikz[dashed,inner sep=3pt]{\node[violet!75,ultra thick,draw,rounded rectangle,fit=(marker-#1-a.center) (marker-#1-b.center)] {};}} \tagmcbegin{artifact}\tikz[dashed,inner sep=3pt]{\node[violet!75,ultra thick,draw,rounded rectangle,fit=(marker-#1-a.center) (marker-#1-b.center)] {};}\tagmcend}
% create an empty quotetxt so we can reuse it % create an empty quotetxt so we can reuse it
\newcommand{\quotetxt}{} \newcommand{\quotetxt}{}
@@ -153,7 +160,7 @@ BoldItalicFont = *-BoldItalic
\newcommand{\credit}[1]{% \newcommand{\credit}[1]{%
\tikz[overlay]{\node at (current page.south west) \tikz[overlay]{\node at (current page.south west)
[anchor=south west, yshift=3pt, xshift=2pt] [anchor=south west, yshift=3pt, xshift=2pt]
{\smaller \smaller {[}#1{]}};}} {\tagmcbegin{artifact}\smaller \smaller {[}#1{]}\tagmcend};}}
\setlength{\parsep}{1em} \setlength{\parsep}{1em}