[latex3-commits] [git/LaTeX3-latex3-hyperref] cleanup-patches: don't set pagesize if mag is not 1000 (b849c6e)

Ulrike Fischer fischer at troubleshooting-tex.de
Wed Oct 5 13:55:08 CEST 2022


Repository : https://github.com/latex3/hyperref
On branch  : cleanup-patches
Link       : https://github.com/latex3/hyperref/commit/b849c6e0347b1efbf0b3da5de2b8c042e6ead5ec

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

commit b849c6e0347b1efbf0b3da5de2b8c042e6ead5ec
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Wed Oct 5 13:55:08 2022 +0200

    don't set pagesize if mag is not 1000


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

b849c6e0347b1efbf0b3da5de2b8c042e6ead5ec
 ChangeLog.txt |  3 +++
 hyperref.dtx  | 40 ++++++++++++++++++++++++----------------
 2 files changed, 27 insertions(+), 16 deletions(-)

diff --git a/ChangeLog.txt b/ChangeLog.txt
index a3e1c54..90fe76e 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,3 +1,6 @@
+2022-XX-XX Ulrike Fischer/David Carlisle
+    * don't set the pagesize if \mag is different from 1000, see issue #1138 in latex3.
+    
 2022-09-22 Ulrike Fischer/David Carlisle
     * adapt setpagesize option to changes in LaTeX (stockwidth is always defined)
     * Use hooks instead of auxhook package
diff --git a/hyperref.dtx b/hyperref.dtx
index fb6aefd..df1fcce 100644
--- a/hyperref.dtx
+++ b/hyperref.dtx
@@ -13527,24 +13527,26 @@
         \fi
       \fi
     }{%
-      \ifdim\stockwidth>\z@
-        \ifdim\stockheight>\z@
-         \setlength{\pdfpagewidth}{\stockwidth}%
-         \setlength{\pdfpageheight}{\stockheight}%
-        \else
-          \ifdim\paperwidth>\z@
-            \ifdim\paperheight>\z@
-              \setlength{\pdfpagewidth}{\paperwidth}%
-              \setlength{\pdfpageheight}{\paperheight}%
+      \ifnum\mag=\@m
+        \ifdim\stockwidth>\z@
+          \ifdim\stockheight>\z@
+           \setlength{\pdfpagewidth}{\stockwidth}%
+           \setlength{\pdfpageheight}{\stockheight}%
+          \else
+            \ifdim\paperwidth>\z@
+              \ifdim\paperheight>\z@
+                \setlength{\pdfpagewidth}{\paperwidth}%
+                \setlength{\pdfpageheight}{\paperheight}%
+              \fi
             \fi
           \fi
-        \fi
-      \else
-        \ifdim\stockwidth=\z@
-          \ifdim\paperwidth>\z@
-            \ifdim\paperheight>\z@
-              \setlength{\pdfpagewidth}{\paperwidth}%
-              \setlength{\pdfpageheight}{\paperheight}%
+        \else
+          \ifdim\stockwidth=\z@
+            \ifdim\paperwidth>\z@
+              \ifdim\paperheight>\z@
+                \setlength{\pdfpagewidth}{\paperwidth}%
+                \setlength{\pdfpageheight}{\paperheight}%
+              \fi
             \fi
           \fi
         \fi
@@ -14600,6 +14602,7 @@
 \AtBeginShipoutFirst{%
   \ifHy at setpagesize
     \begingroup
+     \ifnum\mag=\@m
       \ifdim\stockwidth>\z@
         \ifdim\stockheight>\z@
          \special{papersize=\the\stockwidth,\the\stockheight}%
@@ -14619,6 +14622,7 @@
           \fi
         \fi
       \fi
+     \fi
     \endgroup
   \fi
   \Hy at DisableOption{setpagesize}%
@@ -14757,6 +14761,7 @@
 \ifcsname mediaheight\endcsname
   \ifHy at setpagesize
      \providecommand*{\VTeXInitMediaSize}{%
+       \ifnum\mag=\@m
         \ifdim\stockwidth>\z@
           \ifdim\stockheight>\z@
            \setlength\mediaheight\stockheight
@@ -14779,6 +14784,7 @@
             \fi
           \fi
         \fi
+       \fi
      }%
      \Hy at AtBeginDocument{\VTeXInitMediaSize}%
   \fi
@@ -16409,6 +16415,7 @@
 \AtBeginShipoutFirst{%
   \ifHy at setpagesize
     \begingroup
+     \ifnum\mag=\@m
       \ifdim\stockwidth>\z@
         \ifdim\stockheight>\z@
          \special{papersize=\the\stockwidth,\the\stockheight}%
@@ -16428,6 +16435,7 @@
           \fi
         \fi
       \fi
+     \fi 
     \endgroup
   \fi
   \Hy at DisableOption{setpagesize}%





More information about the latex3-commits mailing list.