[latex3-commits] [git/LaTeX3-latex3-latex3] setpdfpagesize-alt: Correct logic for expl3 being pre-loaded (b34770cf4)

Joseph Wright joseph.wright at morningstar2.co.uk
Tue Sep 27 22:10:35 CEST 2022


Repository : https://github.com/latex3/latex3
On branch  : setpdfpagesize-alt
Link       : https://github.com/latex3/latex3/commit/b34770cf4896ee5c8e979135eb4536b00e753264

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

commit b34770cf4896ee5c8e979135eb4536b00e753264
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed Jun 22 14:28:21 2022 +0100

    Correct logic for expl3 being pre-loaded


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

b34770cf4896ee5c8e979135eb4536b00e753264
 l3kernel/l3pdf.dtx | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/l3kernel/l3pdf.dtx b/l3kernel/l3pdf.dtx
index 22efc3be9..72a226168 100644
--- a/l3kernel/l3pdf.dtx
+++ b/l3kernel/l3pdf.dtx
@@ -498,17 +498,23 @@
 %  Everything here is delayed to the start of the document so that the
 %  backend will definitely be loaded.
 %    \begin{macrocode}
-\cs_if_exist:NT \IfDocumentMetadataTF
+\cs_if_exist:NT \@kernel at before@begindocument
   {
-    \IfDocumentMetadataTF
+    \tl_gput_right:Nn \@kernel at before@begindocument
       {
         \tl_gput_right:Nn \@kernel at before@begindocument
           {
-            \@@_backend_pagesize_set:nn
-              \paperwidth \paperheight
+            \cs_if_exist:NT \IfDocumentMetadataTF
+              {
+                \IfDocumentMetadataTF
+                  {
+                    \@@_backend_pagesize_set:nn
+                      \paperwidth \paperheight
+                  }
+                  { }
+              }
           }
       }
-      { }
   }
 %    \end{macrocode}
 %





More information about the latex3-commits mailing list.