[latex3-commits] [git/LaTeX3-latex3-pdfresources] master: working on destinations (64efae0)

Ulrike Fischer fischer at troubleshooting-tex.de
Thu Mar 19 19:42:58 CET 2020


Repository : https://github.com/latex3/pdfresources
On branch  : master
Link       : https://github.com/latex3/pdfresources/commit/64efae0fa4fd96910ae58a220c101df9543e0922

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

commit 64efae0fa4fd96910ae58a220c101df9543e0922
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Thu Mar 19 19:42:58 2020 +0100

    working on destinations


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

64efae0fa4fd96910ae58a220c101df9543e0922
 hgeneric-experimental.def | 24 ++++++++++++++---------
 hyperreflinktypes.tex     | 49 +++++++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 62 insertions(+), 11 deletions(-)

diff --git a/hgeneric-experimental.def b/hgeneric-experimental.def
index c7809f7..bb0e7ab 100644
--- a/hgeneric-experimental.def
+++ b/hgeneric-experimental.def
@@ -63,6 +63,9 @@
 \Hy at unicodetrue
 \let\HyPsd at pdfencoding\HyPsd at pdfencoding@unicode
 
+\providecommand*\@pdfview{XYZ}
+
+%%%%%%%%%%
 % variants
 \cs_generate_variant:Nn \pdf_object_write:nn {nx}
 \cs_generate_variant:Nn \pdf_catalog_gput:nn {nx}
@@ -312,6 +315,9 @@
 
 
 \ExplSyntaxOn
+%these patterns are used in hyperref checks.
+%it is unclear if they are really useful and if a backend support is
+%needed.
 \str_case:VnF \c_sys_backend_str
  {
    { pdfmode }
@@ -357,7 +363,7 @@
 
 \Hy at DisableOption{pdfversion}%
 
-%ocg colorlinks should be done as in ocgx. This here
+% ocg colorlinks should be done as in ocgx. This here
 % are boxes ...
 \legacy_if:nTF {Hy at ocgcolorlinks}
   {
@@ -468,11 +474,9 @@
 % default:
 \pdf_link_margin:n { 1pt }
 
-
 \ExplSyntaxOff
 
-\providecommand*\@pdfview{XYZ}
-
+\ExplSyntaxOn
 \newcommand\Hy at pstringDest{}
 
 \Hy at WrapperDef\new at pdflink#1{% #1 is a destination name.
@@ -482,7 +486,8 @@
   \Hy at SaveLastskip
   \Hy at VerboseAnchor{#1}%
   \Hy at pstringdef\Hy at pstringDest{\HyperDestNameFilter{#1}}%
-  \Hy at DestName\Hy at pstringDest\@pdfview
+  %\Hy at DestName\Hy at pstringDest\@pdfview
+  \pdf_destination:nf { \Hy at pstringDest } { \@pdfview } %types??
   \Hy at RestoreLastskip
   \ifhmode
     \spacefactor\@savsf
@@ -490,12 +495,13 @@
 }
 \let\pdf at endanchor\@empty
 
+\ExplSyntaxOff
 \ExplSyntaxOn
 
-\cs_new_protected:Npn \Hy at DestName #1 #2 % #1= name #2= fit options
-  {
-    \pdf_destination:nf {#1}{#2}
-  }
+%\cs_new_protected:Npn \Hy at DestName #1 #2 % #1= name #2= fit options
+%  {
+%    \pdf_destination:nf {#1}{#2}
+%  }
 
 \ExplSyntaxOff
 \def\Hy at undefinedname{UNDEFINED}
diff --git a/hyperreflinktypes.tex b/hyperreflinktypes.tex
index b7db35a..e31ed91 100644
--- a/hyperreflinktypes.tex
+++ b/hyperreflinktypes.tex
@@ -1,5 +1,10 @@
+%%%%%%%%%%%%%%%%%%
+Internal links
+%%%%%%%%%%%%%%%%%
+
 \hyper at linkstart :
-   in hyperref.sty!
+   defined in driver, 
+   used in hyperref.sty!
    two arguments!
    first : color (will ignore it ...)
    second: destination name
@@ -9,14 +14,54 @@
 
  internal command
   \find at pdflink{#1}{#2}
+   defined in driver,
+   used only in driver
   ->  \pdf_link_begin_goto:nnw { link } { #2 }
       \expandafter\Hy at colorlink\csname @#1color\endcsname
 
 \hyper at link
-   three arguments, basically \hyper at linkstart/\hyperlinkend with
+   three arguments, basically \hyper at linkstart/\hyper at linkend with
    content as third argument.
    Used in \hyper at link@ - >
     \hyper@@link[cite]
     \hyper@@link[link]
     #1 either link or cite
     
+%%%%%%%%%%%%%%%%%%%%%
+
+\hyper at anchor, \hyper at anchorstart, \hyper at anchorend :
+  defined in driver,
+  used in hyperref.sty
+  one argument: destination name    
+  
+  Uses
+  \hyper at anchorstart{Doc-Start}\hyper at anchorend
+  \hyper at anchorstart{\@currentHref}\hyper at anchorend in \hyper at refstepcounter and various environments
+  inside the definition of \hyper@@anchor: \hyper@@anchor is used in various environments where text is involved and
+  typically in combination with nesting. (Very) old version of hyperref.dtx suggest that anchorcolor which does nothing
+  now was involved here.
+  \def\hypertarget#1#2{%
+  \ifHy at nesting
+    \hyper@@anchor{#1}{#2}%
+  \else
+    \hyper@@anchor{#1}{\relax}#2%
+  \fi
+}
+  
+  Internalcommand
+   \new at pdflink #1 
+   defined in driver
+   used only in driver
+   argument is destination name, "Fit" argument is got through \@pdfview
+
+
+%%%% 
+nesting
+
+The documentation writes about "nesting":
+Allows links to be nested; no drivers currently support this.
+
+All places in the code where \ifHy at nesting is used are about anchors, not links.
+\ifHy at nesting is false in all drivers, so actually nowhere the true code is used. 
+
+It is unclear if nesting can be used, and what use it would have.
\ No newline at end of file





More information about the latex3-commits mailing list.