[latex3-commits] [latex3/hyperref] develop: handle showkeys better, issue #292 (3da1408)

github at latex-project.org github at latex-project.org
Mon Jul 10 15:25:46 CEST 2023


Repository : https://github.com/latex3/hyperref
On branch  : develop
Link       : https://github.com/latex3/hyperref/commit/3da140882279118bf7738f5b5f981579c8664958

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

commit 3da140882279118bf7738f5b5f981579c8664958
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Mon Jul 10 15:25:46 2023 +0200

    handle showkeys better, issue #292


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

3da140882279118bf7738f5b5f981579c8664958
 ChangeLog.txt                       |   3 ++
 hyperref.dtx                        |   5 +-
 testfiles-pdftex/gh292-showkeys.lvt |  10 ++++
 testfiles-pdftex/gh292-showkeys.tlg | 102 ++++++++++++++++++++++++++++++++++++
 4 files changed, 118 insertions(+), 2 deletions(-)

diff --git a/ChangeLog.txt b/ChangeLog.txt
index 62e2f83..0d04b79 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,3 +1,6 @@
+2023-07-10 Ulrike Fischer
+    * solve amsmath/showkeys/final conflict, issue 292
+    
 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 a1db39f..1ff6082 100644
--- a/hyperref.dtx
+++ b/hyperref.dtx
@@ -12605,14 +12605,15 @@
 %    \begin{macrocode}
 \let\HyRef at ShowKeysRef\@gobble
 \def\HyRef at ShowKeysInit{%
-  \ifcsname SK@@label\endcsname
+  \@ifundefined{SK@@label}{}
+   {%
     \ifx\SK at ref\@empty
     \else
       \def\HyRef at ShowKeysRef{%
         \SK@\SK@@ref
       }%
     \fi
-  \fi
+   }%
 }
 \AddToHook{package/showkeys/after}{\HyRef at ShowKeysInit}
 %    \end{macrocode}
diff --git a/testfiles-pdftex/gh292-showkeys.lvt b/testfiles-pdftex/gh292-showkeys.lvt
new file mode 100644
index 0000000..0196ebf
--- /dev/null
+++ b/testfiles-pdftex/gh292-showkeys.lvt
@@ -0,0 +1,10 @@
+\documentclass[final]{article}
+\input{regression-test}
+\usepackage{amsmath}
+\usepackage{hyperref}
+\usepackage{showkeys}
+\begin{document}
+\START\showoutput
+\section{The Pythagoras Theorem}\label{sec:pythagoras}
+\autoref{sec:pythagoras}
+\end{document}
\ No newline at end of file
diff --git a/testfiles-pdftex/gh292-showkeys.tlg b/testfiles-pdftex/gh292-showkeys.tlg
new file mode 100644
index 0000000..c6273d3
--- /dev/null
+++ b/testfiles-pdftex/gh292-showkeys.tlg
@@ -0,0 +1,102 @@
+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 518.04192fil
+....\write-{}
+....\pdfdest name{Doc-Start} xyz
+....\pdfdest name{section.1} xyz
+....\glue(\topskip) 0.00002
+....\hbox(9.99998+2.79999)x345.0, glue set 139.10188fil
+.....\hbox(9.27998+0.0)x24.29997
+......\glue 0.0
+......\OT1/cmr/bx/n/14.4 1
+......\glue 16.19998
+.....\OT1/cmr/bx/n/14.4 T
+.....\OT1/cmr/bx/n/14.4 h
+.....\OT1/cmr/bx/n/14.4 e
+.....\glue 5.4 plus 2.7 minus 1.79999
+.....\OT1/cmr/bx/n/14.4 P
+.....\OT1/cmr/bx/n/14.4 y
+.....\OT1/cmr/bx/n/14.4 t
+.....\OT1/cmr/bx/n/14.4 h
+.....\OT1/cmr/bx/n/14.4 a
+.....\OT1/cmr/bx/n/14.4 g
+.....\OT1/cmr/bx/n/14.4 o
+.....\OT1/cmr/bx/n/14.4 r
+.....\OT1/cmr/bx/n/14.4 a
+.....\OT1/cmr/bx/n/14.4 s
+.....\glue 5.4 plus 2.7 minus 1.79999
+.....\OT1/cmr/bx/n/14.4 T
+.....\OT1/cmr/bx/n/14.4 h
+.....\OT1/cmr/bx/n/14.4 e
+.....\OT1/cmr/bx/n/14.4 o
+.....\OT1/cmr/bx/n/14.4 r
+.....\OT1/cmr/bx/n/14.4 e
+.....\OT1/cmr/bx/n/14.4 m
+.....\penalty 10000
+.....\glue(\parfillskip) 0.0 plus 1.0fil
+.....\glue(\rightskip) 0.0
+....\write3{\protect \BOOKMARK [1][-]{section.1}{\376\377\000T\000h\000e\000\040\000P\000y\000t\000h\000a\000g\000o\000r\000a\000s\000\040\000T\000h\000e\000o\000r\000e\000m}{}% 1}
+....\write1{\@writefile{toc}{\protect \contentsline {section}{\protect \numberline {1}The Pythagoras Theorem}{\thepage }{section.1}\protected at file@percent }}
+....\penalty 10000
+....\glue 9.90276 plus 0.86108
+....\write1{\newlabel{sec:pythagoras}{{1}{\thepage }{The Pythagoras Theorem}{section.1}{}}}
+....\penalty 10000
+....\penalty 10000
+....\glue(\parskip) 0.0 plus 1.0
+....\glue(\parskip) 0.0
+....\glue(\baselineskip) 2.52142
+....\hbox(6.67859+0.0)x345.0, glue set 306.61105fil
+.....\pdfstartlink(*+*)x* attr{/Border[0 0 1]/H/I/C[1 0 0]} action goto name{section.1}
+.....\OT1/cmr/m/n/10 s
+.....\OT1/cmr/m/n/10 e
+.....\OT1/cmr/m/n/10 c
+.....\OT1/cmr/m/n/10 t
+.....\OT1/cmr/m/n/10 i
+.....\OT1/cmr/m/n/10 o
+.....\OT1/cmr/m/n/10 n
+.....\penalty 10000
+.....\glue 3.33333 plus 1.66666 minus 1.11111
+.....\OT1/cmr/m/n/10 1
+.....\hbox(0.0+0.0)x0.0
+.....\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
+(gh292-showkeys.aux)
+Package rerunfilecheck Info: File `gh292-showkeys.out' has not changed.
+(rerunfilecheck)             Checksum: BD8B463FE85A106FB029924DC3C228CA;159.





More information about the latex3-commits mailing list.