[latex3-commits] [git/LaTeX3-latex3-latex3] setpdfpagesize-alt: Protect against zero paper height/width (b251e96f0)

Joseph Wright joseph.wright at morningstar2.co.uk
Tue Sep 27 21:15:14 CEST 2022


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

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

commit b251e96f04df63fb6a8ee9313328e65a9694b446
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Tue Sep 27 20:15:14 2022 +0100

    Protect against zero paper height/width


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

b251e96f04df63fb6a8ee9313328e65a9694b446
 l3kernel/l3pdf.dtx | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/l3kernel/l3pdf.dtx b/l3kernel/l3pdf.dtx
index 245e2a662..3f03fb6b2 100644
--- a/l3kernel/l3pdf.dtx
+++ b/l3kernel/l3pdf.dtx
@@ -480,8 +480,13 @@
                   { \dim_compare_p:nNn \stockheight < { 0pt } }
                   { \dim_compare_p:nNn \stockwidth  < { 0pt } }
                   {
-                    \@@_backend_pagesize_set:nn
-                      \paperwidth \paperheight
+                    \bool_lazy_and:nnT
+                      { \dim_compare_p:nNn \paperheight > { 0pt } }
+                      { \dim_compare_p:nNn \paperwidth  > { 0pt } }
+                      {
+                        \@@_backend_pagesize_set:nn
+                          \paperwidth \paperheight
+                      }
                   }
               }
           }





More information about the latex3-commits mailing list.