Skip to content

Commit

Permalink
set catcode of colon to other in \hyper@normalise, issue #340
Browse files Browse the repository at this point in the history
  • Loading branch information
u-fischer committed May 22, 2024
1 parent b2e344b commit cebfa64
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
4 changes: 3 additions & 1 deletion hyperref.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -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 %
Expand All @@ -7426,6 +7427,7 @@
\catcode`\&\active
\gdef\hyper@normalise{^^A
\begingroup
\@makeother{:}^^A
\catcode`\^^M\active
\def^^M{ }^^A
\catcode`\%\active
Expand Down
10 changes: 10 additions & 0 deletions testfiles-pdftex/gh340-colon.lvt
Original file line number Diff line number Diff line change
@@ -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}
55 changes: 55 additions & 0 deletions testfiles-pdftex/gh340-colon.tlg
Original file line number Diff line number Diff line change
@@ -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<</Type/Action/S/URI/URI(http://www.ctan.org/pkg/foo)>>}
.....\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.

0 comments on commit cebfa64

Please sign in to comment.