[latex3-commits] [latex3/hyperref] develop: delay anchor, issue 294 (a79cc46)
github at latex-project.org
github at latex-project.org
Tue Jul 18 21:25:42 CEST 2023
Repository : https://github.com/latex3/hyperref
On branch : develop
Link : https://github.com/latex3/hyperref/commit/a79cc46931d4435abc5746d9e37b601ec29d1c25
>---------------------------------------------------------------
commit a79cc46931d4435abc5746d9e37b601ec29d1c25
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Tue Jul 18 21:25:42 2023 +0200
delay anchor, issue 294
>---------------------------------------------------------------
a79cc46931d4435abc5746d9e37b601ec29d1c25
ChangeLog.txt | 3 +
hyperref.dtx | 10 ++-
testfiles-pdftex/gh294-anchor.lvt | 18 +++++
testfiles-pdftex/gh294-anchor.tlg | 160 ++++++++++++++++++++++++++++++++++++++
4 files changed, 187 insertions(+), 4 deletions(-)
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 62e2f83..806676d 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,3 +1,6 @@
+2023-07-18 Ulrike Fischer
+ * delay anchor in \@thm, issue 294
+
2023-07-07 Ulrike Fischer
* make \Hy@@SectionAnchor safe in a MakeUppercase, issue 281
* reset also \ltx at label of amsmath (avoids problems with ntheorem and classes like svmono)
diff --git a/hyperref.dtx b/hyperref.dtx
index b36201d..b0eba63 100644
--- a/hyperref.dtx
+++ b/hyperref.dtx
@@ -10970,10 +10970,12 @@
\H at refstepcounter{#1}%
\hyper at makecurrent{#1}%
\global\let\Hy at dth@currentHref\@currentHref
- \AddToHookNext{para/begin}
- {\let\Hy at tempa\@currentHref
- \MakeLinkTarget*{\Hy at dth@currentHref}%
- \global\let\@currentHref\Hy at tempa
+ \AddToHookNext{cmd/item/before}
+ {\AddToHookNext{para/begin}
+ {\let\Hy at tempa\@currentHref
+ \MakeLinkTarget*{\Hy at dth@currentHref}%
+ \global\let\@currentHref\Hy at tempa
+ }%
}%
}
\@ifundefined{hyper at nopatch@thm}{%
diff --git a/testfiles-pdftex/gh294-anchor.lvt b/testfiles-pdftex/gh294-anchor.lvt
new file mode 100644
index 0000000..a8b89a1
--- /dev/null
+++ b/testfiles-pdftex/gh294-anchor.lvt
@@ -0,0 +1,18 @@
+\documentclass[12pt]{book}
+\input{regression-test}
+\newtheorem{theorem}{theorem}
+\newtheorem{proof}{proof}
+\makeatletter
+\def\@oddhead{\parbox[t]{\linewidth}{head}}
+
+\usepackage{hyperref}
+\begin{document}
+\START \showoutput
+
+\vspace*{36\baselineskip}
+
+line\\ line\\ line
+ \begin{theorem}
+ theorem
+ \end{theorem}
+\end{document}
diff --git a/testfiles-pdftex/gh294-anchor.tlg b/testfiles-pdftex/gh294-anchor.tlg
new file mode 100644
index 0000000..c5064ff
--- /dev/null
+++ b/testfiles-pdftex/gh294-anchor.tlg
@@ -0,0 +1,160 @@
+This is a generated file for the l3build validation system.
+Don't change this file in any respect.
+Completed box being shipped out [1]
+\vbox(630.3738+0.0)x407.0
+.\hbox(0.0+0.0)x0.0
+.\vbox(0.0+0.0)x0.0, glue set - 18.99626fil
+..\kern 0.0
+..\kern 20.0
+..\kern -1.00374
+..\hbox(0.0+0.0)x0.0, glue set - 15.99626fil
+...\kern 0.0
+...\kern 17.0
+...\kern -1.00374
+...\pdfdest name{page.1} xyz
+...\penalty 10000
+...\glue 0.0 plus 1.0fil minus 1.0fil
+..\glue 0.0 plus 1.0fil minus 1.0fil
+.\glue(\lineskip) 0.0
+.\vbox(630.3738+0.0)x407.0
+..\glue 20.0
+..\vbox(610.3738+0.0)x390.0, shifted 17.0
+...\vbox(12.0+0.0)x390.0, glue set 3.66669fil
+....\glue 0.0 plus 1.0fil
+....\hbox(8.33331+0.0)x390.0
+.....\hbox(8.33331+0.0)x390.0
+......\vbox(8.33331+0.0)x390.0
+.......\hbox(8.33331+0.0)x390.0, glue set 365.84747fil
+........\hbox(0.0+0.0)x0.0
+........\OT1/cmr/m/n/12 h
+........\OT1/cmr/m/n/12 e
+........\OT1/cmr/m/n/12 a
+........\OT1/cmr/m/n/12 d
+........\penalty 10000
+........\glue(\parfillskip) 0.0 plus 1.0fil
+........\glue(\rightskip) 0.0
+...\glue 19.8738
+...\glue(\lineskip) 0.0
+...\vbox(548.5+0.0)x390.0
+....\write-{}
+....\pdfdest name{Doc-Start} xyz
+....\glue(\topskip) 12.0
+....\rule(0.0+0.0)x*
+....\penalty 10000
+....\glue 522.0
+....\glue 0.0
+....\glue(\parskip) 0.0 plus 1.0
+....\glue(\parskip) 0.0
+....\glue(\baselineskip) 6.16669
+....\hbox(8.33331+0.0)x390.0, glue set 354.0976fil
+.....\hbox(0.0+0.0)x17.62482
+.....\OT1/cmr/m/n/12 l
+.....\OT1/cmr/m/n/12 i
+.....\OT1/cmr/m/n/12 n
+.....\OT1/cmr/m/n/12 e
+.....\penalty 10000
+.....\glue 0.0 plus 1.0fil
+.....\penalty -10000
+.....\glue(\rightskip) 0.0
+....\glue 0.0
+...\glue(\baselineskip) 30.0
+...\hbox(0.0+0.0)x390.0
+....\hbox(0.0+0.0)x390.0
+.\kern 0.0
+Completed box being shipped out [2]
+\vbox(630.3738+0.0)x452.0
+.\vbox(0.0+0.0)x0.0, glue set - 18.99626fil
+..\kern 0.0
+..\kern 20.0
+..\kern -1.00374
+..\hbox(0.0+0.0)x0.0, glue set - 60.99626fil
+...\kern 0.0
+...\kern 62.0
+...\kern -1.00374
+...\pdfdest name{page.2} xyz
+...\penalty 10000
+...\glue 0.0 plus 1.0fil minus 1.0fil
+..\glue 0.0 plus 1.0fil minus 1.0fil
+.\glue(\lineskip) 0.0
+.\vbox(630.3738+0.0)x452.0
+..\glue 20.0
+..\vbox(610.3738+0.0)x390.0, shifted 62.0
+...\vbox(12.0+0.0)x390.0, glue set 4.26668fil
+....\glue 0.0 plus 1.0fil
+....\hbox(7.73332+0.0)x390.0
+.....\hbox(7.73332+0.0)x390.0, glue set 384.12506fil
+......\OT1/cmr/m/n/12 2
+......\glue 0.0 plus 1.0fil
+...\glue 19.8738
+...\glue(\lineskip) 0.0
+...\vbox(548.5+0.0)x390.0, glue set 487.5fil
+....\glue(\topskip) 3.66669
+....\hbox(8.33331+0.0)x390.0, glue set 371.72241fil
+.....\OT1/cmr/m/n/12 l
+.....\OT1/cmr/m/n/12 i
+.....\OT1/cmr/m/n/12 n
+.....\OT1/cmr/m/n/12 e
+.....\penalty 10000
+.....\glue 0.0 plus 1.0fil
+.....\penalty -10000
+.....\glue(\rightskip) 0.0
+....\penalty 150
+....\glue(\baselineskip) 6.16669
+....\hbox(8.33331+0.0)x390.0, glue set 371.72241fil
+.....\OT1/cmr/m/n/12 l
+.....\OT1/cmr/m/n/12 i
+.....\OT1/cmr/m/n/12 n
+.....\OT1/cmr/m/n/12 e
+.....\penalty 10000
+.....\glue(\parfillskip) 0.0 plus 1.0fil
+.....\glue(\rightskip) 0.0
+....\penalty -51
+....\glue 10.0 plus 5.0 minus 6.0
+....\glue(\parskip) 0.0 plus 1.0
+....\glue(\parskip) 0.0
+....\glue(\baselineskip) 6.16669
+....\hbox(8.33331+0.0)x390.0, glue set 284.24136fil
+.....\penalty 10000
+.....\hbox(0.0+0.0)x0.0
+......\hbox(0.0+0.0)x0.0, shifted -14.5
+.......\pdfdest name{theorem.0.0.1} xyz
+.......\penalty 10000
+.....\hbox(8.33331+0.0)x65.70827
+......\glue 0.0
+......\glue 0.0
+......\glue -5.87494
+......\hbox(8.33331+0.0)x65.70827
+.......\glue 5.87494
+.......\OT1/cmr/bx/n/12 t
+.......\OT1/cmr/bx/n/12 h
+.......\OT1/cmr/bx/n/12 e
+.......\OT1/cmr/bx/n/12 o
+.......\OT1/cmr/bx/n/12 r
+.......\OT1/cmr/bx/n/12 e
+.......\OT1/cmr/bx/n/12 m
+.......\glue 4.5 plus 2.25 minus 1.5
+.......\OT1/cmr/bx/n/12 1
+......\glue 5.87494
+.....\penalty 0
+.....\OT1/cmr/m/it/12 t
+.....\OT1/cmr/m/it/12 h
+.....\OT1/cmr/m/it/12 e
+.....\kern-0.6
+.....\OT1/cmr/m/it/12 o
+.....\OT1/cmr/m/it/12 r
+.....\kern-0.6
+.....\OT1/cmr/m/it/12 e
+.....\OT1/cmr/m/it/12 m
+.....\penalty 10000
+.....\glue(\parfillskip) 0.0 plus 1.0fil
+.....\glue(\rightskip) 0.0
+....\penalty -51
+....\glue 10.0 plus 4.0 minus 6.0
+....\glue 0.0 plus 1.0fil
+....\glue 0.0
+...\glue(\baselineskip) 30.0
+...\hbox(0.0+0.0)x390.0
+....\hbox(0.0+0.0)x390.0
+(gh294-anchor.aux)
+Package rerunfilecheck Info: File `gh294-anchor.out' has not changed.
+(rerunfilecheck) Checksum: D41D8CD98F00B204E9800998ECF8427E;0.
More information about the latex3-commits
mailing list.