[latex3-commits] [git/LaTeX3-latex3-pdfresources] verify: need to handle \@pdfauthor/\@pdftitle differently (d683b5b)
Ulrike Fischer
fischer at troubleshooting-tex.de
Fri Feb 19 15:16:11 CET 2021
Repository : https://github.com/latex3/pdfresources
On branch : verify
Link : https://github.com/latex3/pdfresources/commit/d683b5b4489839e71fe3e63bc1af35c8330278cb
>---------------------------------------------------------------
commit d683b5b4489839e71fe3e63bc1af35c8330278cb
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Fri Feb 19 15:16:11 2021 +0100
need to handle \@pdfauthor/\@pdftitle differently
>---------------------------------------------------------------
d683b5b4489839e71fe3e63bc1af35c8330278cb
firstaid/hyperxmp-patches-tmp-ltx.sty | 11 ++++++++++-
hyperref-generic.dtx | 6 +++---
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/firstaid/hyperxmp-patches-tmp-ltx.sty b/firstaid/hyperxmp-patches-tmp-ltx.sty
index 7a29c59..3232a44 100644
--- a/firstaid/hyperxmp-patches-tmp-ltx.sty
+++ b/firstaid/hyperxmp-patches-tmp-ltx.sty
@@ -107,10 +107,12 @@
,pdftitle
,pdfsubject
,pdfkeywords
+ ,pdfproducer
}
{
\tl_if_exist:cF{@##1}{\tl_new:c{@##1}}
- \tl_set:cx {@##1}{\GetDocumentProperties{hyp/##1}}}
+ \tl_set:cx {@##1}{\GetDocumentProperties{hyp/##1}}
+ }
% pdfauthor, this is only a work around for simple author
% TODO needs improvement
@@ -122,6 +124,13 @@
\tl_set:cx {@pdflang}{\GetDocumentProperties{document/lang}}
}
+% we need to provide a few commands so that hyperxmp stops to overwrite them
+% in \AtEndPreamble
+\AddToHook{begindocument/before}[pdfmanagement/firstaid/hyperxmp]{%
+ \def\@pdfauthor{Author}\def\@pdftitle {Title}}
+
+\DeclareHookRule{begindocument/before}{pdfmanagement/firstaid/hyperxmp}{before}{hyperxmp}
+
\AddToHook{enddocument}[pdfmanagement-firstaid]{\__hyxmp_get_metadata:}
\DeclareHookRule{enddocument}{pdfmanagement-firstaid}{before}{hyperxmp}
diff --git a/hyperref-generic.dtx b/hyperref-generic.dtx
index 3ed2831..6a9873a 100644
--- a/hyperref-generic.dtx
+++ b/hyperref-generic.dtx
@@ -1033,13 +1033,13 @@
%
% \section{Compability commands}
% \subsection{Metadata}
-% A number of values should be accessible from other packages. Until know
+% A number of values should be accessible from other packages. Until now
% packages like \pkg{hyperxmp} used variables like \cs{@pdfauthor}. As they are
-% gone we need to provide some fallback.
+% gone we need to provide some other access.
% \begin{macrocode}
\cs_new_protected:Npn \@@_store_metadata:nn #1 #2 %#1 key, #2 value.
{
- \tl_set:cn {@#1}{#2}
+ %\tl_set:cn {@#1}{#2}
\AddToDocumentProperties[hyp]{#1}{#2}
}
\cs_generate_variant:Nn \@@_store_metadata:nn {xn,nx,xx}
More information about the latex3-commits
mailing list.