summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty')
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty14
1 files changed, 12 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty
index 56e9dd45dbb..a1bc3caddb7 100644
--- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty
+++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty
@@ -19,7 +19,7 @@
%
% for those people who are interested.
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
-\ProvidesExplPackage{hyperxmp-patches-tmp-ltx}{2021-08-28}{0.95i}
+\ProvidesExplPackage{hyperxmp-patches-tmp-ltx}{2022-01-13}{0.95j}
{Store hyperref metadata in XMP format / temporay patches to test pdfresource management ... UF}
\cs_if_exist:NT \pdfmanagement_add:nnn
@@ -124,6 +124,9 @@
\exp_args:NNe
\pdfstringdef\@pdftitle{\GetDocumentProperties{hyperref/pdftitle}}
\cs_set_eq:NN\hyxmp@pdftitle\@pdftitle
+ \exp_args:NNe
+ \pdfstringdef\@pdfcopyright{\GetDocumentProperties{hyperref/pdfcopyright}}
+ \cs_set_eq:NN\hyxmp@pdfcopyright\@pdfcopyright
% pdflang,
\tl_if_exist:cF{@pdflang}{\tl_new:c{@pdflang}}
\tl_set:cx {@pdflang}{\GetDocumentProperties{document/lang}}
@@ -131,8 +134,15 @@
% we need to provide a few commands so that hyperxmp stops to overwrite them
% in \AtEndPreamble
+% we need also add it to the document properties to avoid stray commas
+% with empty author.
\AddToHook{begindocument/before}[pdfmanagement/firstaid/hyperxmp]{%
- \def\@pdfauthor{Author}\def\@pdftitle {Title}}
+ \def\@pdfauthor{Author}\def\@pdftitle {Title}%
+ \tl_if_blank:eT{\GetDocumentProperties{hyperref/pdfauthor}}
+ {\AddToDocumentProperties[hyperref]{pdfauthor}{Author}}
+ \tl_if_blank:eT{\GetDocumentProperties{hyperref/pdftitle}}
+ {\AddToDocumentProperties[hyperref]{pdfauthor}{Title}}
+ }
\DeclareHookRule{begindocument/before}{pdfmanagement/firstaid/hyperxmp}{before}{hyperxmp}