[latex3-commits] [git/LaTeX3-latex3-pdfresources] splitting: trying to sort loading order ... (261de14)

Ulrike Fischer fischer at troubleshooting-tex.de
Thu Jul 9 19:21:52 CEST 2020


Repository : https://github.com/latex3/pdfresources
On branch  : splitting
Link       : https://github.com/latex3/pdfresources/commit/261de142fb05027f09d1897f73e2ba49d5688067

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

commit 261de142fb05027f09d1897f73e2ba49d5688067
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Thu Jul 9 19:21:52 2020 +0200

    trying to sort loading order ...


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

261de142fb05027f09d1897f73e2ba49d5688067
 l3pdfmeta.dtx    | 23 ++++++++++++++++++++---
 pdfresources.dtx | 14 +-------------
 2 files changed, 21 insertions(+), 16 deletions(-)

diff --git a/l3pdfmeta.dtx b/l3pdfmeta.dtx
index 94d6571..addd3bb 100644
--- a/l3pdfmeta.dtx
+++ b/l3pdfmeta.dtx
@@ -82,7 +82,7 @@
 %<*package>
 \ProvidesExplPackage {l3pdfmeta} {2020-05-17} {0.2}
   {XMP-Metadata}
-\RequirePackage{pdfresources}
+\RequirePackage{lthooks}
 %    \end{macrocode}
 % \section{Document metadata}
 % We plan a \cs{DeclareDocumentMetaData} so let's start with it.
@@ -92,16 +92,28 @@
 % \begin{NOTE}{UF}
 % how to setup a backend/driver key? Can it be copied from expl3?
 % \end{NOTE}
-% \begin{function}[updated=2020-07-05]{\DeclareDocumentMetaData}
+%%
+% \begin{variable}{\g_@@_Core_active_bool}
+% This boolean will control the activation of the management code.
+% It is used in the hooks, and in some backend files.
+% \cs{DeclareDocumentMetadata} should set it to true
 %    \begin{macrocode}
 %<@@=pdf>
+%<*package>
+\bool_new:N \g_@@_Core_active_bool
+%    \end{macrocode}
+% \end{variable}
+% \begin{function}[updated=2020-07-05]{\DeclareDocumentMetaData}
+%    \begin{macrocode}
 \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{pdfresources}
         \bool_gset_true:N \g_@@_Core_active_bool
-        \keys_set:nn  { pdf / setup } { #1 }
+        \keys_set_filter:nnn  { pdf / setup } { init } { #1 }
       }
   }
 
@@ -113,6 +125,11 @@
               }
 
 \bool_new:N \g_@@_meta_bool
+\keys_define:nn { pdf / setup }
+  {
+    expl3 .code:n = { \PassOptionsToPackage { #1 } {expl3} },
+    expl3 .groups:n = { init } ,
+  }
 
 \keys_define:nn { pdf / setup }
   {
diff --git a/pdfresources.dtx b/pdfresources.dtx
index 9997f5f..ea56344 100644
--- a/pdfresources.dtx
+++ b/pdfresources.dtx
@@ -90,18 +90,6 @@
 %</package>
 %    \end{macrocode}
 % \section{Preparation/helper Code}
-% \begin{variable}{\g_@@_Core_active_bool}
-% This boolean will control the activation of the management code.
-% It is used in the hooks, and in some backend files.
-% \cs{DeclareDocumentMetadata} should set it to true
-%    \begin{macrocode}
-%<*package>
-\bool_new:N \g_@@_Core_active_bool
-% temporarly
-%\bool_gset_true:N \g_@@_Core_active_bool
-%</package>
-%    \end{macrocode}
-% \end{variable}
 %^^A still needed:
 %^^A \pdf at strcmp??
 %^^A \pdf at escapestring?? \pdfescapestring
@@ -124,9 +112,9 @@
 % \end{NOTE}
 %    \begin{macrocode}
 %<*package>
+\RequirePackage{l3pdfmeta} %
 \RequirePackage{l3pdfdict}
 \RequirePackage{l3pdftools}
-\RequirePackage{l3pdfmeta} %
 \RequirePackage{l3pdfcoredict}
 % %load backend driver
 \file_input:n {l3\g__sys_backend_tl-pdf.def}





More information about the latex3-commits mailing list.