From b7ca7f33c59781709dfff3227de9e4674ef4090f Mon Sep 17 00:00:00 2001 From: Andreas Scherer Date: Wed, 2 Feb 2022 09:48:27 +0000 Subject: [CWEB] Reshuffle '\.pdfURL' for HiTeX. git-svn-id: svn://tug.org/texlive/trunk@61852 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/cwebdir/ChangeLog | 4 ++++ Build/source/texk/web2c/cwebdir/cwebmac.tex | 21 +++++++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) (limited to 'Build/source/texk/web2c/cwebdir') diff --git a/Build/source/texk/web2c/cwebdir/ChangeLog b/Build/source/texk/web2c/cwebdir/ChangeLog index 34e7d240c45..082318ab5bf 100644 --- a/Build/source/texk/web2c/cwebdir/ChangeLog +++ b/Build/source/texk/web2c/cwebdir/ChangeLog @@ -1,3 +1,7 @@ +2022-02-02 Andreas Scherer + + * cwebmac.tex: Reshuffle '\pdfURL' macro for HiTeX. + 2022-01-29 Andreas Scherer * Makefile, diff --git a/Build/source/texk/web2c/cwebdir/cwebmac.tex b/Build/source/texk/web2c/cwebdir/cwebmac.tex index 749b584e40f..e9c2cb9067a 100644 --- a/Build/source/texk/web2c/cwebdir/cwebmac.tex +++ b/Build/source/texk/web2c/cwebdir/cwebmac.tex @@ -151,16 +151,6 @@ \special{pdf: ec}}\special{pdf: ann width \thewidth height \theheight depth \thedepth << /Type /Annot /Subtype /Link /Border [0 0 0] /A << /S /GoTo /D (#2) >> >>}\box0\relax}\fi -\def\pdfURL#1#2{\ifpdftex\pdfannotlink height\ht\strutbox depth\dp\strutbox - attr {/Border [0 0 0]} user { /Type /Action /Subtype /Link /A - << /S /URI /URI (#2) >>}\Blue #1\Black \pdfendlink % changed in 3.69 - \else \ifpdf{\setbox0=\hbox{\special{pdf: bc [ \pdflinkcolor ]}{#1}% - \special{pdf: ec}}\special{pdf: ann width \thewidth\space height \theheight - \space depth \thedepth\space << /Border [0 0 0] - /Type /Action /Subtype /Link /A << /S /URI /URI (#2) >> >>}\box0\relax}% - \else #1 ({\tt#2})\fi\fi} -{\catcode`\~=12 \gdef\TILDE/{~}} % ~ in a URL -{\catcode`\_=12 \gdef\UNDER/{_}} % _ in a URL \def\sanitizecommand#1#2{\addtokens\usersanitizer {\noexpand\dosanitizecommand\noexpand#1{#2}}} \def\dosanitizecommand#1#2{\ifx\nxt#1\addF{#2}\fi} @@ -304,6 +294,17 @@ \def\maketoksdone{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} \fi % End of common macros +\def\pdfURL#1#2{\ifpdftex\pdfannotlink height\ht\strutbox depth\dp\strutbox + attr {/Border [0 0 0]} user { /Type /Action /Subtype /Link /A + << /S /URI /URI (#2) >>}\Blue #1\Black \pdfendlink % changed in 3.69 + \else \ifpdf{\setbox0=\hbox{\special{pdf: bc [ \pdflinkcolor ]}{#1}% + \special{pdf: ec}}\special{pdf: ann width \thewidth\space height \theheight + \space depth \thedepth\space << /Border [0 0 0] + /Type /Action /Subtype /Link /A << /S /URI /URI (#2) >> >>}\box0\relax}% + \else #1 ({\tt#2})\fi\fi} +{\catcode`\~=12 \gdef\TILDE/{~}} % ~ in a URL +{\catcode`\_=12 \gdef\UNDER/{_}} % _ in a URL + \def\lapstar{\rlap{*}} \def\stsec{\rightskip=0pt % get out of C mode (cf. \B) \sfcode`;=1500 \pretolerance 200 \hyphenpenalty 50 \exhyphenpenalty 50 -- cgit v1.2.3