-
-% Typeset a reference to the given page number (used in tables of contents and indices,
-% where we know the page number from other sources).
-\def\pagelink#1{\ifclickable\pdfstartlink\commonlinkargs goto page #1 {/Fit}\relax #1\pdfendlink\else #1\fi}
-
-% Typeset a clickable URL
-% Currently, all weird characters must be properly escaped.
-\def\url#1{%
- \leavevmode
- \ifclickable
- \pdfstartlink\commonlinkargs user {/Subtype/Link /A << /Type/Action /S/URI /URI(#1) >>}\relax
- \fi
- \xurl #1^^X%
- \ifclickable
- \pdfendlink\relax
- \fi
-}
-\def\xurl#1:#2#3^^X{{\I #1:#2\ifx#2/\kern-0.1em\fi#3}}