Re: How to get tagging off in new LaTeX

David Carlisle <[email protected]>
Newsgroups gmane.comp.tex.live
Message-ID <CAEW6iOiD37yLYziDCrTR=-56y9QLqCO-E-wP-izGE_7o1mSs0Q@mail.gmail.com>
On Sun, 2 Nov 2025 at 19:28, Bruno Voisin via tex-live <[email protected]>
wrote:

> That's not a TL-specific question, but I assume some other users here may
> wonder the same.
>
> Yesterday's TUG news mentioned yesterday's LaTeX news (issue 42) which
> describes yesterday's new LaTeX release (2025-11-01). This new release is
> already in the TeX Live updates.
>
> The first three pages of LT news describe the extensive changes to the
> tagging behaviour, which is now triggered by \DocumentMetadata{}. Reaching
> the second column of page 2 of the news, I was already lost (so many new
> tagging-related packages, keys, commands, behaviours), and my only concern
> henceforth has been: how can I make sure the new tagging feature is
> completely off for now -- until I get a better hold of what tagging is and
> brings, and how it works in LaTeX -- while still keeping the other benefits
> of \DocumentMetadata{}?
>
> I appreciate getting PDF 2.0 by default, and T1 fonts, and the
> pdfmanagement niceties like
>
> \ExplSyntaxOn
>
> \AddToHook{env/sidewaysfigure/end}{\pdfmanagement_add:nnn{ThisPage}{Rotate}{90}}
>
> \AddToHook{env/sidewaystable/end}{\pdfmanagement_add:nnn{ThisPage}{Rotate}{90}}
> \ExplSyntaxOff
>
> to automatically rotate pages containing sideways figures or tables. But I
> fear that tagging might break the journal packages (like REVTeX, but also
> others) that I need to use most of the time.
>

This is not tagging in the sense of tagged PDF, and as you note below the
pdfmanagent features can be loaded separately if required.

>
> The LaTeX news are a bit unclear in this respect. Reading them, I have the
> impression \DocumentMetadata{}, without any argument, does trigger tagging.


No, in the new release  \DocumentMetadata{} is essentially
\DocumentMetadata{tagging=off} so it does load new template code and other
things but does not trigger the generation of tagged PDF.


> But then there is "[\DocumentMetadata] will now load directly all the code
> that one would get when using the tagging=off or the testphase=latest key",
> which gives the impression tagging won't be loaded ("tagging=off" means no
> tagging, right?).
>

Exactly.

>
> So, in essence, my question is: how to de-activate tagging while keeping
> everything else \DocumentMetadata provides (PDF 2.0, T1 fonts and
> pdfmanagement)? Is this
>
> \DocumentMetadata{tagging=off}
>
> Or
>
> \RequirePackage{pdfmanagement}
> \SetKeys[document/metadata]{pdfversion=2.0}
>
> plus something else for T1 fonts?
>

the "something else" would be \usepackage[T1]{fontenc}

You can use either. The first form with \DocumentMetadata loads the code
(currently mostly in latex-lab) that re-implements many parts of latex with
the template key-value system, this sets things up to enable tagging but
tagging is not enabled, but the templates have other uses as well providing
features such as key=value lists similar to the well known enumitem package.

Packages can detect the use of "new" documents that have \DocumentMetadata
with \IfDocumentMetadatTF{...}{...}  so for most
purposes if you want to opt in to the new code at all I would use that form
but if you have compatibility reasons for not loading the latex lab code
you can still load just pdfmanagement as you show.



> Also, I wasn't aware \DocumentMetadata{} before meant an alternative
> hyperref driver was used (LT news, bottom of page 1, column 2). I use to
> customize hyperref output at times, copying pieces of code from the drivers
> in tex/latex/hyperref (like hpdftex.def) and putting a modified version in
> the preamble of my document. If I get things right, another hyperref driver
> file is involved when \DocumentMetadata{} is used, from another location.
> Where should I look then? Are the hyperref changes scattered in the various
> files inside tex/latex/latex-lab/?
>

see pdfresources/hyperref-generic.dtx

>
> Bruno Voisin
>
>
>
David
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.