diff options
Diffstat (limited to 'macros/latex/contrib/hyperref/doc/hyperref-doc.tex')
-rw-r--r-- | macros/latex/contrib/hyperref/doc/hyperref-doc.tex | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/macros/latex/contrib/hyperref/doc/hyperref-doc.tex b/macros/latex/contrib/hyperref/doc/hyperref-doc.tex index b176905088..f73be90ac4 100644 --- a/macros/latex/contrib/hyperref/doc/hyperref-doc.tex +++ b/macros/latex/contrib/hyperref/doc/hyperref-doc.tex @@ -166,7 +166,7 @@ } \makeatother \title{Hypertext marks in \hologo{LaTeX}: a manual for \xpackage{hyperref}} -\date{2022-06-13 v7.00r} +\date{2022-06-20 v7.00s} \begin{document} @@ -333,10 +333,10 @@ many \LaTeX\ commands.\footnote{But work has started to reduce the number of redefinition and so the dependencies on the loading order.} \emph{Do not load it in \ci{AtBeginDocument} or the \texttt{begindocument} hook!} -While this often worked in the past this is not officially supported. +While this often worked in the past this is not officially supported. As \xpackage{hyperref} and \xpackage{nameref} use this hook too to initialize commands, timing of code execution is tricky and fragile if the packages are loaded there. -If you want to delay the loading, use the \texttt{begindocument/before} hook. +If you want to delay the loading, use the \texttt{begindocument/before} hook. Hopefully you will find that all cross-references work correctly as hypertext. For example, \ci{section} commands will @@ -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. |