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

Joseph Wright joseph.wright at morningstar2.co.uk
Wed Jun 22 15:28:21 CEST 2022


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

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

commit 0908d7fc7b206b6de2bc19c8b69c57b34e708b1d
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


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

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

diff --git a/l3kernel/l3pdf.dtx b/l3kernel/l3pdf.dtx
index ae727774e..3251c3b71 100644
--- a/l3kernel/l3pdf.dtx
+++ b/l3kernel/l3pdf.dtx
@@ -456,17 +456,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.