[latex3-commits] [git/LaTeX3-latex3-latex3] setpdfpagesize-alt: Update logic follow team discussionc (fc3832c6a)
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/fc3832c6acec8af7e7a1b4436f017acfde67be1a
>---------------------------------------------------------------
commit fc3832c6acec8af7e7a1b4436f017acfde67be1a
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Fri Sep 23 08:09:58 2022 +0100
Update logic follow team discussionc
>---------------------------------------------------------------
fc3832c6acec8af7e7a1b4436f017acfde67be1a
l3kernel/l3pdf.dtx | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/l3kernel/l3pdf.dtx b/l3kernel/l3pdf.dtx
index d380a3500..cc4258027 100644
--- a/l3kernel/l3pdf.dtx
+++ b/l3kernel/l3pdf.dtx
@@ -502,23 +502,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.