Skip to content

Commit 91cfa61

Browse files
committed
disable patches if documentmetadata is detected
1 parent fde00c6 commit 91cfa61

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

hyperref.dtx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,28 @@
589589
% \begin{macrocode}
590590
\Hy@SetCatcodes
591591
% \end{macrocode}
592+
%
593+
% \subsection{Disable patches}
594+
%
595+
% If new latex interfaces are used with \cs{DocumentMetadata} various patches are unneeded or do
596+
% harm, so we disable them.
597+
% Not handled yet: \cs{hyper@nopatch@amsmath@tag}, \cs{hyper@nopatch@mathenv}
598+
% \begin{macrocode}
599+
\IfFormatAtLeastT{2025-11-01}
600+
{
601+
\IfDocumentMetadataT
602+
{
603+
\def\hyper@nopatch@counter{} % disabled since 2024-11-01 anyway
604+
\def\hyper@nopatch@bib{}
605+
\def\hyper@nopatch@thm{}
606+
\def\hyper@nopatch@caption{}
607+
\def\hyper@nopatch@footnote{}
608+
\def\hyper@nopatch@sectioning{}
609+
\def\hyper@nopatch@toc{}
610+
\def\hyper@nopatch@longtable{}
611+
}
612+
}
613+
% \end{macrocode}
592614
% change 2020-07-24: require newer pdftexcmds and remove fallback code
593615
% for version older than 2010.
594616
% change 2021-08-14: require expl3

0 commit comments

Comments
 (0)