[latex3-commits] [git/LaTeX3-latex3-pdfresources] main: rename hyperref driver (6e76301)

Ulrike Fischer fischer at troubleshooting-tex.de
Sun Feb 21 15:35:14 CET 2021


Repository : https://github.com/latex3/pdfresources
On branch  : main
Link       : https://github.com/latex3/pdfresources/commit/6e763011b3a6ef0bd444dbff60f35bcd9c4a07ae

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

commit 6e763011b3a6ef0bd444dbff60f35bcd9c4a07ae
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Sun Feb 21 15:35:14 2021 +0100

    rename hyperref driver


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

6e763011b3a6ef0bd444dbff60f35bcd9c4a07ae
 hyperref-generic.dtx        | 79 +++++++++++++++++++++++++++++++--------------
 ltdocinit.dtx               |  8 ++---
 pdfmanagement-testphase.ins |  2 +-
 3 files changed, 60 insertions(+), 29 deletions(-)

diff --git a/hyperref-generic.dtx b/hyperref-generic.dtx
index 82a6537..0358597 100644
--- a/hyperref-generic.dtx
+++ b/hyperref-generic.dtx
@@ -2,7 +2,7 @@
 %
 %% File: hyperref-generic.dtx
 %
-% Copyright (C) 2021 The LaTeX3 Project
+% Copyright (C) 2021 The LaTeX Project
 %
 % It may be distributed and/or modified under the conditions of the
 % LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -11,7 +11,7 @@
 %
 %    http://www.latex-project.org/lppl.txt
 %
-% This file is part of the "PDFmanagement (testphase) bundle" (The Work in LPPL)
+% This file is part of the "PDFmanagement bundle (testphase)" (The Work in LPPL)
 % and all files in that bundle must be distributed together.
 %
 % The released version of this bundle is available from CTAN.
@@ -25,7 +25,15 @@
 % for those people who are interested.
 %
 %<*driver>
-\documentclass[full]{l3doc}
+\RequirePackage{pdfmanagement-testphase}
+\DeclareDocumentMetadata{pdfstandard=A-2b}
+\makeatletter
+\declare at file@substitution{doc.sty}{doc-v3beta.sty}
+\makeatother
+\documentclass{l3doc}
+\usepackage{tabularx,array,booktabs,hyperxmp}
+\hypersetup{pdfauthor=The LaTeX Project,pdftitle=generic hyperref driver (PDFmanagement bundle (testphase))}
+\premulticols=4cm
 \begin{document}
   \DocInput{\jobname.dtx}
 \end{document}
@@ -69,7 +77,7 @@
 % }
 %
 % \author{^^A
-%  The \LaTeX3 Project\thanks
+%  The \LaTeX{} Project\thanks
 %    {^^A
 %      E-mail:
 %        \href{mailto:latex-team at latex-project.org}
@@ -77,13 +85,14 @@
 %    }^^A
 % }
 %
-% \date{Released XXXX-XX-XX}
+% \date{Version 0.95a, released 2021-02-22}
 %
 % \maketitle
 % \begin{documentation}
 % This package generates a generic driver for \pkg{hyperref} meant to be used
 % with the new LaTeX PDF management code. It is loaded automatically
-% if the PDF management code is active. The name of the driver will probably change.
+% if the PDF management code is active. The name of the driver will change after
+% the testphase.
 %
 % The generic driver can be used with pdflatex, lualatex, xelatex, latex with
 % dvipdfmx, latex with dvips+ps2pdf. latex with dvips+distiller could work too
@@ -96,8 +105,8 @@
 % \RequirePackage{pdfmanagement-testphase} %loads the code
 % \DeclareDocumentMetadata % activates it
 %   {
-%    % options
-%    % e.g. pdf version, backend:
+%    %% options
+%    %% e.g. pdf version, backend:
 %    % pdfversion=1.7,
 %    % backend = dvipdfmx
 %   }
@@ -107,13 +116,13 @@
 %  but there are nevertheless differences. Some of them due to the still experimental
 %  status of the driver, others are design decisions: one part of the project is
 %  to clean up and modernize the code. The following sections try to describe
