[latex3-commits] [git/LaTeX3-latex3-latex3] setpdfpagesize-alt: Update logic follow team discussionc (1299ccdbb)

Joseph Wright joseph.wright at morningstar2.co.uk
Fri Sep 23 09:09:58 CEST 2022


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

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

commit 1299ccdbbf831e7e71a9f98281fbd20dba127729
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Fri Sep 23 08:09:58 2022 +0100

    Update logic follow team discussionc


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

1299ccdbbf831e7e71a9f98281fbd20dba127729
 l3kernel/l3pdf.dtx | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/l3kernel/l3pdf.dtx b/l3kernel/l3pdf.dtx
index ba1c7f6ee..d22bc5053 100644
--- a/l3kernel/l3pdf.dtx
+++ b/l3kernel/l3pdf.dtx
@@ -460,23 +460,26 @@
   {
     \tl_gput_right:Nn \@kernel at before@begindocument
       {
-        \cs_if_exist:NT \IfDocumentMetadataTF
+        \bool_lazy_and:nnT
+          { \cs_if_exist_p:N \stockheight }
+          { \cs_if_exist_p:N \stockwidth }
           {
-            \IfDocumentMetadataTF
+            \bool_lazy_and:nnTF
+              { \dim_compare_p:nNn \stockheight > { 0pt } }
+              { \dim_compare_p:nNn \stockwidth  > { 0pt } }
               {
-                \bool_lazy_and:nnTF
-                  { \cs_if_exist_p:N \stockwidth }
-                  { \dim_compare_p:nNn \stockwidth > { 0pt } }
-                  {
-                    \@@_backend_pagesize_set:nn
-                      \stockwidth \stockheight
-                  }
+                \@@_backend_pagesize_set:nn
+                  \stockwidth \stockheight
+              }
+              {
+                \bool_lazy_or:nnF
+                  { \dim_compare_p:nNn \stockheight < { 0pt } }
+                  { \dim_compare_p:nNn \stockwidth  < { 0pt } }
                   {
                     \@@_backend_pagesize_set:nn
                       \paperwidth \paperheight
                   }
               }
-              { }
           }
       }
   }





More information about the latex3-commits mailing list.