[latex3-commits] [git/LaTeX3-latex3-hyperref] cleanup-patches, main: document changes (249984a)

Ulrike Fischer fischer at troubleshooting-tex.de
Mon Jun 20 11:28:55 CEST 2022


Repository : https://github.com/latex3/hyperref
On branches: cleanup-patches,main
Link       : https://github.com/latex3/hyperref/commit/249984a90df4461f75849dd617d4dc1dab9bc851

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

commit 249984a90df4461f75849dd617d4dc1dab9bc851
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Mon Jun 20 11:28:55 2022 +0200

    document changes


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

249984a90df4461f75849dd617d4dc1dab9bc851
 ChangeLog.txt        |  4 ++++
 doc/hyperref-doc.tex | 31 +++++++++++++++++++++++++++++++
 2 files changed, 35 insertions(+)

diff --git a/ChangeLog.txt b/ChangeLog.txt
index 5826b1d..2b72f66 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,3 +1,7 @@
+2022-06-20 Ulrike Fischer/David Carlisle
+    *  don't redefine \@secondoffive and \@fifthoffive, issue #238
+    *  add interface to access some pdf related values unchanged (needed by hyperxmp).
+
 2022-06-13 Ulrike Fischer/David Carlisle
     * add definitions for guillemet (corrects the spelling) and
       use them to follow the LaTeX change.
diff --git a/doc/hyperref-doc.tex b/doc/hyperref-doc.tex
index b176905..aa05913 100644
--- a/doc/hyperref-doc.tex
+++ b/doc/hyperref-doc.tex
@@ -401,6 +401,36 @@ which are used in toc like lists and \cs{addcontentsline}. Typical values are
 
 \end{description}
 
+\subsection{Values of package and \cs{hypersetup} options} 
+When\marginpar{\tiny New in version 7.00s}
+a key is set either in the package options or with
+\cs{hypersetup} \xpackage{hyperref} typically 
+stores the result in internal variables, or executes some
+code or sets a internal boolean. 
+Package and class authors should here \emph{not} rely on
+the names or the details of the key processing. 
+
+But as other packages sometimes need to know which value has been set,
+some values can be retrieved with the expandable
+\cs{GetDocumentProperties}. The values are given back 
+surrounded by \cs{exp\_not:n}, so can be used safely in an \cs{edef}.
+So for example to get the pdfauthor you can do. 
+
+\begin{verbatim}
+\edef\mypdfauthor{\GetDocumentProperties{hyperref/pdfauthor}}
+\end{verbatim}
+
+The values are given back as entered by the user! If they should be used in a PDF context
+\cs{pdfstringdef} or something equivalent must still be applied. 
+
+Currently this interface can be used for the keys \texttt{pdfauthor}, \texttt{pdftitle}, 
+\texttt{pdfproducer},
+\texttt{pdfcreator}, \texttt{pdfsubject} and \texttt{pdfkeywords}.  
+If used with a unknown key an empty value is returned.
+The interface works also if the new PDF management is loaded with \cs{DocumentMetadata}, in this
+case more keys gives back their value.
+
+
 \subsection{Links commands}
 The following commands are provided by all drivers to create links.
 They can be used by packages if the user commands are not sufficient.
@@ -597,6 +627,7 @@ In the key descriptions that follow, many options do not need a value,
 as they default to the value true if used. These are the ones classed as
 `boolean'. The values true and false can always be specified, however.
 
+
 \subsection{General options}
 
 Firstly, the options to specify general behavior and page size.





More information about the latex3-commits mailing list.