-%  the differences but also to document some of the rationals of the changes,
+%  the differences but also to document some of the rationales of the changes,
 %  and to add some details and comments about the existing options and so to
 %  extend the \pkg{hyperref} manual.
 %
 %  \section{Avoiding transition problems}
 %  Some code will only work properly after other packages have been adapted to
-%  the new PDF management code and the changes in this driver too.
+%  the new PDF management code and the changes in this driver.
 %  This will take some time. Until then it is recommended to follow
 %  the following rules
 %  \begin{itemize}
@@ -124,7 +133,8 @@
 %  section~\ref{sec:pkg-options}---to set them in \cs{hypersetup},
 %  not as package option.
 %  \item If the package \pkg{color} is used it is currently recommended to define
-%  colors after \pkg{hyperref}.
+%  colors after \pkg{hyperref}. This driver uses \pkg{l3color} for the colors,
+%  some special color models of \pkg{xcolor} won't work.
 %  \item Load a color package or graphicx to get the right page sizes.
 %  \item Report problems! Only known problem can be resolved.
 %  \end{itemize}
@@ -153,9 +163,11 @@
 %  But---with the exception of |/Producer| when using the dvips backend---they
 %  can be overwritten.
 %
-%  The current handling of the metadata is problematic for two reasons:
+%  The current handling of the metadata is problematic:
 %  \begin{itemize}
-%  \item External package like \pkg{hyperxmp} want access to them too.
+%  \item External package like \pkg{hyperxmp} wants to access them too and for
+%  this had to patch an number of internal hyperref commands---which is a problem
+%  if the internal commands change (as happens with this new driver)
 %  \item \pkg {hyperref} (and also \pkg{hyperxmp})
 %  tries to deduce some datas from document commands like
 %  \cs{title} or \cs{author}---something that worked reasonably well when only
@@ -168,20 +180,21 @@
 %  To resolve some of this problem the driver will
 %  \begin{itemize}
 %  \item \emph{Not} try deduce author and title from documents. They have to be set in
-%  \cs{hypersetup} with |pdfauthor| and |pdftitle|. It is recommended to separate more than one
-%  author by commas, and to hide commas inside braces if needed:
+%  \cs{hypersetup} with |pdfauthor| and |pdftitle|. It is recommended to separate
+%  more than one author by commas, and to hide commas inside braces if needed:
 %
 %  \begin{verbatim}
 %  pdfauthor = {Bär, Peter Anteater, {Riley, the sloth}}
 %  \end{verbatim}
 %  \item All values of relevant keys (including keys from the hyperxmp package)
-%  will be store in a Metadata container, and can be retrieved with
+%  will be stored in a Metadata container, and can be retrieved with
 %  \cs{GetDocumentProperties}.
 %
 %  \begin{verbatim}
 %  \edef\my at pdfauthor{\GetDocumentProperties{hyperref/pdfauthor}}
 %  \end{verbatim}
-%  If the key hasn't be set, the result is empty.
+%  If the key hasn't be set, the result is empty. This gives external
+%  packages a public and reliable access to the data.
 %
 %  \item |pdflang| is deprecated. Instead \cs{DeclareDocumentMetadata}
 %  should be used:
@@ -193,7 +206,12 @@
 %
 %  \end{itemize}
 %  \section{Dates}
-%  % XMP: yyyy-mm-ddThh:mm:ss+tt:tt, PDF: D:YYYYMMDDhhmmss+01'00'
+%  \pkg{hyperref has a few keys to set dates}. They typically expect the date
+%  in \enquote{PDF} format: |D:YYYYMMDDhhmmss+01'00'|.
+%
+%  One should be aware that \pkg{hyperxmp} will sometimes
+%  overwrites such settings.
+%  ^^A XMP: yyyy-mm-ddThh:mm:ss+tt:tt, PDF: D:YYYYMMDDhhmmss+01'00'
 %
 %  \section{PDF page size (mediabox)}
 %  The standard \pkg{hyperref} driver contain code to set the PDF page size.
@@ -301,6 +319,19 @@
 %   locally the link types.
 %  \end{itemize}
 %
