[latex3-commits] [git/LaTeX3-latex3-latex3] master: Drop an (almost) unnecessary \AtBeginDocument (1316fb4ea)

Joseph Wright joseph.wright at morningstar2.co.uk
Wed Jul 22 16:49:56 CEST 2020


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/1316fb4ead26f661d70e22290b768ff7ff70980e

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

commit 1316fb4ead26f661d70e22290b768ff7ff70980e
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed Jul 22 15:49:56 2020 +0100

    Drop an (almost) unnecessary \AtBeginDocument
    
    Similar to 414f2a, the likelihood here is that there is
    no issue, and users can happily load packages earlier
    if absolutely required.


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

1316fb4ead26f661d70e22290b768ff7ff70980e
 l3backend/l3backend-pdf.dtx | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/l3backend/l3backend-pdf.dtx b/l3backend/l3backend-pdf.dtx
index 7fbc94a55..052565283 100644
--- a/l3backend/l3backend-pdf.dtx
+++ b/l3backend/l3backend-pdf.dtx
@@ -1314,18 +1314,14 @@
 %   not rotate. As such, we need to know if landscape is active.
 %    \begin{macrocode}
 \bool_new:N \g_@@_landscape_bool
-%<*package>
-\AtBeginDocument
+\cs_if_exist:NT \landscape
   {
-    \cs_if_exist:NT \landscape
-      {
-        \tl_put_right:Nn \landscape
-          { \bool_gset_true:N \g_@@_landscape_bool }
-        \tl_put_left:Nn \endlandscape
-          { \bool_gset_false:N \g_@@_landscape_bool }
-      }
+    \tl_put_right:Nn \landscape
+      { \bool_gset_true:N \g_@@_landscape_bool }
+    \tl_put_left:Nn \endlandscape
+      { \bool_gset_false:N \g_@@_landscape_bool }
   }
-%</package>
+}
 %    \end{macrocode}
 % \end{variable}
 %





More information about the latex3-commits mailing list.