From cebfa64d58435e2666bf5a51b01d9c0b093a3fde Mon Sep 17 00:00:00 2001 From: Ulrike Fischer Date: Wed, 22 May 2024 16:25:31 +0200 Subject: [PATCH] set catcode of colon to other in \hyper@normalise, issue #340 --- ChangeLog.txt | 3 ++ hyperref.dtx | 4 ++- testfiles-pdftex/gh340-colon.lvt | 10 ++++++ testfiles-pdftex/gh340-colon.tlg | 55 ++++++++++++++++++++++++++++++++ 4 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 testfiles-pdftex/gh340-colon.lvt create mode 100644 testfiles-pdftex/gh340-colon.tlg diff --git a/ChangeLog.txt b/ChangeLog.txt index 3d1434e..df47dab 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,6 @@ +2024-05-22 Ulrike Fischer + * hyperref.dtx: add \@makeother{:} to \hyper@normalise, issue #340 + 2024-04-22 Ulrike Fischer * hyperref.dtx: remove auxhook package. diff --git a/hyperref.dtx b/hyperref.dtx index fe6c650..4a21185 100644 --- a/hyperref.dtx +++ b/hyperref.dtx @@ -7413,7 +7413,8 @@ % command, you can use |#| and |%| unescaped, to produce themselves. % even if, say, |#| is entered as |#| it will be converted to |\#| % so it does not die if written to an aux file etc. |\#| will write -% as |#| locally while making |\special|s. +% as |#| locally while making |\special|s. The catcode |:| is set to other +% to avoid problems with expl3 syntax. % \begin{macrocode} \begingroup \endlinechar=-1 % @@ -7426,6 +7427,7 @@ \catcode`\&\active \gdef\hyper@normalise{^^A \begingroup + \@makeother{:}^^A \catcode`\^^M\active \def^^M{ }^^A \catcode`\%\active diff --git a/testfiles-pdftex/gh340-colon.lvt b/testfiles-pdftex/gh340-colon.lvt new file mode 100644 index 0000000..1348b71 --- /dev/null +++ b/testfiles-pdftex/gh340-colon.lvt @@ -0,0 +1,10 @@ +\documentclass{article} +\input{regression-test} +\usepackage{hyperref} +\begin{document} +\START \showoutput + +\catcode`\:=11 +\href{http://www.ctan.org/pkg/foo}{foo} + +\end{document} diff --git a/testfiles-pdftex/gh340-colon.tlg b/testfiles-pdftex/gh340-colon.tlg new file mode 100644 index 0000000..87107a0 --- /dev/null +++ b/testfiles-pdftex/gh340-colon.tlg @@ -0,0 +1,55 @@ +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 539.94232fil +....\write-{} +....\pdfdest name{Doc-Start} xyz +....\glue(\topskip) 3.05556 +....\hbox(6.94444+0.0)x345.0, glue set 316.66661fil +.....\hbox(0.0+0.0)x15.0 +.....\pdfstartlink(*+*)x* attr{/Border[0 0 1]/H/I/C[0 1 1]} action user{/Subtype/Link/A<>} +.....\OT1/cmr/m/n/10 f +.....\OT1/cmr/m/n/10 o +.....\kern0.27779 +.....\OT1/cmr/m/n/10 o +.....\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 +(gh340-colon.aux) +Package rerunfilecheck Info: File `gh340-colon.out' has not changed. +(rerunfilecheck) Checksum: D41D8CD98F00B204E9800998ECF8427E;0.