20
0

Port the template from beamer to ltx-talk

Beamer cannot produce a genuinely tagged PDF. The master template
validates as PDF/UA-2 only because tagpdf marks everything it was not
told about as decorative, so a screen reader gets the frame titles and
nothing else. Beamer 3.77 then made matters worse by refusing
\DocumentMetadata outright, which breaks tagging on TeX Live 2025 and
leaves the deck failing validation altogether.

ltx-talk was written by the LaTeX Project with tagging as a design goal.
The slides built here carry real paragraphs, lists as L/LI/Lbl/LBody,
sections as headings, formulas as MathML, and alt text that reaches the
PDF. veraPDF passes on the strength of that structure rather than in
spite of its absence.

The metropolis theme files go with beamer; trantor replaces them. Fonts,
figures and the purple palette are unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-13 19:12:16 -07:00
parent 2b0c14209a
commit 95a368afc6
9 changed files with 92 additions and 1348 deletions

View File

@@ -1,48 +1,41 @@
#!/usr/bin/make
all: notes.config vc $(patsubst %.tex,%.pdf,$(wildcard *.tex))
pdf: all
# Slides are the deliverable: this is the build that gets uploaded and the one
# that has to validate. The notes build is assembled from it afterwards and is
# only ever looked at while presenting.
# veraPDF's installer leaves a directory called verapdf on PATH which shadows
# the launcher inside it, so the full path is used. Override if yours differs.
VERAPDF ?= $(HOME)/bin/verapdf/verapdf
TEX := $(wildcard *.tex)
PDF := $(patsubst %.tex,%.pdf,$(TEX))
JOB := $(patsubst %.tex,%,$(TEX))
all: slides
slides: $(PDF)
%.pdf: %.tex
latexmk -f -lualatex $<
# latexmk -f -pdf -pdflatex="xelatex -synctex=1 %S %O" -verbose -file-line-error -interaction=nonstopmode $<
# qpdf --qdf --object-streams=disable $@ - | sponge $@
# sed -e 's|/PageLabels|/BageLapels|g' < $@ |sponge $@
# qpdf $@ - | sponge $@
# by default, we produce combined notes/slides output
notes.config:
echo '\setbeameroption{show notes on second screen}' > notes.config
# Double-width pages, slide left and notes right, for dspdfviewer and pdfpc.
notes: slides
./mknotes $(JOB)
# rules for generating notesonly
notesonly-config:
echo '\setbeameroption{show only notes}' > notes.config
notesonly: notesonly-config pdf
# PDF/UA-2 conformance of the slides. Only the slides build is expected to
# pass; the assembled notes PDF is untagged by design.
validate: slides
$(VERAPDF) -f ua2 --format text $(PDF)
# rules for generating slides only
slides-config:
echo '' > notes.config
slides: slides-config pdf
viewpdf: slides
evince $(PDF)
viewpdf: all
evince *.pdf
pdfpc: notes
pdfpc -n right $(JOB)-notes.pdf
spell:
aspell -c -t --tex-check-comments -b text.tex
clean:
latexmk -C $(TEX)
rm -f *.notes *.tmp *.nav *.snm *.pdfpc *-luamml-mathml.html
rm -f $(JOB)-notes.pdf
vc:
resources/vc-git
clean:
latexmk -C *.tex
rm -f *.tmp
rm -f *.nav
rm -f *.snm
rm -f vc
rm -f notes.config
rm -f *.pdfpc
pdfpc:
pdfpc -n right *.pdf
.PHONY: clean all notesonly-config notesonly slides-config slides viewpdf pdfpc spell
.PHONY: all slides notes validate viewpdf pdfpc clean