Skip to content

Commit bafa9f8

Browse files
committed
set target prefix in appendix, #424
1 parent de3f524 commit bafa9f8

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎hyperref.dtx‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10475,6 +10475,8 @@
1047510475
%
1047610476
% The ``french'' package defines counter \cmd{\thechapter}
1047710477
% by \cmd{\newcounter{chapter}}, if \cmd{\@ifundefined{chapter}}.
10478+
%
10479+
% change 2026-06-17: set the target prefix, issue gh/424
1047810480
% \begin{macrocode}
1047910481
\begingroup\expandafter\expandafter\expandafter\endgroup
1048010482
\expandafter\ifx\csname chapter\endcsname\relax
@@ -10484,6 +10486,7 @@
1048410486
\fi
1048510487
\def\Hy@appendixstring{appendix}
1048610488
\def\Hy@chapapp{\Hy@chapterstring}
10489+
\hypersetup{targetprefix={chapter}{\Hy@chapapp}}
1048710490
\@ifundefined{appendix}{%
1048810491
}{%
1048910492
\let\HyOrg@appendix\appendix
@@ -10500,11 +10503,12 @@
1050010503
}%
1050110504
\def\appendix{%
1050210505
\@ifundefined{chapter}{%
10503-
\gdef\theHsection{\Hy@AlphNoErr{section}}%
10506+
\gdef\theHsection{\Hy@AlphNoErr{section}}%
1050410507
}{%
1050510508
\gdef\theHchapter{\Hy@AlphNoErr{chapter}}%
1050610509
}%
1050710510
\xdef\Hy@chapapp{\Hy@appendixstring}%
10511+
\hypersetup{targetprefix={section}{\Hy@appendixstring}}%
1050810512
\HyOrg@appendix
1050910513
}%
1051010514
}

0 commit comments

Comments
 (0)