diff options
author | Norbert Preining <norbert@preining.info> | 2024-03-19 03:02:55 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2024-03-19 03:02:55 +0000 |
commit | 1b771c1e303b8274d871ee6bd4bdd5ba03bdd152 (patch) | |
tree | 812adf200ad09972163243b4e4341a3991852c14 /macros/latex/contrib/hyperxmp | |
parent | 9c8677e09c2c9b0d9593f26ed226411d68160a4e (diff) |
CTAN sync 202403190302
Diffstat (limited to 'macros/latex/contrib/hyperxmp')
-rw-r--r-- | macros/latex/contrib/hyperxmp/README | 2 | ||||
-rw-r--r-- | macros/latex/contrib/hyperxmp/hyperxmp.dtx | 77 | ||||
-rw-r--r-- | macros/latex/contrib/hyperxmp/hyperxmp.pdf | bin | 1289541 -> 1259976 bytes |
3 files changed, 48 insertions, 31 deletions
diff --git a/macros/latex/contrib/hyperxmp/README b/macros/latex/contrib/hyperxmp/README index 22a0b26a9a..e7a901f976 100644 --- a/macros/latex/contrib/hyperxmp/README +++ b/macros/latex/contrib/hyperxmp/README @@ -47,7 +47,7 @@ Building hyperxmp.pdf is a little more involved: Copyright and license ===================== -Copyright (C) 2011-2023 Scott Pakin +Copyright (C) 2011-2024 Scott Pakin This file may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c of this license diff --git a/macros/latex/contrib/hyperxmp/hyperxmp.dtx b/macros/latex/contrib/hyperxmp/hyperxmp.dtx index 9be837cf2a..10045102c1 100644 --- a/macros/latex/contrib/hyperxmp/hyperxmp.dtx +++ b/macros/latex/contrib/hyperxmp/hyperxmp.dtx @@ -22,7 +22,7 @@ %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] %<package>\ProvidesPackage{hyperxmp} %<*package> - [2023/09/10 v5.12 Store hyperref metadata in XMP format] + [2024/03/17 v5.13 Store hyperref metadata in XMP format] %</package> % %<*driver> @@ -131,7 +131,7 @@ %</driver> % \fi % -% \CheckSum{2848} +% \CheckSum{2859} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -206,10 +206,6 @@ % \protect\cs{AtEndPreamble}, as is done by % \protect\pkgname{doclicense}~v2.2.0. Thanks to Tommaso Pecorella % for the bug report and help testing} -% \changes{v5.6}{2020/10/05}{Make conditional the loading of the -% \protect\pkgname{ifdraft} package. Thanks to Tobias Pape for -% reporting the incompatibility between \protect\pkgname{hyperxmp} and -% \protect\pkgname{ifdraft}} % % ^^A \GetFileInfo{hyperxmp.dtx} % @@ -2274,33 +2270,52 @@ sub mycmd { % \end{macro} % % \begin{macro}{\ifdraft} +% \changes{v5.2}{2020/04/18}{Define \protect\cs{ifdraft} only locally, at +% Niklas Beisert's request} +% \changes{v5.6}{2020/10/05}{Make conditional the loading of the +% \protect\pkgname{ifdraft} package. Thanks to Tobias Pape for +% reporting the incompatibility between \protect\pkgname{hyperxmp} and +% \protect\pkgname{ifdraft}} +% \changes{v5.13}{2024/03/17}{Rewrite \protect\pkgname{ifdraft} handling +% to avoid loading a package within a group, which \protect\LaTeX\ +% soon will stop supporting. Thanks to Ulrike Fischer and Boris Veytsman +% for bringing this to my attention} % \begin{macro}{\next} % Use the \pkgname{ifdraft} package to determine if this is a draft or % final document. The challenge here is that we want to use % \pkgname{ifdraft} if it's already loaded, load it if not, and not % break any incompatible, author-defined \cs{ifdraft} macros that may % occur either before or after the |\usepackage{hyperxmp}|. Our -% solution begins by defining a new group. Then, if \pkgname{ifdraft} -% is not yet loaded, we locally undefine \cs{ifdraft} and load the -% package. In this case, we later ``unload'' the package by setting -% \cs{ver@ifdraft.sty} to \cs{relax}. -% \changes{v5.2}{2020/04/18}{Define \protect\cs{ifdraft} only locally, at -% Niklas Beisert's request} +% solution works as follows: +% +% \begin{itemize} +% \item If \pkgname{ifdraft} is already loaded, \cs{next} is defined +% as a no-op. +% \item If \pkgname{ifdraft} is not (yet) loaded, the code backs up +% then undefines \cs{ifdraft}, which may be author-defined. It then +% loads \pkgname{ifdraft} and defines \cs{next} to ``unload'' the +% package by setting the package's author-visible commands to +% \cs{relax}. +% \item Below, after \cs{ifdraft} is used to define +% \cs{@pdfrendition}, \cs{next} is invoked to unload a +% \pkgname{hyperxmp}-loaded \pkgname{ifdraft}. Finally, \cs{ifdraft} +% is restored to its original definition. +% \end{itemize} % \begin{macrocode} -\begingroup - \@ifpackageloaded{ifdraft}{% - \let\next=\relax - }{% +\let\hyxmp@orig@ifdraft=\ifdraft +\@ifpackageloaded{ifdraft}{% + \let\next=\relax +}{% + \let\ifdraft=\relax + \RequirePackage{ifdraft}% + \def\next{% + \expandafter\let\csname ver@ifdraft.sty\endcsname=\relax \let\ifdraft=\relax - \RequirePackage{ifdraft}% - \def\next{% - \expandafter\global\expandafter\let\csname ver@ifdraft.sty\endcsname=\relax - }% + \let\ifoptiondraft=\relax + \let\ifoptionfinal=\relax }% +}% % \end{macrocode} -% \end{macro} -% \end{macro} -% % \begin{macro}{\@pdfrendition} % \changes{v5.0}{2020/02/27}{Added the \protect\optname{pdfrendition} % option} @@ -2310,16 +2325,18 @@ sub mycmd { % |\documentclass[draft]|, for which |\@pdfrendition| defaults to % |draft|. % \begin{macrocode} - \ifdraft{% - \gdef\@pdfrendition{draft}% - }{% - \gdef\@pdfrendition{default}% - } - \next -\endgroup +\ifdraft{% + \def\@pdfrendition{draft}% +}{% + \def\@pdfrendition{default}% +} +\next +\let\ifdraft=\hyxmp@orig@ifdraft \define@key{Hyp}{pdfrendition}{\hyxmp@pdfstringdef\@pdfrendition{#1}} % \end{macrocode} % \end{macro} +% \end{macro} +% \end{macro} % % \begin{macro}{\@pdfpublication} % Prepare to store the name of the publication in which the diff --git a/macros/latex/contrib/hyperxmp/hyperxmp.pdf b/macros/latex/contrib/hyperxmp/hyperxmp.pdf Binary files differindex 2664608ae6..e484b17e60 100644 --- a/macros/latex/contrib/hyperxmp/hyperxmp.pdf +++ b/macros/latex/contrib/hyperxmp/hyperxmp.pdf |