+%   \begin{hypkey}{colorscheme}
+%
+%   The new key |colorscheme| allows to switch the colors (both for text and borders)
+%   with a key word. It takes one of the values
+%   |orginal| (the colors as hyperref uses normally), |phelype|, |daleif|,
+%   |szabolcsA|, |szabolcsB|, |tivv|, |julian|, |henryford|.
+%
+%   The names refer to the authors in answers and comments in
+%   \url{https://tex.stackexchange.com/questions/525261/better-default-colors-for-hyperref-links}.
+%
+%   The default is |phelype|.
+%   \end{hypkey}
+%
 %  \subsection{Public interfaces}
 %  The |colorlinks| and |ocgcolorlinks| and related keys are
 %  using these booleans:
@@ -775,9 +806,9 @@
 %<@@=hyp>
 %    \end{macrocode}
 %    \begin{macrocode}
-\ProvidesFile{hgeneric-experimental.def}
-  [2020/12/26 v0.71 %
-  Hyperref driver for luaTeX]
+\ProvidesFile{hgeneric-testphase.def}
+  [2021/02/22 v0.95a %
+  generic Hyperref driver for the PDFmanagement bundle (testphase)]
 
 \RequirePackage{etoolbox} %why?
 %    \end{macrocode}
@@ -4937,7 +4968,7 @@
 \expandafter\def\csname Parent3\endcsname{}
 \expandafter\def\csname Parent4\endcsname{}
 %%
-%% End of file `hgeneric-experimental.def'.
+%% End of file `hgeneric-testphase.def'.
 %</package>
 %    \end{macrocode}
 %    \begin{macrocode}
@@ -4955,7 +4986,7 @@
 %,menubordercolor=
 %,runbordercolor=
 
-\prop_const_from_keyval:Nn \c_@@_colorscheme_hypori_prop
+\prop_const_from_keyval:Nn \c_@@_colorscheme_original_prop
  {
    linkcolor       = [rgb]{1,0,0}, %red
    filecolor       = [rgb]{0,1,1}, %cyan
@@ -5078,5 +5109,5 @@
 %</colorscheme>
 %    \end{macrocode}
 % \end{implementation}
-
+% \newpage
 % \PrintIndex
diff --git a/ltdocinit.dtx b/ltdocinit.dtx
index 334dfab..8dc062a 100644
--- a/ltdocinit.dtx
+++ b/ltdocinit.dtx
@@ -206,7 +206,7 @@
         \keys_set_filter:nnn  { document / metadata } { init } { lang=en-US, #1 }
         \bool_if:NT \g_@@_active_bool
           {
-            \PassOptionsToPackage{customdriver=hgeneric-experimental}{hyperref}
+            \PassOptionsToPackage{customdriver=hgeneric-testphase}{hyperref}
           }
 %    \end{macrocode}
 % \cs{pdfmanagement_add:nnn} has collected values in this hook.
@@ -221,11 +221,11 @@
             \keys_set_filter:nnn  { document / metadata } { init } { ##1 }
             \bool_if:NTF \g_@@_active_bool
              {
-               \str_remove_all:cn {opt at hyperref.sty}{customdriver=hgeneric-experimental}
-               \PassOptionsToPackage{customdriver=hgeneric-experimental}{hyperref}
+               \str_remove_all:cn {opt at hyperref.sty}{customdriver=hgeneric-testphase}
+               \PassOptionsToPackage{customdriver=hgeneric-testphase}{hyperref}
              }
              {
-               \str_remove_all:cn {opt at hyperref.sty}{customdriver=hgeneric-experimental}
+               \str_remove_all:cn {opt at hyperref.sty}{customdriver=hgeneric-testphase}
              }
           }
 %    \end{macrocode}
diff --git a/pdfmanagement-testphase.ins b/pdfmanagement-testphase.ins
index e1c1b7c..87b13aa 100644
--- a/pdfmanagement-testphase.ins
+++ b/pdfmanagement-testphase.ins
@@ -172,7 +172,7 @@ and all files in that bundle must be distributed together.
 
 \generate
   {
-    \file {hgeneric-experimental.def}
+    \file {hgeneric-testphase.def}
       {
        \from{hyperref-generic.dtx}{package}
       }





More information about the latex3-commits mailing list.