Skip to content

Commit 21e809c

Browse files
committed
correct bib hooks
1 parent 8545f7e commit 21e809c

1 file changed

Lines changed: 2 additions & 34 deletions

File tree

hyperref.dtx

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -11594,45 +11594,13 @@
1159411594
\AddToHook{package/hyperref/after}[latex-lab-testphase-bib]{}
1159511595
\RemoveFromHook{package/hyperref/after}[latex-lab-testphase-bib]
1159611596
\AddToHookWithArguments{bibcite/before}
11597-
{
11598-
\hyper@linkstart{cite}{cite.#1\@extra@b@citeb}
11597+
{%
11598+
\hyper@linkstart{cite}{cite.#1\@extra@b@citeb}%
1159911599
}
1160011600
\AddToHookWithArguments{bibcite/after}{\hyper@linkend}
11601-
\renewcommand\hyper@natlinkstart[1]{}
11602-
\renewcommand\hyper@natlinkend{}
11603-
\AddToHookWithArguments{cmd/hyper@natlinkstart/before}
11604-
{
11605-
\Hy@backout{#1}%
11606-
% \end{macrocode}
11607-
% natbib passes the \cs{@extra@b@citeb} in the argument, and biblatex
11608-
% the refsection, so we only need to add the prefix \texttt{cite.}.
11609-
% \begin{macrocode}
11610-
\hyper@linkstart{cite}{cite.#1}%
11611-
\def\hyper@nat@current{#1}
11612-
}
11613-
\AddToHook{cmd/hyper@natlinkend/after}
11614-
{
11615-
\hyper@linkend
11616-
}
1161711601
}
1161811602
% \end{macrocode}
1161911603
%
11620-
% Change 2026-02-06: If \cs{DocumentMetadata} is used we add the links through the hooks
11621-
% to \cs{bibcite}
11622-
% \begin{macrocode}
11623-
\IfDocumentMetadataT
11624-
{
11625-
\AddToHookWithArguments{bibcite/before}
11626-
{\hyper@linkstart{cite}{cite.#1\@extra@b@citeb}}
11627-
\AddToHookWithArguments{bibcite/after}{\hyper@linkend}
11628-
% \end{macrocode}
11629-
% Until the latex-lab file is cleaned up, we need to remove the hook code
11630-
% \begin{macrocode}
11631-
\AddToHook{package/hyperref/after}[latex-lab-testphase-bib]{}
11632-
\RemoveFromHook{package/hyperref/after}[latex-lab-testphase-bib]
11633-
}
11634-
% \end{macrocode}
11635-
%
1163611604
% \begin{macrocode}
1163711605
%</packageEnd>
1163811606
%<*check>

0 commit comments

Comments
 (0)