\DocumentMetadata
: Producing tagged PDF outputThe \DocumentMetadata
command was added to LaTeX in 2022.
It enables so-called “tagging” of the PDF output, aiding
accessibility of the PDF.
It is unlike nearly any other command in LaTeX in that it must
occur before the \documentclass
command that starts a LaTeX
document proper (see \documentclass). Therefore it must be
called with \RequirePackage
rather than \usepackage
(see \RequirePackage).
This support is still in development, so we will not try to list all
the possible settings. Please see the
documentmetadata-support-doc
document, part of the
latex-lab
package (https://ctan.org/pkg/latex-lab). Here
is a simple example which enables most tagging currently implemented:
\DocumentMetadata{testphase={phase-III,firstaid}} \documentclass{article} ...
As you can see from the key name testphase
, this is all still
in an experimental phase. But the LaTeX developers strongly
encourage users to give it a try and report problems.