[latex3-commits] [git/LaTeX3-latex3-pdfresources] master: more driver changes (09de4af)

Ulrike Fischer fischer at troubleshooting-tex.de
Mon Mar 16 19:39:45 CET 2020


Repository : https://github.com/latex3/pdfresources
On branch  : master
Link       : https://github.com/latex3/pdfresources/commit/09de4af41c3d96dfe0a232714f5411577c745561

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

commit 09de4af41c3d96dfe0a232714f5411577c745561
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Mon Mar 16 19:39:45 2020 +0100

    more driver changes


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

09de4af41c3d96dfe0a232714f5411577c745561
 hgeneric-experimental.def | 114 +++++++++++++++++++++-------------------------
 1 file changed, 52 insertions(+), 62 deletions(-)

diff --git a/hgeneric-experimental.def b/hgeneric-experimental.def
index c8f5a2c..0b4a6e9 100644
--- a/hgeneric-experimental.def
+++ b/hgeneric-experimental.def
@@ -386,21 +386,13 @@
  % default:
 \pdf_link_margin:n { 1pt }
 
-\providecommand*\@pdfview{XYZ}
-\str_set:Nx\@pdfview{\str_lower_case:f {\@pdfview}}
-
-%redefine to get lowercase pdfview:
-\def\calculate at pdfview#1~#2\\{%
-  \str_set:Nx\@pdfview{\str_lower_case:f {#1}}
-  \ifx\\#2\\%
-    \def\@pdfviewparams{~-32768}%
-  \else
-    \def\@pdfviewparams{~#2}%
-  \fi
-}
 
 \ExplSyntaxOff
+
+\providecommand*\@pdfview{XYZ}
+
 \newcommand\Hy at pstringDest{}
+
 \Hy at WrapperDef\new at pdflink#1{%
   \ifhmode
     \@savsf\spacefactor
@@ -417,10 +409,12 @@
 \let\pdf at endanchor\@empty
 
 \ExplSyntaxOn
-\def\Hy at DestName#1#2
- {
-  \pdf_destination:nf {#1}{#2}
- }
+
+\cs_new_protected:Npn \Hy at DestName #1 #2
+  {
+    \pdf_destination:nf {#1}{#2}
+  }
+
 \ExplSyntaxOff
 \providecommand*\@pdfborder{0 0 1}
 \providecommand*\@pdfborderstyle{}
@@ -439,44 +433,37 @@
       \expandafter\HyperDestNameFilter\expandafter{\Hy at testname}%
     }%
   \fi
-  \Hy at StartlinkName{%
-    %\ifHy at pdfa /F 4\fi
-%    \Hy at setpdfborder
-%    \Hy at setpdfhighlight
-%    \ifx\CurrentBorderColor\relax
-%    \else
-%      /C[\CurrentBorderColor]%
-%    \fi
-  }\Hy at testname
+  \Hy at StartlinkName{}%
+  \Hy at testname
   \expandafter\Hy at colorlink\csname @#1color\endcsname
 }
 
 \ExplSyntaxOn
-\def\Hy at StartlinkName#1#2
- {
-  \pdf_link_begin_goto:nnw { link } { #2 } %%%
- }
+\cs_new_protected:Npn \Hy at StartlinkName #1 #2
+  {
+    \pdf_link_begin_goto:nnw { link } { #2 }
+  }
 
+%experiment end link code
+\cs_new_protected:Npn \close at EXPpdflink #1
+  {
+    \Hy at endcolorlink
+    \Hy at VerboseLinkStop
+    \pdf_link_end:n { #1 }
+  }
 
-\def\close at EXPpdflink#1{%
-  \Hy at endcolorlink
-  \Hy at VerboseLinkStop
-  \pdf_link_end:n { #1 }
-}
 
-%\def\close at pdflink{%
-%  \Hy at endcolorlink
-%  \Hy at VerboseLinkStop
-%  \pdfendlink
-%}
 \ExplSyntaxOff
+
 \def\hyper at anchor#1{%
   \new at pdflink{#1}\anchor at spot\pdf at endanchor
 }
+
 \def\hyper at anchorstart#1{%
   \new at pdflink{#1}%
   \Hy at activeanchortrue
 }
+
 \def\hyper at anchorend{%
   \pdf at endanchor
   \Hy at activeanchorfalse
@@ -485,31 +472,34 @@
 \ExplSyntaxOn
 % #1 is for the color only: found {cite} and {link}
 % #2 is the destination find at pdflink uses then named link
-\def\hyper at linkstart#1#2{%
-  \Hy at VerboseLinkStart{#1}{#2}% only for debug
-  \tl_if_exist:cTF            %or test for blank??
-   { @#1bordercolor }
-   {
-    \hook_put:nnnn
-     { pdf }
-     { link_begin_link_attr }
-     { C }{ [\tl_use:c { @#1bordercolor }] } %do I need to expand?? seems not
-   }
-   {
-    \hook_remove:nnn
-     { pdf }
-     { link_begin_link_attr }
-     { C }
-   }
-  \find at pdflink{#1}{#2}% #1=color type
-}
+
+\cs_new_protected:Npn \hyper at linkstart #1 #2
+  {
+    \Hy at VerboseLinkStart{#1}{#2}% only for debug
+    % is this still needed or are the hooks handled elsewhere??
+    \tl_if_exist:cTF            % or test for blank??
+      { @#1bordercolor }
+      {
+        \hook_put:nnnn
+          { pdf }
+          { link_begin_link_attr }
+          { C }{ [\tl_use:c { @#1bordercolor }] } %do I need to expand?? seems not
+      }
+      {
+        \hook_remove:nnn
+          { pdf }
+          { link_begin_link_attr }
+          { C }
+      }
+    \find at pdflink{#1}{#2}% #1=color type
+  }
 
 % the endlink muss have the same type as the start?
-% probably always link works
-\def\hyper at linkend
- {
-  \close at EXPpdflink { link }
- }
+% probably always link works ? But what is with my hooks???
+\cs_new_protected:Npn \hyper at linkend
+  {
+    \close at EXPpdflink { link }
+  }
 
 \def\hyper at link#1#2#3
  {





More information about the latex3-commits mailing list.