[latex3-commits] [git/LaTeX3-latex3-pdfresources] develop: change hyperxmp hook (f12eea4)

Ulrike Fischer fischer at troubleshooting-tex.de
Sun Apr 24 18:43:39 CEST 2022


Repository : https://github.com/latex3/pdfresources
On branch  : develop
Link       : https://github.com/latex3/pdfresources/commit/f12eea46d4d507a9104a37d6956935005d0a3229

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

commit f12eea46d4d507a9104a37d6956935005d0a3229
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Sun Apr 24 18:43:39 2022 +0200

    change hyperxmp hook


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

f12eea46d4d507a9104a37d6956935005d0a3229
 firstaid/hyperxmp-patches-tmp-ltx.sty | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/firstaid/hyperxmp-patches-tmp-ltx.sty b/firstaid/hyperxmp-patches-tmp-ltx.sty
index 0f0c22f..780a31e 100644
--- a/firstaid/hyperxmp-patches-tmp-ltx.sty
+++ b/firstaid/hyperxmp-patches-tmp-ltx.sty
@@ -146,9 +146,21 @@
 
 \DeclareHookRule{begindocument/before}{pdfmanagement/firstaid/hyperxmp}{before}{hyperxmp}
 
-\AddToHook{enddocument}[pdfmanagement-firstaid]{\__hyxmp_get_metadata:}
+% hyperxmp puts the code into enddocument, but for xetex this is too late.
+% so we move that to shipout/lastpage and add our command before.
+\RemoveFromHook{enddocument}[hyperxmp]
+\AddToHook{shipout/lastpage}[pdfmanagement-firstaid]
+ {
+  \__hyxmp_get_metadata:
+  \hyxmp at auto@assign at data
+  \hyxmp at check@standards
+  \hyxmp at warn@if at no@metadata
+  \hyxmp at embed@packet
+ }
+
+%\AddToHook{enddocument}[pdfmanagement-firstaid]{\__hyxmp_get_metadata:}
 
-\DeclareHookRule{enddocument}{pdfmanagement-firstaid}{before}{hyperxmp}
+%\DeclareHookRule{enddocument}{pdfmanagement-firstaid}{before}{hyperxmp}
 
 
 \endinput





More information about the latex3-commits mailing list.