[latex3-commits] [latex3/hyperref] develop: add kern to target command (6f0378f)

github at latex-project.org github at latex-project.org
Wed Nov 6 19:49:29 CET 2024


Repository : https://github.com/latex3/hyperref
On branch  : develop
Link       : https://github.com/latex3/hyperref/commit/6f0378f4339538d397874873d338c85c8b03c6bb

>---------------------------------------------------------------

commit 6f0378f4339538d397874873d338c85c8b03c6bb
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Wed Nov 6 19:49:29 2024 +0100

    add kern to target command


>---------------------------------------------------------------

6f0378f4339538d397874873d338c85c8b03c6bb
 ChangeLog.txt                   |  4 ++
 hyperref-linktarget.dtx         |  1 +
 testfiles-pdftex/thm-anchor.lvt | 15 +++++++
 testfiles-pdftex/thm-anchor.tlg | 86 +++++++++++++++++++++++++++++++++++++++++
 4 files changed, 106 insertions(+)

diff --git a/ChangeLog.txt b/ChangeLog.txt
index 89d9a61..ce67a89 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,3 +1,7 @@
+2024-11-05 Ulrike Fischer
+	* hyperref-linktarget.dtx: add a kern to guard anchor in para hook.
+
+Version: 2024-11-06 v7.01l
 
 2024-11-05 Ulrike Fischer
 	* hyperref.dtx: add a fix for cleveref to update its data in refstepcounter.
diff --git a/hyperref-linktarget.dtx b/hyperref-linktarget.dtx
index fb3e76c..91befa4 100644
--- a/hyperref-linktarget.dtx
+++ b/hyperref-linktarget.dtx
@@ -428,6 +428,7 @@
           }
         }
       }
+     \kern0pt 
      \Hy at RestoreSpaceFactor
     }
  }
diff --git a/testfiles-pdftex/thm-anchor.lvt b/testfiles-pdftex/thm-anchor.lvt
new file mode 100644
index 0000000..db35701
--- /dev/null
+++ b/testfiles-pdftex/thm-anchor.lvt
@@ -0,0 +1,15 @@
+\documentclass{article}
+\input{regression-test}
+\usepackage{amsthm}
+\usepackage{hyperref}
+\newtheorem{theorem}{Theorem}
+\begin{document}
+\START\showoutput 
+\AddToHookNext{para/begin}{\OmitIndent} 
+\begin{theorem}
+abc\label{blub} 
+\end{theorem} 
+
+\ref{blub}
+
+\end{document}
diff --git a/testfiles-pdftex/thm-anchor.tlg b/testfiles-pdftex/thm-anchor.tlg
new file mode 100644
index 0000000..af91792
--- /dev/null
+++ b/testfiles-pdftex/thm-anchor.tlg
@@ -0,0 +1,86 @@
+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(633.0+0.0)x407.0
+.\hbox(0.0+0.0)x0.0
+.\vbox(0.0+0.0)x0.0, glue set - 14.99626fil
+..\kern 0.0
+..\kern 16.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.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(633.0+0.0)x407.0
+..\glue 16.0
+..\vbox(617.0+0.0)x345.0, shifted 62.0
+...\vbox(12.0+0.0)x345.0, glue set 12.0fil
+....\glue 0.0 plus 1.0fil
+....\hbox(0.0+0.0)x345.0
+.....\hbox(0.0+0.0)x345.0
+...\glue 25.0
+...\glue(\lineskip) 0.0
+...\vbox(550.0+0.0)x345.0, glue set 519.94446fil
+....\write-{}
+....\pdfdest name{Doc-Start} xyz
+....\glue(\topskip) 3.05556
+....\hbox(6.94444+0.0)x345.0, glue set 268.42262fil
+.....\penalty 10000
+.....\hbox(0.0+0.0)x0.0
+......\hbox(0.0+0.0)x0.0, shifted -12.0
+.......\pdfdest name{theorem.1} xyz
+.......\penalty 10000
+.....\kern 0.0
+.....\kern 0.0
+.....\OT1/cmr/bx/n/10 T
+.....\OT1/cmr/bx/n/10 h
+.....\OT1/cmr/bx/n/10 e
+.....\OT1/cmr/bx/n/10 o
+.....\OT1/cmr/bx/n/10 r
+.....\OT1/cmr/bx/n/10 e
+.....\OT1/cmr/bx/n/10 m
+.....\kern 0.0
+.....\glue 3.83331 plus 1.91666 minus 1.27777
+.....\OT1/cmr/bx/n/10 1
+.....\kern 0.0
+.....\OT1/cmr/bx/n/10 .
+.....\glue 5.0 plus 1.0 minus 1.0
+.....\OT1/cmr/m/it/10 a
+.....\OT1/cmr/m/it/10 b
+.....\kern-0.51112
+.....\OT1/cmr/m/it/10 c
+.....\write1{\newlabel{blub}{{1}{\thepage }{}{theorem.1}{}}}
+.....\penalty 10000
+.....\glue(\parfillskip) 0.0 plus 1.0fil
+.....\glue(\rightskip) 0.0
+....\penalty -51
+....\glue 8.0 plus 2.0 minus 4.0
+....\glue(\parskip) 0.0 plus 1.0
+....\glue(\parskip) 0.0
+....\glue(\baselineskip) 5.55556
+....\hbox(6.44444+0.0)x345.0, glue set 324.99998fil
+.....\hbox(0.0+0.0)x15.0
+.....\pdfstartlink(*+*)x* attr{/Border[0 0 1]/H/I/C[1 0 0]} action goto name{theorem.1}
+.....\OT1/cmr/m/n/10 1
+.....\pdfendlink
+.....\penalty 10000
+.....\glue(\parfillskip) 0.0 plus 1.0fil
+.....\glue(\rightskip) 0.0
+....\glue 0.0 plus 1.0fil
+....\glue 0.0
+....\glue 0.0 plus 0.0001fil
+...\glue(\baselineskip) 23.55556
+...\hbox(6.44444+0.0)x345.0
+....\hbox(6.44444+0.0)x345.0, glue set 170.0fil
+.....\glue 0.0 plus 1.0fil
+.....\OT1/cmr/m/n/10 1
+.....\glue 0.0 plus 1.0fil
+.\kern 0.0
+(thm-anchor.aux)
+Package rerunfilecheck Info: File `thm-anchor.out' has not changed.
+(rerunfilecheck)             Checksum: D41D8CD98F00B204E9800998ECF8427E;0.





More information about the latex3-commits mailing list.