Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2026-02-22 Ulrike Fischer
* hyperref-linktarget.dtx: do not create targets when measuring.
* hyperref-linktarget.dtx: use the hyp/raisedlink also in MakelinkTarget for better varwidth support%.
* hyperref.dtx: use \MakeLinkTarget in \hyper@refstepcounter
* hyperref.dtx: use \MakeLinkTarget in \phantomsection

Version 2026-01-29 v7.01p / v2.58

2026-01-10 Ulrike Fischer
Expand Down
13 changes: 9 additions & 4 deletions hyperref-linktarget.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@
% next \cs{label}.
% A target name must be unique across a document. It is up to the users and package
% authors to ensure this by following the advice given below.
%
% Targets are not created if \cs{ifmeasuring@} is true.
%
% \begin{doccomment}
% A global \cs{@currentHref} means that the target name and
Expand Down Expand Up @@ -287,8 +289,8 @@
% \end{syntax}
% \end{function}
%
%
% This commands allows to switch on and off locally the creation of a target with
% Targets are not created if \cs{ifmeasuring@} is true. With
% these commands it is also possible to switch on and off locally the creation of a target with
% \cs{MakeLinkTarget}.
% The switches are also honored by \cs{refstepcounter}\footnote{currently
% \cs{refstepcounter} doesn't use \cs{MakeLinkTarget} itself but this
Expand Down Expand Up @@ -408,11 +410,12 @@
% TODO: The code to save/restore the space factor should
% be replaced by kernel methods.
% change 2024-11-06: add a kern, see thm-anchor test.
% change 2026-02-22: use the hyp/raisedlink socket for varwidth support.
% \begin{macrocode}
\cs_new_protected:Npn \@@_target_raise:n #1
{
\mode_if_vertical:TF
{ #1 }
{ \UseSocket{hyp/raisedlink}{#1} }%
{
\Hy@SaveSpaceFactor
\penalty\@M
Expand Down Expand Up @@ -468,7 +471,9 @@
% \begin{macrocode}
\RenewDocumentCommand\MakeLinkTarget {s O{} m}
{
\bool_if:NT \l_@@_target_create_bool
\bool_lazy_and:nnT
{ \l_@@_target_create_bool }
{ ! \legacy_if_p:n { measuring@ } }
{
\group_begin:
\hook_use:n { makelinktarget }
Expand Down
Loading