[latex3-commits] [git/LaTeX3-latex3-pdfresources] splitting: avoid that is breaks with two declaredocumentmetadata (8182316)
Ulrike Fischer
fischer at troubleshooting-tex.de
Tue Aug 4 19:17:29 CEST 2020
Repository : https://github.com/latex3/pdfresources
On branch : splitting
Link : https://github.com/latex3/pdfresources/commit/81823160032a83f54fa7d58b1ab02eb5c566ac54
>---------------------------------------------------------------
commit 81823160032a83f54fa7d58b1ab02eb5c566ac54
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Tue Aug 4 19:17:29 2020 +0200
avoid that is breaks with two declaredocumentmetadata
>---------------------------------------------------------------
81823160032a83f54fa7d58b1ab02eb5c566ac54
l3pdfinit.dtx | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/l3pdfinit.dtx b/l3pdfinit.dtx
index fa9d4ee..e7885b6 100644
--- a/l3pdfinit.dtx
+++ b/l3pdfinit.dtx
@@ -108,23 +108,30 @@
should~be~used~only~before~\token_to_str:N\documentclass
}
+
+\bool_new:N \g__pdf_Meta_used_bool
\NewDocumentCommand\DeclareDocumentMetaData { m }
{
\cs_if_eq:NNTF \documentclass \@twoclasseserror
{ \msg_error:nn { pdf }{ setup-after-documentclass } }
{
- \keys_set_groups:nnn { pdf / setup} {init}{ #1 }
- \RequirePackage{l3pdf} %should be loader after the backend is set.
- % %load backend driver
- \ExplSyntaxOn\makeatletter
- \file_input:n {l3\g__sys_backend_tl-pdf.def} %should be inside the normal backend
- \ExplSyntaxOff\makeatother
- \RequirePackage{l3pdfutils}
- \bool_gset_true:N \g_@@_Core_active_bool
+ \bool_if:NF \g__pdf_Meta_used_bool
+ {
+ \keys_set_groups:nnn { pdf / setup} {init}{ #1 }
+ \RequirePackage{l3pdf} %should be loader after the backend is set.
+ % %load backend driver
+ \ExplSyntaxOn\makeatletter
+ \file_input:n {l3\g__sys_backend_tl-pdf.def} %should be inside the normal backend
+ \ExplSyntaxOff\makeatother
+ \RequirePackage{l3pdfutils}
+ \bool_gset_true:N \g__pdf_Core_active_bool
+ }
+ \bool_gset_true:N \g__pdf_Meta_used_bool
\keys_set_filter:nnn { pdf / setup } { init } { #1 }
}
}
+
\keys_define:nn { pdf / setup }
{
expl3 .code:n = { \PassOptionsToPackage { #1 } {expl3} },
More information about the latex3-commits
mailing list.